aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2026-02-24 13:22:27 +0100
committerStefano Brivio <sbrivio@redhat.com>2026-02-24 16:31:29 +0100
commiteb3babf7b4cf3793e0ed48030db958ace6546d7e (patch)
tree27d7fe04b4e34e369edceb80e5274c8ffbfc2a4c
parent66e59418a88751ee5309bf9dfc9ce7d34e211b4e (diff)
downloadpasst-eb3babf7b4cf3793e0ed48030db958ace6546d7e.tar
passt-eb3babf7b4cf3793e0ed48030db958ace6546d7e.tar.gz
passt-eb3babf7b4cf3793e0ed48030db958ace6546d7e.tar.bz2
passt-eb3babf7b4cf3793e0ed48030db958ace6546d7e.tar.lz
passt-eb3babf7b4cf3793e0ed48030db958ace6546d7e.tar.xz
passt-eb3babf7b4cf3793e0ed48030db958ace6546d7e.tar.zst
passt-eb3babf7b4cf3793e0ed48030db958ace6546d7e.zip
tcp_vu, udp_vu: Fix comment headers for header length functions
The comment headers for tcp_vu_hdrlen() and udp_vu_hdrlen() described the return value as "the size of the header in level 2 frame", but these functions also include the virtio net header, which is not part of the L2 frame. Signed-off-by: Laurent Vivier <lvivier@redhat.com> [sbrivio: Rephrased comments a bit further] Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--tcp_vu.c4
-rw-r--r--udp_vu.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/tcp_vu.c b/tcp_vu.c
index 94169c2..171fb29 100644
--- a/tcp_vu.c
+++ b/tcp_vu.c
@@ -40,10 +40,10 @@ static struct vu_virtq_element elem[VIRTQUEUE_MAX_SIZE];
static int head[VIRTQUEUE_MAX_SIZE + 1];
/**
- * tcp_vu_hdrlen() - return the size of the header in level 2 frame (TCP)
+ * tcp_vu_hdrlen() - Sum size of all headers, from TCP to virtio-net
* @v6: Set for IPv6 packet
*
- * Return: return the size of the header
+ * Return: total size of virtio-net, Ethernet, IP, and TCP headers
*/
static size_t tcp_vu_hdrlen(bool v6)
{
diff --git a/udp_vu.c b/udp_vu.c
index d190fef..51f3718 100644
--- a/udp_vu.c
+++ b/udp_vu.c
@@ -37,10 +37,10 @@ static struct iovec iov_vu [VIRTQUEUE_MAX_SIZE];
static struct vu_virtq_element elem [VIRTQUEUE_MAX_SIZE];
/**
- * udp_vu_hdrlen() - return the size of the header in level 2 frame (UDP)
+ * udp_vu_hdrlen() - Sum size of all headers, from UDP to virtio-net
* @v6: Set for IPv6 packet
*
- * Return: return the size of the header
+ * Return: total size of virtio-net, Ethernet, IP, and UDP headers
*/
static size_t udp_vu_hdrlen(bool v6)
{