aboutgitcodebugslistschat
path: root/doc
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2025-11-03 11:16:08 +0100
committerStefano Brivio <sbrivio@redhat.com>2025-12-08 04:46:55 +0100
commit1e519715240eb8b7ca5ae1b1b0a796a337aa1620 (patch)
tree5ceb0d6291461c2d5ea0e47662dc4a7f0836a147 /doc
parent822ce0948656b6ff293b650c7aef900841193fa3 (diff)
downloadpasst-1e519715240eb8b7ca5ae1b1b0a796a337aa1620.tar
passt-1e519715240eb8b7ca5ae1b1b0a796a337aa1620.tar.gz
passt-1e519715240eb8b7ca5ae1b1b0a796a337aa1620.tar.bz2
passt-1e519715240eb8b7ca5ae1b1b0a796a337aa1620.tar.lz
passt-1e519715240eb8b7ca5ae1b1b0a796a337aa1620.tar.xz
passt-1e519715240eb8b7ca5ae1b1b0a796a337aa1620.tar.zst
passt-1e519715240eb8b7ca5ae1b1b0a796a337aa1620.zip
tap: Pad non-batched frames to 802.3 minimum (60 bytes) if needed
IEEE 802.3 requires a minimum frame payload of 46 bytes, without a 802.1Q tag. Add padding for the simple tap_send_single() case using a zero-filled 60-byte buffer and copying data to it if needed. In theory, we could add a further element in the iovec array, say: uint8_t padding[ETH_ZLEN] = { 0 }; struct iovec iov[3]; ... if (l2len < ETH_ZLEN) { iov[iovcnt].iov_base = (void *)padding; iov[iovcnt].iov_len = ETH_ZLEN - l2len; iovcnt++; } and avoid a copy, but that would substantially complicate the vhost-user path, and it's questionable whether passing a reference to a further buffer actually causes lower overhead than the simple copy. Link: https://bugs.passt.top/show_bug.cgi?id=166 Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions