On 1/22/26 12:55 PM, Eelco Chaudron wrote:
> The original series allowed the provider priority to be configured
> on the port using the other-config:hw-offload-priority option.
>
> However, this is not the correct level. The configuration should be
> applied at the interface level, allowing, for example, specific bond
> members to have different configurations.
>
> This patch moves the configuration from the port to the interface.
>
> Fixes: 5c9b96ed5abd ("dpif-offload: Allow per-port offload provider priority
> config.")
> Signed-off-by: Eelco Chaudron <[email protected]>
> ---
> NEWS | 7 +++---
> lib/dpif-offload.c | 23 +++++++++++-------
> tests/ofproto-dpif.at | 8 +++----
> vswitchd/vswitch.xml | 56 ++++++++++++++++++++++++-------------------
> 4 files changed, 54 insertions(+), 40 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index 3ff5b3633b..c3470b84ec 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -27,9 +27,10 @@ v3.7.0 - xx xxx xxxx
> * New global configuration option 'other-config:hw-offload-priority'
> that allows to set the order of the hardware offload providers
> to try when multiple exist for a given datapath implementation.
> - * New per-port configuration option 'other-config:hw-offload-priority'
> - that allows to set order of the hardware offload providers or disable
> - flow offloading on a particular port.
> + * New per-interface configuration option
> + 'other-config:hw-offload-priority' that allows to set order of the
> + hardware offload providers or disable flow offloading on a particular
> + interface.
> - OVSDB-IDL:
> * New ovsdb_idl_txn_assert_read_only() interface to mark transactions
> as read-only and trigger assertion failure when application attempts
> diff --git a/lib/dpif-offload.c b/lib/dpif-offload.c
> index f6ab65e980..0ee2faf08f 100644
> --- a/lib/dpif-offload.c
> +++ b/lib/dpif-offload.c
> @@ -59,7 +59,7 @@ static const struct dpif_offload_class
> *base_dpif_offload_classes[] = {
> static char *dpif_offload_provider_priority_list = NULL;
> static atomic_bool offload_global_enabled = false;
> static atomic_bool offload_rebalance_policy = false;
> -static struct smap port_order_cfg = SMAP_INITIALIZER(&port_order_cfg);
> +static struct smap iface_order_cfg = SMAP_INITIALIZER(&iface_order_cfg);
>
> static int
> dpif_offload_register_provider__(const struct dpif_offload_class *class)
> @@ -527,7 +527,7 @@ dpif_offload_port_add(struct dpif *dpif, struct netdev
> *netdev,
> odp_port_t port_no)
> {
> struct dpif_offload_provider_collection *collection;
> - const char *port_priority = smap_get(&port_order_cfg,
> + const char *port_priority = smap_get(&iface_order_cfg,
> netdev_get_name(netdev));
> struct dpif_offload *offload;
>
> @@ -773,21 +773,26 @@ dpif_offload_set_global_cfg(const struct
> ovsrec_open_vswitch *cfg)
> }
> }
>
> - /* Filter out the 'hw-offload-priority' per port setting we need it
> before
> - * ports are added, so we can assign the correct offload-provider.
> + /* Filter out the 'hw-offload-priority' per interface setting we need it
> + * before ports are added, so we can assign the correct offload-provider.
nit: Should there be a period before 'we' ?
Otherwise,
Acked-by: Ilya Maximets <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev