Skip to content

net: mvpp2: fix XDP RX buffer handling

Til Kaiser bpf netdev 4 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 0 repliesApplied 4/4
  2. v44 patches 0 repliesSuperseded
  3. v34 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v24 patches3 repliesSuperseded

Changes in v5 from the cover letter

- Kept a separate page-pool recycle sync length for skb allocation failure, which must stay tied to the received buffer range.

Patches in v5 All 4 applied

#Subject and filesSizeRepliesApplied
1/4net: mvpp2: sync RX data at the hardware packet offsetdrivers/net/ethernet/marvell/mvpp2/mvpp2_main.c+4 -30 repliesApplied
2/4net: mvpp2: limit XDP frame size to the RX bufferdrivers/net/ethernet/marvell/mvpp2/mvpp2_main.c+1 -10 repliesApplied
3/4net: mvpp2: refill RX buffers before XDP or skb usedrivers/net/ethernet/marvell/mvpp2/mvpp2_main.c+24 -190 repliesApplied
4/4net: mvpp2: build skb from XDP-adjusted data on XDP_PASSdrivers/net/ethernet/marvell/mvpp2/mvpp2_main.c+15 -60 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH net v5 0/4] net: mvpp2: fix XDP RX buffer handling

This is v5 of the earlier XDP_PASS fix. The XDP_PASS change is retained, and the series also fixes related RX/XDP buffer handling issues found during review.

Tested with tools/testing/selftests/drivers/net/xdp.py on mvpp2 hardware.

---
v1: https://lore.kernel.org/all/[email protected]/
v2: https://lore.kernel.org/all/[email protected]/
v3: https://lore.kernel.org/all/[email protected]/
v4: https://lore.kernel.org/all/[email protected]/

Changes in v5:
- Kept a separate page-pool recycle sync length for skb allocation failure, which must stay tied to the received buffer range.

Changes in v4:
- Reposted as a new independent thread, no code changes.

Changes in v3:
- Reworked RX refill failure handling to preserve BM pool depth by refilling before the current buffer is consumed by XDP or an skb.

Changes in v2:
- Fixed RX DMA sync range to account for RX headroom.
- Limited XDP frame size to the actual RX buffer size.
- Fixed refill error paths so retired buffers are not returned to BM.

Til Kaiser (4):
net: mvpp2: sync RX data at the hardware packet offset
net: mvpp2: limit XDP frame size to the RX buffer
net: mvpp2: refill RX buffers before XDP or skb use
net: mvpp2: build skb from XDP-adjusted data on XDP_PASS

 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   | 67 ++++++++++++-------
 1 file changed, 41 insertions(+), 26 deletions(-)
Signature · 1 line
2.54.0