Commit f8e18abf authored by Larysa Zaremba's avatar Larysa Zaremba Committed by Jakub Kicinski
Browse files

net: enetc: use truesize as XDP RxQ info frag_size



The only user of frag_size field in XDP RxQ info is
bpf_xdp_frags_increase_tail(). It clearly expects truesize instead of DMA
write size. Different assumptions in enetc driver configuration lead to
negative tailroom.

Set frag_size to the same value as frame_sz.

Fixes: 2768b2e2 ("net: enetc: register XDP RX queues with frag_size")
Reviewed-by: default avatarAleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarLarysa Zaremba <larysa.zaremba@intel.com>
Link: https://patch.msgid.link/20260305111253.2317394-9-larysa.zaremba@intel.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 75d92289
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3467,7 +3467,7 @@ static int enetc_int_vector_init(struct enetc_ndev_priv *priv, int i,
	priv->rx_ring[i] = bdr;

	err = __xdp_rxq_info_reg(&bdr->xdp.rxq, priv->ndev, i, 0,
				 ENETC_RXB_DMA_SIZE_XDP);
				 ENETC_RXB_TRUESIZE);
	if (err)
		goto free_vector;