On 13 Nov 2026, at 18:36, David Marchand wrote:

> Move list insertion (resp. removal) out of common_construct()
> (resp. common_destruct()) into their callers.
>
> In constructors, the device is not visible to other threads until
> inserted in the list, so field initialization does not need the
> mutex.
> netdev_request_reconfigure() is moved next to the list insertion
> in each constructor.
> In the vhost server constructor, rte_vhost_driver_start() is kept
> under the mutex so that vhost event callbacks cannot race with
> list insertion.
>
> In the eth destructor, the mutex still covers the sibling check and
> DPDK device close/remove to prevent races on shared rte_device
> objects.
> In the vhost destructor, only the orphan check and list removal
> need the mutex.
>
> While at it, move the per-device mutex init out of common_construct()
> and destroy out of common_destruct() into their per-type callers.
> Introduce vhost_common_destruct() to mirror vhost_common_construct(),
> carrying the OVS_EXCLUDED(dev->mutex) annotation required by the
> dpdk_vhost_driver_unregister() callback path.
>
> This prepares for replacing dpdk_mutex with per-type list mutexes.
>
> Signed-off-by: David Marchand <[email protected]>

Thanks David, for following up on this series. This patch looks good to me.

Acked-by: Eelco Chaudron <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to