linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] virtio-net: xsk: rx: fix the frame's length check
@ 2025-06-15 15:13 Bui Quang Minh
  2025-06-15 15:13 ` [PATCH net 1/2] " Bui Quang Minh
  2025-06-15 15:13 ` [PATCH net 2/2] virtio-net: xsk: rx: move the xdp->data adjustment to buf_to_xdp() Bui Quang Minh
  0 siblings, 2 replies; 6+ messages in thread
From: Bui Quang Minh @ 2025-06-15 15:13 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, virtualization,
	linux-kernel, bpf, Bui Quang Minh

Hi everyone,

This series contains 2 patches for the zerocopy XDP receive path in virtio
net
- Patch 1: there is a difference between first buffer and the following
buffers in this receive path. While the first buffer contains virtio
header, the following ones do not. So the length of the remaining region
for frame data is also different in 2 cases. The current maximum frame's
length check is only correct for the following buffers not the first one.
- Patch 2: no functional change. The tricky xdp->data adjustment due to
the above difference is moved to buf_to_xdp() so that this helper contains
all logic to build xdp_buff and the tricky adjustment does not scatter
over different functions.

Thanks,
Quang Minh.

Bui Quang Minh (2):
  virtio-net: xsk: rx: fix the frame's length check
  virtio-net: xsk: rx: move the xdp->data adjustment to buf_to_xdp()

 drivers/net/virtio_net.c | 46 ++++++++++++++++++++++++++++++++++------
 1 file changed, 40 insertions(+), 6 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2025-06-19 15:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-15 15:13 [PATCH net 0/2] virtio-net: xsk: rx: fix the frame's length check Bui Quang Minh
2025-06-15 15:13 ` [PATCH net 1/2] " Bui Quang Minh
2025-06-19  2:11   ` Jakub Kicinski
2025-06-19 14:17     ` Bui Quang Minh
2025-06-19 15:26       ` Jakub Kicinski
2025-06-15 15:13 ` [PATCH net 2/2] virtio-net: xsk: rx: move the xdp->data adjustment to buf_to_xdp() Bui Quang Minh

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).