Subject: Re: [PATCH net-next v4 4/6] net: bcmgenet: add XDP_TX support

From: Jakub Kicinski <[email-masked]>
Date: Tue, 24 Mar 2026 21:03:42 -0700

On Mon, 23 Mar 2026 13:05:33 +0100 Nicolai Buchwitz wrote:
> Implement XDP_TX using ring 16 (DESC_INDEX), the hardware default
> descriptor ring, dedicated to XDP TX for isolation from SKB TX queues.
> 
> Ring 16 gets 32 BDs carved from ring 0's allocation. TX completion is
> piggybacked on RX NAPI poll since ring 16's INTRL2_1 bit collides with
> RX ring 0, similar to how bnxt, ice, and other XDP drivers handle TX
> completion within the RX poll path.
> 
> The GENET MAC has TBUF_64B_EN set globally, requiring every TX buffer
> to start with a 64-byte struct status_64 (TSB). For local XDP_TX, the
> TSB is prepended by backing xdp->data into the RSB area (unused after
> BPF execution) and zeroing it. For foreign frames redirected from other
> devices, the TSB is written into the xdp_frame headroom.
> 
> The page_pool DMA direction is changed from DMA_FROM_DEVICE to
> DMA_BIDIRECTIONAL to allow TX reuse of the existing DMA mapping.

drivers/net/ethernet/broadcom/genet/bcmgenet.c:2420:27: warning: variable 'tx_ring' set but not used [-Wunused-but-set-variable]
 2420 |         struct bcmgenet_tx_ring *tx_ring;
      |                                  ^
-- 
pw-bot: cr