Skip to content

Commit 2768b2e

Browse files
vladimirolteankuba-moo
authored andcommitted
net: enetc: register XDP RX queues with frag_size
At the time when bpf_xdp_adjust_tail() gained support for non-linear buffers, ENETC was already generating this kind of geometry on RX, due to its use of 2K half page buffers. Frames larger than 1472 bytes (without FCS) are stored as multi-buffer, presenting a need for multi buffer support to work properly even in standard MTU circumstances. Allow bpf_xdp_frags_increase_tail() to know the allocation size of paged data, so it can safely permit growing the tailroom of the buffer from XDP programs. Fixes: bf25146 ("bpf: add frags support to the bpf_xdp_adjust_tail() API") Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Wei Fang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent cc3628d commit 2768b2e

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/ethernet/freescale/enetc

1 file changed

+2
-1
lines changed

drivers/net/ethernet/freescale/enetc/enetc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3362,7 +3362,8 @@ static int enetc_int_vector_init(struct enetc_ndev_priv *priv, int i,
33623362
bdr->buffer_offset = ENETC_RXB_PAD;
33633363
priv->rx_ring[i] = bdr;
33643364

3365-
err = xdp_rxq_info_reg(&bdr->xdp.rxq, priv->ndev, i, 0);
3365+
err = __xdp_rxq_info_reg(&bdr->xdp.rxq, priv->ndev, i, 0,
3366+
ENETC_RXB_DMA_SIZE_XDP);
33663367
if (err)
33673368
goto free_vector;
33683369

0 commit comments

Comments
 (0)