RE: [EXTERNAL] Re: [PATCH] net/mana: use mana_local_data for tracking usage data for primary process

2025-02-07 Thread Long Li
> On Fri, 7 Feb 2025 15:21:45 -0800 > lon...@linuxonhyperv.com wrote: > > > + /* At least one eth_dev is probed, init shared data */ > > + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { > > + rte_spinlock_lock(&mana_shared_data_lock); > > + mana_local_data.primary_cnt++

Re: [PATCH] net/mana: use mana_local_data for tracking usage data for primary process

2025-02-07 Thread Stephen Hemminger
On Fri, 7 Feb 2025 15:21:45 -0800 lon...@linuxonhyperv.com wrote: > + /* At least one eth_dev is probed, init shared data */ > + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { > + rte_spinlock_lock(&mana_shared_data_lock); > + mana_local_data.primary_cnt++; > +

[PATCH] net/mana: use mana_local_data for tracking usage data for primary process

2025-02-07 Thread longli
From: Long Li The driver uses mana_shared_data for tracking usage count for primary process. This is not correct as the mana_shared_data is allocated by the primary and is meant to track usage of secondary process by the primary process. And it creates a race condition when the device is removed