From: David Gibson <david@gibson.dropbear.id.au>
To: passt-dev@passt.top, Jon Maloy <jmaloy@redhat.com>,
Stefano Brivio <sbrivio@redhat.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH v2] tap: Update some function comments for accuracy
Date: Mon, 13 Oct 2025 10:49:41 +1100 [thread overview]
Message-ID: <20251012234941.1433683-1-david@gibson.dropbear.id.au> (raw)
Several of the tap_push_*() functions have doc comments claiming they take
the context pointer, but don't. Some (tap_push_uh[46]) were broken fairly
recently, but others (tap_push_ip[46]h) have been broken for a long time.
Regardless, fix all the doc comments.
Reported-by: Stefano Brivio <sbrivio@redhat.com>
Fixes: 82a839be9 ("tap: break out building of udp header from tap_udp4_send function")
Fixes: 87e6a4644 ("tap: break out building of udp header from tap_udp6_send function")
Fixes: 2dbc622f5 ("tap: Split tap_ip4_send() into UDP and ICMP variants")
Fixes: 9d8dd8b6f ("tap: Split tap_ip6_send() into UDP and ICMP variants")
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
tap.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
v2:
* Added missing "Fixes" tags from v1's commit message.
diff --git a/tap.c b/tap.c
index 95d309bd..f3d1f660 100644
--- a/tap.c
+++ b/tap.c
@@ -188,7 +188,7 @@ void *tap_push_l2h(const struct ctx *c, void *buf, uint16_t proto)
/**
* tap_push_ip4h() - Build IPv4 header for inbound packet, with checksum
- * @c: Execution context
+ * @ip4h: Buffer in which to build the IPv4 header
* @src: IPv4 source address
* @dst: IPv4 destination address
* @l4len: IPv4 payload length
@@ -217,7 +217,7 @@ void *tap_push_ip4h(struct iphdr *ip4h, struct in_addr src,
/**
* tap_push_uh4() - Build UDPv4 header with checksum
- * @c: Execution context
+ * @uh: Buffer in which to build the UDP header
* @src: IPv4 source address
* @sport: UDP source port
* @dst: IPv4 destination address
@@ -293,7 +293,7 @@ void tap_icmp4_send(const struct ctx *c, struct in_addr src, struct in_addr dst,
/**
* tap_push_ip6h() - Build IPv6 header for inbound packet
- * @c: Execution context
+ * @ip6h: Buffer in which to build the IPv6 header
* @src: IPv6 source address
* @dst: IPv6 destination address
* @l4len: L4 payload length
@@ -319,7 +319,7 @@ void *tap_push_ip6h(struct ipv6hdr *ip6h,
/**
* tap_push_uh6() - Build UDPv6 header with checksum
- * @c: Execution context
+ * @uh: Buffer in which to build the UDP header
* @src: IPv6 source address
* @sport: UDP source port
* @dst: IPv6 destination address
--
2.51.0
next reply other threads:[~2025-10-12 23:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-12 23:49 David Gibson [this message]
2025-10-15 23:46 ` Stefano Brivio
2025-10-16 0:47 ` David Gibson
2025-10-28 23:13 ` Stefano Brivio
2025-10-29 0:25 ` 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=20251012234941.1433683-1-david@gibson.dropbear.id.au \
--to=david@gibson.dropbear.id.au \
--cc=jmaloy@redhat.com \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/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).