On Wed, 27 May 2026 00:29:55 +0000
Long Li <[email protected]> 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.