Re: [PATCH v2 38/45] bus/vmbus: use rte stdatomic API

2024-03-25 Thread Tyler Retzlaff
On Fri, Mar 22, 2024 at 07:34:46PM +, Long Li wrote: > > static inline void > > vmbus_set_monitor(const struct vmbus_channel *channel, uint32_t monitor_id) > > { > > - uint32_t *monitor_addr, monitor_mask; > > + RTE_ATOMIC(uint32_t) *monitor_addr, monitor_mask; > > Does this mean monitor

RE: [PATCH v2 38/45] bus/vmbus: use rte stdatomic API

2024-03-22 Thread Long Li
> static inline void > vmbus_set_monitor(const struct vmbus_channel *channel, uint32_t monitor_id) > { > - uint32_t *monitor_addr, monitor_mask; > + RTE_ATOMIC(uint32_t) *monitor_addr, monitor_mask; Does this mean monitor_mask will also change to RTE_ATOMIC(uint32_t)? Seems not necessa

RE: [PATCH v2 38/45] bus/vmbus: use rte stdatomic API

2024-03-22 Thread Long Li
> > The usage is okay. The value is used to notify the VSP (Hyper-V). It's > > always set > (no read) from DPDK. > > > > OK, so my question was not "does it need to be atomic", but rather "why isn't > it > marked RTE_ATOMIC() when it's treated as atomic". > > But what you are saying is that i

Re: [PATCH v2 38/45] bus/vmbus: use rte stdatomic API

2024-03-22 Thread Mattias Rönnblom
On 2024-03-21 22:34, Long Li wrote: static inline void vmbus_set_monitor(const struct vmbus_channel *channel, uint32_t monitor_id) { - uint32_t *monitor_addr, monitor_mask; + RTE_ATOMIC(uint32_t) *monitor_addr, monitor_mask; unsigned int trigger_index; tr

RE: [PATCH v2 38/45] bus/vmbus: use rte stdatomic API

2024-03-21 Thread Long Li
> > static inline void > > vmbus_set_monitor(const struct vmbus_channel *channel, uint32_t > monitor_id) > > { > > - uint32_t *monitor_addr, monitor_mask; > > + RTE_ATOMIC(uint32_t) *monitor_addr, monitor_mask; > > unsigned int trigger_index; > > > > trigger_index = monitor_id /

Re: [PATCH v2 38/45] bus/vmbus: use rte stdatomic API

2024-03-21 Thread Mattias Rönnblom
On 2024-03-21 20:17, Tyler Retzlaff wrote: Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional rte stdatomic API. Signed-off-by: Tyler Retzlaff --- drivers/bus/vmbus/vmbus_channel.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-)

[PATCH v2 38/45] bus/vmbus: use rte stdatomic API

2024-03-21 Thread Tyler Retzlaff
Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional rte stdatomic API. Signed-off-by: Tyler Retzlaff --- drivers/bus/vmbus/vmbus_channel.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/bus/vmbus/vmbus_channel.c