Re: [PATCH net-next 3/4] igb: add AF_XDP zero-copy Rx support

Maciej Fijalkowski
2024-08-10T14:12:17Z

On Sat, Aug 10, 2024 at 03:55:10PM +0200, Maciej Fijalkowski wrote:
> On Thu, Aug 08, 2024 at 11:35:53AM -0700, Tony Nguyen wrote:
> > From: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
> >
> > Add support for AF_XDP zero-copy receive path.
> >
> > When AF_XDP zero-copy is enabled, the rx buffers are allocated from the
> > xsk buff pool using igb_alloc_rx_buffers_zc.
> >
> > Use xsk_pool_get_rx_frame_size to set SRRCTL rx buf size when zero-copy
> > is enabled.
> >
> > Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
> > [Kurt: Port to v6.10 and provide napi_id for xdp_rxq_info_reg()]
> > Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> > Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel)
> > Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> > ---

> > netdev->priv_flags |= IFF_UNICAST_FLT;
> > - netdev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT;
> > + netdev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT |
> > + NETDEV_XDP_ACT_XSK_ZEROCOPY;
> >

Also please set this on last patch as this opens us to a state where
AF_XDP ZC is enabled but there is no Tx ZC yet.