The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] net: skbuff: Fix misleading comments for skb_put() and skb_push()
@ 2026-07-24 15:06 Ziran Zhang
  0 siblings, 0 replies; only message in thread
From: Ziran Zhang @ 2026-07-24 15:06 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, netdev, linux-kernel, Ziran Zhang

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>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-24 15:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24 15:06 [PATCH] net: skbuff: Fix misleading comments for skb_put() and skb_push() Ziran Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox