RE: [PATCH intel-next v3 8/8] i40e: add support for XDP multi-buffer Rx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Fijalkowski, Maciej <maciej.fijalkowski@xxxxxxxxx>
> 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.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux