On 3 Nov 2026, at 13:01, David Marchand wrote:

> Move this code to a new netdev-dpdk-common.c file for reuse.
> Add separate wrappers for eth and vhost netdevs (in preparation of the
> separation later).
>
> Signed-off-by: David Marchand <[email protected]>

Hi David,

I think this patch looks good to me.  AI found one existing issue, see
below.  I guess I should send a separate fix for this.  Let me know
your thoughts.

Acked-by: Eelco Chaudron <[email protected]>

> ---
> Changes since RFC v1:
> - removed unneeded helper for freeing policer,
> - fixed coding style issues,
>
> ---
>  lib/netdev-dpdk-common.c |  932 ++++++++++++++++++++++++++++++++-
>  lib/netdev-dpdk-common.h |   48 +-
>  lib/netdev-dpdk.c        | 1077 +++++++-------------------------------
>  3 files changed, 1155 insertions(+), 902 deletions(-)
>
> diff --git a/lib/netdev-dpdk-common.c b/lib/netdev-dpdk-common.c
> index 66cf4de01..863870779 100644
> --- a/lib/netdev-dpdk-common.c
> +++ b/lib/netdev-dpdk-common.c
> @@ -33,6 +33,7 @@
>  #include "openvswitch/vlog.h"
>  #include "ovs-thread.h"
>  #include "smap.h"
> +#include "sset.h"
>  #include "util.h"
>
>  VLOG_DEFINE_THIS_MODULE(netdev_dpdk_common);
> @@ -76,7 +77,7 @@ netdev_dpdk_common_destruct(struct netdev_dpdk_common 
> *common)
>      rte_free(common->tx_q);
>      dpdk_mp_put(common->dpdk_mp);
>
> -    free(ovsrcu_get_protected(struct ingress_policer *,
> +    free(ovsrcu_get_protected(struct dpdk_qos_ingress_policer *,
>                                &common->ingress_policer));

This is the existing issue.  I guess it needs to be changed to
something like:

    struct dpdk_qos_conf *qos_conf;

    qos_conf = ovsrcu_get_protected(struct dpdk_qos_conf *,
                                    &common->qos_conf);
    if (qos_conf) {
        qos_conf->ops->qos_destruct(qos_conf);
    }


>      free(common->sw_stats);
>  }

[...]
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to