On 1 Jul 2026, at 15:58, Eli Britstein wrote:

> Change function signatures to take struct netdev_dpdk_common instead of
> struct netdev_dpdk, and update internal accesses from dev->common.xxx to
> common->xxx.  This makes these functions reusable by netdev-doca which
> also operates on netdev_dpdk_common.
>
> Signed-off-by: Eli Britstein <[email protected]>

Thank Eli, one small nit, the rest looks good to me.

//Eelco


[...]

> @@ -890,48 +894,46 @@ dpdk_watchdog(void *dummy OVS_UNUSED)
>  }
>
>  static void
> -netdev_dpdk_update_netdev_flag(struct netdev_dpdk *dev,
> +netdev_dpdk_update_netdev_flag(struct netdev_dpdk_common *common,
>                                 enum dpdk_hw_ol_features hw_ol_features,
>                                 enum netdev_ol_flags flag)
> -    OVS_REQUIRES(dev->common.mutex)
> +    OVS_REQUIRES(common->mutex)
>  {
> -    struct netdev *netdev = &dev->common.up;

I would keep the local netdev pointer for readability:

    struct netdev *netdev = &common->up;

    if (common->hw_ol_features & hw_ol_features) {
        netdev->ol_flags |= flag;
    } else {
        netdev->ol_flags &= ~flag;
    }

> -    if (dev->common.hw_ol_features & hw_ol_features) {
> -        netdev->ol_flags |= flag;
> +    if (common->hw_ol_features & hw_ol_features) {
> +        common->up.ol_flags |= flag;
>      } else {
> -        netdev->ol_flags &= ~flag;
> +        common->up.ol_flags &= ~flag;
>      }
>  }

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

Reply via email to