linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/4] virtio-net: fixes for mergeable XDP receive path
@ 2025-06-25 16:08 Bui Quang Minh
  2025-06-25 16:08 ` [PATCH net 1/4] virtio-net: ensure the received length does not exceed allocated size Bui Quang Minh
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Bui Quang Minh @ 2025-06-25 16:08 UTC (permalink / raw)
  To: netdev
  Cc: Michael S. Tsirkin, Jason Wang, Xuan Zhuo, Eugenio Pérez,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
	Jesper Dangaard Brouer, John Fastabend, Stanislav Fomichev,
	virtualization, linux-kernel, bpf, Bui Quang Minh

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-06-27  2:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-25 16:08 [PATCH net 0/4] virtio-net: fixes for mergeable XDP receive path Bui Quang Minh
2025-06-25 16:08 ` [PATCH net 1/4] virtio-net: ensure the received length does not exceed allocated size Bui Quang Minh
2025-06-26  2:34   ` Jason Wang
2025-06-26 15:34     ` Bui Quang Minh
2025-06-27  2:42       ` Jason Wang
2025-06-25 16:08 ` [PATCH net 2/4] virtio-net: remove redundant truesize check with PAGE_SIZE Bui Quang Minh
2025-06-26  2:37   ` Jason Wang
2025-06-25 16:08 ` [PATCH net 3/4] virtio-net: create a helper to check received mergeable buffer's length Bui Quang Minh
2025-06-26  2:38   ` Jason Wang
2025-06-26 15:37     ` Bui Quang Minh
2025-06-27  2:43       ` Jason Wang
2025-06-25 16:08 ` [PATCH net 4/4] virtio-net: allow more allocated space for mergeable XDP Bui Quang Minh
2025-06-26  2:51   ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).