Thread (13 messages) 13 messages, 2 authors, 2025-06-27
STALE347d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH net 0/4] virtio-net: fixes for mergeable XDP receive path

From: Bui Quang Minh <hidden>
Date: 2025-06-25 16:09:58
Also in: bpf, lkml, virtualization

Hi everyone,

This series contains fixes for XDP receive path in virtio-net
- Patch 1: add a missing check for the received data length with our
allocated buffer size in mergeable mode
- Patch 2: remove a redundant truesize check with PAGE_SIZE in mergeable
mode
- Patch 3: add a helper for mergeable received data length check to avoid
repeated code
- Patch 4: fix the flaky drivers/net/ping.py selftest due to frame drop
when the receive buffer is prefilled before XDP is set but is used after
XDP is set. It's because of current restriction that
headroom + frame's length + tailroom < PAGE_SIZE. XDP does not have this
restriction, so we can lift the restriction here and continue processing
the frame.

Thanks,
Quang Minh.

Bui Quang Minh (4):
  virtio-net: ensure the received length does not exceed allocated size
  virtio-net: remove redundant truesize check with PAGE_SIZE
  virtio-net: create a helper to check received mergeable buffer's
    length
  virtio-net: allow more allocated space for mergeable XDP

 drivers/net/virtio_net.c | 91 ++++++++++++++++++++++++----------------
 1 file changed, 54 insertions(+), 37 deletions(-)

-- 
2.43.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help