[EXTERNAL] [PATCH v4 15/27] net/netvsc: replace rte_atomic32 with stdatomic
Stephen Hemminger
stephen at networkplumber.org
Thu Jun 25 04:32:36 CEST 2026
On Wed, 27 May 2026 00:29:55 +0000
Long Li <longli at microsoft.com> wrote:
> > do {
> > - rid = rte_atomic32_add_return(&hv->rndis_req_id, 1);
> > + rid = rte_atomic_fetch_add_explicit(&hv->rndis_req_id, 1,
> > +
> > rte_memory_order_seq_cst);
>
> Does rte_atomic_fetch_add_explicit() return the old value of hv->rndis_req_id? If yes this is not correct, as the rte_atomic32_add_return() used to return the new value.
This is a request id, it doesn't really matter if it is old value or new one as long as it is consistenly used.
Optionally could just add one to the result.
Also not clear if sequential consistent order is needed here. There are not other dependent loads or stores.
More information about the dev
mailing list