From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>,
Laurent Vivier <lvivier@redhat.com>
Subject: [PATCH v3 0/5] Pad all inbound frames to 802.3 minimum size if needed
Date: Sat, 6 Dec 2025 02:26:52 +0100 [thread overview]
Message-ID: <20251206012657.553742-1-sbrivio@redhat.com> (raw)
Patch 1/5 handles the easy non-batched case with a copy to a padded
buffer (only if needed).
Patches 2/5 and 3/5 clean coding style up before further changes.
Patch 4/5 deals with TCP and UDP batched frames in non-vhost-user modes.
Patch 5/5 is for batched frames in vhost-user mode instead.
v3:
* in 4/5, add calls to tap_hdr_update() from UDP and TCP code to actually
update the frame length descriptors after padding
* refactor 5/5 entirely based on David's feedback: assume that the first
buffer supplied by the guest is at least 60 bytes long, and introduce
a vu_pad() common function for both TCP and UDP. Don't recalculate
l2len in it, as all the callers already do.
v2:
* in 1/5, calculate vnet_len *after* padding
* in 5/5:
- pass the right pointers to memset()
- explicitly request at least ETH_ZLEN bytes from vu_collect()
Stefano Brivio (5):
tap: Pad non-batched frames to 802.3 minimum (60 bytes) if needed
tcp: Fix coding style for comment to enum tcp_iov_parts
udp: Fix coding style for comment to enum udp_iov_idx
tcp, udp: Pad batched frames to 60 bytes (802.3 minimum) in
non-vhost-user modes
tcp, udp: Pad batched frames for vhost-user modes to 60 bytes (802.3
minimum)
tap.c | 11 ++++++++++-
tcp.c | 2 +-
tcp_buf.c | 23 +++++++++++++++++++++++
tcp_internal.h | 4 +++-
tcp_vu.c | 17 ++++++++++++-----
udp.c | 43 +++++++++++++++++++++++++++++++++++--------
udp_vu.c | 8 ++++++--
util.c | 3 +++
util.h | 3 +++
vu_common.c | 14 ++++++++++++++
vu_common.h | 1 +
11 files changed, 111 insertions(+), 18 deletions(-)
--
2.43.0
next reply other threads:[~2025-12-06 1:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-06 1:26 Stefano Brivio [this message]
2025-12-06 1:26 ` [PATCH v3 1/5] tap: Pad non-batched frames to 802.3 minimum (60 bytes) " Stefano Brivio
2025-12-06 1:26 ` [PATCH v3 2/5] tcp: Fix coding style for comment to enum tcp_iov_parts Stefano Brivio
2025-12-06 1:26 ` [PATCH v3 3/5] udp: Fix coding style for comment to enum udp_iov_idx Stefano Brivio
2025-12-06 1:26 ` [PATCH v3 4/5] tcp, udp: Pad batched frames to 60 bytes (802.3 minimum) in non-vhost-user modes Stefano Brivio
2025-12-08 2:04 ` David Gibson
2025-12-06 1:26 ` [PATCH v3 5/5] tcp, udp: Pad batched frames for vhost-user modes to 60 bytes (802.3 minimum) Stefano Brivio
2025-12-08 2:16 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251206012657.553742-1-sbrivio@redhat.com \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).