From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com [209.85.128.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9029C1E0B9C for ; Sat, 25 Jul 2026 07:15:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784963734; cv=none; b=BZL1bLHH+NC3kQimQbWpCWoao01Lw3HjleybZqEqjKPNzJeA5ZMzaGWB12c/OwY8fpkKnSy7YCKm96rXTZ9z4ijNL4bqxGQvnkGI7H8SSVkUpmX5j1ZadYPjtFYsv6Y0xu05bSdsQEtU/LIhJNOL6U1sXMSA38JZ2PNoipkFxyw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784963734; c=relaxed/simple; bh=iT1PpgEXBh2eSj9Am9NOwlr3KVFNbywVX6yMief9tNs=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: Mime-Version:Content-Type; b=WxF5Uy+Kma8tSvLnWy7lMrPqVvnWhIntRKGEyo+Jqvt1v/h9X+4tCahBJ1XeAku5deQ8862RwqrmvpFbjTLrdSX3Nz5DCzz4CxW0xII7RB/hTKxOMv6VTHbYffDCXS5Bk+tebmEHTrbMvwnv7ToUM/9XiRnxaSSE5ZAOg0phlo8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dsBnRBIX; arc=none smtp.client-ip=209.85.128.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dsBnRBIX" Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-81e6f0b4610so10011757b3.2 for ; Sat, 25 Jul 2026 00:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784963731; x=1785568531; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:subject :references:in-reply-to:message-id:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to:content-type; bh=vzVzJZS3OAbAuoAbfHflezUlm74CWBmWTbuWTGzELfQ=; b=dsBnRBIXMZLppPuVn1PP54gBTKXAo4ITl3erobSnZKvikqqNbZLIoZej5IlsaZdDsI HmmUPqDtovoU2sH/QlHk0mhLnO+OTnCd5Ok/LQBZ6jguY/WiTemzD4db2m2IVU/St5qx Fn1bHwgRDkW4ozfUtSu1HNZF9egbtY8rNBu7jSyXVmYQaS6MkMUUs8SZ+YyNlCvRw0Y1 dWowIkDFRDPe8ewe6LxEbJQ1CruHxOejUITBM80z9TxBXk8sdZvBy3gMcBjc498Bv7Eu 3O7Ld98m5wfA91Y3eu+Gv0XzlMNgRSMWjCyxRuewg0r1lErW6oO/atgNUOzS/LtOjXnH EEBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784963731; x=1785568531; h=content-transfer-encoding:content-type:mime-version:subject :references:in-reply-to:message-id:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=vzVzJZS3OAbAuoAbfHflezUlm74CWBmWTbuWTGzELfQ=; b=WUIUxZrUu4RVPcwq4uNi/SdIq193EpTAxTOoJNaRvmgtDPDsQFoXwQlCko3lXqRird 99EtPum2fZf9fiKU6JdDpyvJDd9QHk/gJzjc03gTIBiutIrHFIxr8nG5MIas/hMpk+vI p3wGpo74EzuMB/0+K7RoP14u8iUyxdVlyOj1tegWvgfDzJn6vQautLgX86OzPWpI7nlJ cfMVZSvai1FoYSY7fvbzhxLIdXAEPGYWPpSbnnx+waMVmDuezgDyXHXsdzCMp9eLaqho Ke+ZF2JjVVc6rkkciJHWhjybduHrKHZeB+F1iqqhiTipg60lAy/98R1MMkx3bd32K8Oe EB9w== X-Forwarded-Encrypted: i=1; AHgh+RpVk5qIVauiYQbdA5IAZskngSkTPJxTDC9AwKjdUlPgJbKv5Yj6f9yq2JbCesLJBaqVPznAHutWuaUpByk=@vger.kernel.org X-Gm-Message-State: AOJu0Yx5FYMbQD/wXG7sGd3PcfOTQ5W8uiqiOv0PpTXGNP2BYi6UnjNT 8K4igdBsUgibvjd8Idc3Dstli3aH/T52lVtmV7awcmeqkSFO3K0nzLiQ X-Gm-Gg: AR+sD115+/wl1sekh/iMxgjmpk+IydSNliEDpPshbc60f/6RL6a+EZEwbqkBqD/msON LG33NETjYNJU4mCnu9EUtcyKlrS4optRxJ5AfLvJn9inrPGEuexWWqFuTr+8VFEkpRD9uGUIuDS 83qyAJ/FVruLKoBmRsVgjxEHdJHgTEiY0vuK7kOrF1nr8OJkYUUszjVDrbg4/qDuaF0qjJBYbzf LBZJwqx3+DyBjp2RZ6sLQ+REX53dX4BDOEQNoz4xdFSCzGnEy4O1oywDFOS4aUjLeGqxKJSLj+t 1ikYZ9YEH8BpC7xOTZg5ClsADTJjZvOLLCV+pvgZjEn/cPyKghJTHuznI0dDJijgLBKP+NSqNYZ TlnTwqnH90mFVCeDFToSdJlWDfeIcug0Iw/Ki6uQUlnW2GXsRWb9d/1uCcDcggKiN1C77utN6YI vRaF/Sh/E1tPrhd9hc797H54h09g5nxVeYErrcsHcn+UP65N440i3Y4bM= X-Received: by 2002:a05:690c:692:b0:80c:c6f:1b4b with SMTP id 00721157ae682-81f69ccb5dcmr4775427b3.12.1784963731502; Sat, 25 Jul 2026 00:15:31 -0700 (PDT) Received: from gmail.com (172.235.85.34.bc.googleusercontent.com. [34.85.235.172]) by smtp.gmail.com with ESMTPSA id 00721157ae682-81f65774b0dsm10082567b3.1.2026.07.25.00.15.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jul 2026 00:15:30 -0700 (PDT) Date: Sat, 25 Jul 2026 03:15:29 -0400 From: Willem de Bruijn To: Ziran Zhang , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ziran Zhang Message-ID: In-Reply-To: <20260724150659.6100-1-zhangcoder@yeah.net> References: <20260724150659.6100-1-zhangcoder@yeah.net> Subject: Re: [PATCH] net: skbuff: Fix misleading comments for skb_put() and skb_push() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 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 >