From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Ziran Zhang <zhangcoder@yeah.net>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Ziran Zhang <zhangcoder@yeah.net>
Subject: Re: [PATCH] net: skbuff: Fix misleading comments for skb_put() and skb_push()
Date: Sat, 25 Jul 2026 03:15:29 -0400 [thread overview]
Message-ID: <willemdebruijn.kernel.32ecf4de53a33@gmail.com> (raw)
In-Reply-To: <20260724150659.6100-1-zhangcoder@yeah.net>
Ziran Zhang wrote:
> Both functions only move the tail/data pointer, they do not copy data.
> Update the function descriptions and @len parameter, so they can accurately
> reflect the semantics.
>
> Signed-off-by: Ziran Zhang <zhangcoder@yeah.net>
This seems subjective and superfluous to me. Certainly not a fix. No
mention of copy is made in the existing comments.
> ---
> net/core/skbuff.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 18dabb4e9..35ad782ad 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -2614,9 +2614,9 @@ void *pskb_put(struct sk_buff *skb, struct sk_buff *tail, int len)
> EXPORT_SYMBOL_GPL(pskb_put);
>
> /**
> - * skb_put - add data to a buffer
> + * skb_put - extend the data area at the tail of a buffer
> * @skb: buffer to use
> - * @len: amount of data to add
> + * @len: number of bytes to extend
> *
> * This function extends the used data area of the buffer. If this would
> * exceed the total buffer size the kernel will panic. A pointer to the
> @@ -2635,9 +2635,9 @@ void *skb_put(struct sk_buff *skb, unsigned int len)
> EXPORT_SYMBOL(skb_put);
>
> /**
> - * skb_push - add data to the start of a buffer
> + * skb_push - extend the data area at the start of a buffer
> * @skb: buffer to use
> - * @len: amount of data to add
> + * @len: number of bytes to extend
> *
> * This function extends the used data area of the buffer at the buffer
> * start. If this would exceed the total buffer headroom the kernel will
> --
> 2.43.0
>
prev parent reply other threads:[~2026-07-25 7:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 15:06 Ziran Zhang
2026-07-25 7:15 ` Willem de Bruijn [this message]
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=willemdebruijn.kernel.32ecf4de53a33@gmail.com \
--to=willemdebruijn.kernel@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=zhangcoder@yeah.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®