[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<MN6PR18MB54664C5630DDD9D2D1380495D382A@MN6PR18MB5466.namprd18.prod.outlook.com>
Date: Fri, 9 Jan 2026 14:25:39 +0000
From: Vimlesh Kumar <vimleshk@...vell.com>
To: Paolo Abeni <pabeni@...hat.com>,
"netdev@...r.kernel.org"
<netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
CC: Sathesh B Edara <sedara@...vell.com>,
Shinas Rasheed
<srasheed@...vell.com>,
Haseeb Gani <hgani@...vell.com>,
Veerasenareddy Burru
<vburru@...vell.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller"
<davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>,
Satananda Burla <sburla@...vell.com>,
Abhijit Ayarekar
<aayarekar@...vell.com>
Subject: RE: [EXTERNAL] Re: [PATCH net v1 1/2] octeon_ep: avoid compiler and
IQ/OQ reordering
> -----Original Message-----
> From: Paolo Abeni <pabeni@...hat.com>
> Sent: Monday, December 29, 2025 9:45 PM
> To: Vimlesh Kumar <vimleshk@...vell.com>; netdev@...r.kernel.org; linux-
> kernel@...r.kernel.org
> Cc: Sathesh B Edara <sedara@...vell.com>; Shinas Rasheed
> <srasheed@...vell.com>; Haseeb Gani <hgani@...vell.com>;
> Veerasenareddy Burru <vburru@...vell.com>; Andrew Lunn
> <andrew+netdev@...n.ch>; David S. Miller <davem@...emloft.net>; Eric
> Dumazet <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>;
> Satananda Burla <sburla@...vell.com>; Abhijit Ayarekar
> <aayarekar@...vell.com>
> Subject: [EXTERNAL] Re: [PATCH net v1 1/2] octeon_ep: avoid compiler and
> IQ/OQ reordering
> On 12/19/25 8:29 AM, Vimlesh Kumar wrote:
> > Utilize READ_ONCE and WRITE_ONCE APIs for IO queue Tx/Rx variable
> > access to prevent compiler optimization and reordering.
> > Additionally, ensure IO queue OUT/IN_CNT registers are flushed by
> > performing a read-back after writing.
>
> Please explain why such _ONCE() annotation are required, and what could be
> reordered otherwise.
>
> I don't think they are needed,
>
We use READ_ONCE and WRITE_ONCE APIs in the data path to prevent the compiler from optimizing or reordering read/write operations.
The APIs are used to access RX and TX queue counter fields that are shared between the Octeon hardware device and its device driver. These APIs ensure that the driver always reads the most current values from the hardware for various RX and TX counter fields. Additionally, they prevent the compiler from optimizing or reordering read/write operations on these counter fields.
> /P
Powered by blists - more mailing lists