[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CY4PR1101MB2360FB8FB19B6342536FDB7090A09@CY4PR1101MB2360.namprd11.prod.outlook.com>
Date: Thu, 16 Feb 2023 14:00:04 +0000
From: "Sarkar, Tirthendu" <tirthendu.sarkar@...el.com>
To: "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>
CC: "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"Karlsson, Magnus" <magnus.karlsson@...el.com>
Subject: RE: [PATCH intel-next v3 8/8] i40e: add support for XDP multi-buffer
Rx
> From: Fijalkowski, Maciej <maciej.fijalkowski@...el.com>
> Sent: Thursday, February 16, 2023 5:37 PM
[...]
> > > > + xdp_res = i40e_run_xdp(rx_ring, xdp, xdp_prog);
> > > > +
> > > > if (xdp_res) {
> > > > - if (xdp_res & (I40E_XDP_TX | I40E_XDP_REDIR)) {
> > > > - xdp_xmit |= xdp_res;
> > > > + xdp_xmit |= xdp_res & (I40E_XDP_TX |
> > > I40E_XDP_REDIR);
> > >
> > > what was wrong with having above included in the
> > >
> > > } else if (xdp_res & (I40E_XDP_TX | I40E_XDP_REDIR)) {
> > >
> > > branch?
> > >
> >
> > For multi-buffer packets, only the first 'if' branch will be executed. We
> need to set
> > xdp_xmit for both single and multi-buffer packets.
>
> maybe pass xdp_xmit to i40e_process_rx_buffs and use it for buf_flip
> initialization? also you trimmed the code, but in there please don't
> define on-stack variables smaller than u32 (u16 next)
>
xdp_xmit may have been set by the xdp_res of a preceding packet in the current
napi call. We want to consume or flip the buffer based on only the xdp_res of current packet.
ACK for u16 -> u32.
Powered by blists - more mailing lists