Re: [PATCH net-next v7 12/14] net: lan966x: add PCIe FDMA XDP support

From: Simon Horman

Date: Thu Sep 24 2026 - 02:57:29 EST


On Fri, Sep 18, 2026 at 01:34:04PM +0200, Daniel Machon wrote:
> Add XDP support for the PCIe FDMA path. The implementation operates on
> contiguous ATU-mapped buffers with memcpy-based XDP_TX, unlike the
> platform path which uses page_pool.
>
> XDP sees the frame with IFH and FCS stripped. These are removed in
> lan966x_fdma_pci_rx_check_frame() before the BPF program runs, because
> after the program returns the driver cannot tell whether the tail
> region was modified. The skb_pull/skb_trim previously done in
> lan966x_fdma_pci_rx_get_frame() are removed for the same reason; the
> frame pointer and length are pre-computed by rx_check_frame() and
> passed through rx_get_frame() and lan966x_xdp_pci_run() to the caller.
>
> lan966x_fdma_pci_xmit_xdpf() handles XDP_TX: it rebuilds a fresh IFH
> in the TX slot, copies the post-XDP frame after it, and lets HW insert
> a new FCS.
>
> lan966x_xdp_setup() is extended so the PCIe path skips the page_pool
> reload that the platform path needs.
>
> Only XDP_ACT_BASIC is supported.
>
> Tested-by: Herve Codina <herve.codina@xxxxxxxxxxx>
> Signed-off-by: Daniel Machon <daniel.machon@xxxxxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>