public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v2 0/2] Fix minimum frame size checks in vhost-user paths
@ 2026-02-23 14:10 Laurent Vivier
  2026-02-23 14:10 ` [PATCH v2 1/2] tcp_vu: vu_pad() expects l2 length Laurent Vivier
  2026-02-23 14:10 ` [PATCH v2 2/2] tcp_vu, udp_vu: Account for virtio net header in minimum frame size Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: Laurent Vivier @ 2026-02-23 14:10 UTC (permalink / raw)
  To: passt-dev; +Cc: Laurent Vivier

In the vhost-user code paths, buffers from the virtio queue include
a virtio net header prepended to the Ethernet frame.  The minimum
frame size checks (ETH_ZLEN, i.e. 60 bytes per IEEE 802.3) must
account for this extra header, otherwise the size requested from
vu_collect() and validated in ASSERT() is too small.

v2:
  - PATCH 1/2 is merged, rebase the series on top of master
  - Add a patch to remove VNET_HLEN from l2len in vu_pad() callers
  - Remove assert on ETH_ZLEN in tcp_vu_prepare() as the size is
    trimmed to the actual data size

Laurent Vivier (2):
  tcp_vu: vu_pad() expects l2 length
  tcp_vu, udp_vu: Account for virtio net header in minimum frame size

 tcp_vu.c | 17 ++++++++++-------
 udp_vu.c |  2 +-
 2 files changed, 11 insertions(+), 8 deletions(-)

-- 
2.53.0



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

end of thread, other threads:[~2026-02-23 14:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-23 14:10 [PATCH v2 0/2] Fix minimum frame size checks in vhost-user paths Laurent Vivier
2026-02-23 14:10 ` [PATCH v2 1/2] tcp_vu: vu_pad() expects l2 length Laurent Vivier
2026-02-23 14:10 ` [PATCH v2 2/2] tcp_vu, udp_vu: Account for virtio net header in minimum frame size Laurent Vivier

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).