diff options
| author | Laurent Vivier <lvivier@redhat.com> | 2026-02-23 15:10:27 +0100 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-02-24 12:06:03 +0100 |
| commit | 8636c73a5f1af1fa066a55e48a020852339dfe6e (patch) | |
| tree | 2b41265e0a88579afb5c3f8c16b5e95ef1ebb048 /test/lib | |
| parent | de5b69491fdd95bd7d997a4b7c2972bd3ceb1101 (diff) | |
| download | passt-8636c73a5f1af1fa066a55e48a020852339dfe6e.tar passt-8636c73a5f1af1fa066a55e48a020852339dfe6e.tar.gz passt-8636c73a5f1af1fa066a55e48a020852339dfe6e.tar.bz2 passt-8636c73a5f1af1fa066a55e48a020852339dfe6e.tar.lz passt-8636c73a5f1af1fa066a55e48a020852339dfe6e.tar.xz passt-8636c73a5f1af1fa066a55e48a020852339dfe6e.tar.zst passt-8636c73a5f1af1fa066a55e48a020852339dfe6e.zip | |
tcp_vu, udp_vu: Account for virtio net header in minimum frame size
In the vhost-user paths, the buffers provided by the virtio queue
include the virtio net header (VNET_HLEN) prepended to the Ethernet
frame. The minimum size checks using ETH_ZLEN must therefore account
for this additional header length, otherwise we underestimate the
minimum buffer size needed.
Use ETH_ZLEN + VNET_HLEN instead of bare ETH_ZLEN in vu_collect()
calls and the corresponding ASSERT() checks.
In tcp_vu_prepare(), revert the ASSERT to just check for hdrlen,
because at that point iov[0].iov_len has been trimmed to the actual
received data size plus headers.
Fixes: 0cb8f9003654 ("tcp, udp: Pad batched frames for vhost-user modes to 60 bytes (802.3 minimum)")
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/lib')
0 files changed, 0 insertions, 0 deletions
