[EXTERNAL] Re: [PATCH v4 2/7] net/netvsc: add multi-process VF device removal support
Long Li
longli at microsoft.com
Fri Feb 27 01:03:16 CET 2026
> Subject: [EXTERNAL] Re: [PATCH v4 2/7] net/netvsc: add multi-process VF device
> removal support
>
> On Wed, 25 Feb 2026 18:39:33 -0800
> longli at linux.microsoft.com wrote:
>
> > /* Spinlock for netvsc_shared_data */
> > +static rte_spinlock_t netvsc_shared_data_lock = RTE_SPINLOCK_INITIALIZER;
> > +
> > +static struct netvsc_shared_data {
> > + RTE_ATOMIC(uint32_t) secondary_cnt;
> > +} *netvsc_shared_data;
> > +
>
> This looks a lot like a sequence lock (spin lock + atomic).
> Might be clearer with that.
The spinlock netvsc_shared_data_lock also guards other shared data initialization.
MLX4 and MLX5 use a similar pattern (they have mlx4_shared_data_lock and mlx5_shared_data_lock, similar design)
I suggest leave this code as is.
More information about the stable
mailing list