Re: mbuf quueue lockless access

2023-05-04 Thread David Gwynne
> On 4 May 2023, at 20:52, Alexander Bluhm wrote: > > Hi, > > The mbuf_queue API allows read access to integer variables which > another CPU may change simultaneously. To prevent miss-optimisations > by the compiler, they need the READ_ONCE() macro. Otherwise there > could be two read opera

mbuf quueue lockless access

2023-05-04 Thread Alexander Bluhm
Hi, The mbuf_queue API allows read access to integer variables which another CPU may change simultaneously. To prevent miss-optimisations by the compiler, they need the READ_ONCE() macro. Otherwise there could be two read operations with inconsistent values. Writing to integer in mq_set_maxlen(