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

2025-02-20 Thread Long Li
> The DPDK has converted to using the C11 atomic's so this should use that (i.e > RTE_ATOMIC() etc) instead of the older atomic primitives. > I have sent v3.

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

2025-02-19 Thread Stephen Hemminger
On Wed, 19 Feb 2025 12:47:11 + Wei Hu wrote: > > > > -/* Shared data between primary/secondary processes */ struct > > mana_shared_data { > > - rte_spinlock_t lock; > > - int init_done; > > - unsigned int primary_cnt; > > - unsigned int secondary_cnt; > > + rte_atomic32_t secondar

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

2025-02-19 Thread Wei Hu
> -Original Message- > From: lon...@linuxonhyperv.com > Sent: Wednesday, February 19, 2025 4:59 AM > To: Stephen Hemminger ; Wei Hu > > Cc: dev@dpdk.org; sta...@dpdk.org; Long Li > Subject: [EXTERNAL] [Patch v2] net/mana: use mana_local_data for tracking >

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

2025-02-18 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