From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f73.google.com (mail-qv1-f73.google.com [209.85.219.73]) (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 949B430CDB4 for ; Fri, 21 Nov 2025 08:33:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763713984; cv=none; b=lLiZbMbyHktOq267/mrD7lRMscOoTub6nNoImQE+QeH5WcPMDatF0hEtFatUTPHXlrZljH0M85h1cKJvPrd9rzfUQD7yIIIaHWZRkUJyIBV4NMvw0nuprxSq615uSqjzXv7Z4amDGQaCiYBnzN+cS56kh5R8+Gp8YTAzCqgvbv4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763713984; c=relaxed/simple; bh=C49va+BzgB/UJ6l5+tp/3TPlTRfd/HtkETgoZYhVdLw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Q3bt4CjH0o4KujwdvMfVb/q4y1Hv2k4soXIwBcjh2ULeLpmyd1MtiUIGOXQij+tA2VCxZcxvO8uiDqMwE6zDsORlH3iHDF96zk2LsjtrcqvuMY0a89n6+gQqj8XnPRwQfZWtqA8VqCknYvbXu2+zPaEMd2IChva5BpbeEoAOJOs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--edumazet.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=r3FWry0A; arc=none smtp.client-ip=209.85.219.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--edumazet.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="r3FWry0A" Received: by mail-qv1-f73.google.com with SMTP id 6a1803df08f44-88044215975so72542976d6.1 for ; Fri, 21 Nov 2025 00:33:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1763713981; x=1764318781; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=jSfhZgnsXkC4+tH2Y1SV+4rnSML6imH1zL/+X9kVqsA=; b=r3FWry0ARSAYXl8vqy2U6zdOr4meGPfsrNPfAPGRlA05Iyc/QeJLGdP/g/cbY0XVKd uujeEryQTjPKYw89xJZJCY0FO9T2fxbMl6421Qp5pafEKE9GOz2jf53WaIsz4AYEb5M0 Q9p5WW1zrRH+dXfhpOL3s9Ws2nGCIMXE/8oro/KgGTRMN5Llc4rtULjfbP5yyI1GLkkR LUB7zmp1Ww7nhFvEn0c5+FfdFwOYSwfG2CoeIlFQyZrG5EBp2jxMZQuObvrNxV+Hdewu FhS4b0zKvHsqvARNvZMQ//rJ/aMn2GDrBhTKJD7QY34KB1zh1J86DfcKgC3TrSHrWVRR sPkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763713981; x=1764318781; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jSfhZgnsXkC4+tH2Y1SV+4rnSML6imH1zL/+X9kVqsA=; b=mOISuEKElPc+wc9v0a7VxAn9rv00nOuFwBKpULtPhlzORBXjYBb4veo+tGg1pxVfEx 6v6qrAaO5F1toU+/2O4qpEn375Ac5WUTHjujx+6fRVVHId+QPurfRIInPdUXixSCh7WB E632Z/QQkulJkZPoiWY4gGjPcZvNvla1xKcEzYZZl8afnVvQnMp9Pn9R9G7IqYS2jc2J hgctu4c2ni6TtU2xLdWH+YuvyTDvidf2aS9diGEG1RB3wU/Fv19oD2jan3u0hEJO+vIc YD/an6aEyS7KgN0DPUS6D76FjEmU2kemhBwEqE62nOpFDPBaqI5Jjii7QgN41AQO93Jd 8RuA== X-Forwarded-Encrypted: i=1; AJvYcCXTOuZ7JDnif1oHuqsj5cqFxPGfPqtAQPDry7i5H98qFbUtoovelEI982TH7J8mUTRMFY7YBuk=@vger.kernel.org X-Gm-Message-State: AOJu0YxWpKOMSze0wpoeEw3aYHeb+5KQeUMIxudG3ADMzzI8/F9IZygG UMZK3D/RSy5Z8fc2ob7kjWUYPzpifWDrQbxTTDmUP2DnVbl4ibjXz0nKKbd5wij/wBXQoh06tg6 M9FQBhDHO51eW1g== X-Google-Smtp-Source: AGHT+IHtno7qjb8tzIEsylA2Y5/c+b+ONhNCwGtCRYglrTtWFCQljQAQw4g71XHxfRMV9TPII2bWAIyDg0ECSA== X-Received: from qvbpf2.prod.google.com ([2002:a05:6214:4982:b0:884:59ea:d79e]) (user=edumazet job=prod-delivery.src-stubby-dispatcher) by 2002:ad4:5aae:0:b0:880:5409:cb7b with SMTP id 6a1803df08f44-8847c49b4b2mr19330376d6.7.1763713981439; Fri, 21 Nov 2025 00:33:01 -0800 (PST) Date: Fri, 21 Nov 2025 08:32:44 +0000 In-Reply-To: <20251121083256.674562-1-edumazet@google.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251121083256.674562-1-edumazet@google.com> X-Mailer: git-send-email 2.52.0.460.gd25c4c69ec-goog Message-ID: <20251121083256.674562-3-edumazet@google.com> Subject: [PATCH v3 net-next 02/14] net: init shinfo->gso_segs from qdisc_pkt_len_init() From: Eric Dumazet To: "David S . Miller" , Jakub Kicinski , Paolo Abeni Cc: Simon Horman , Jamal Hadi Salim , Cong Wang , Jiri Pirko , "=?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?=" , Kuniyuki Iwashima , Willem de Bruijn , netdev@vger.kernel.org, eric.dumazet@gmail.com, Eric Dumazet Content-Type: text/plain; charset="UTF-8" Qdisc use shinfo->gso_segs for their pkts stats in bstats_update(), but this field needs to be initialized for SKB_GSO_DODGY users. Signed-off-by: Eric Dumazet --- net/core/dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 46ce6c6107805132b1322128e86634eca91e3340..dba9eef8bd83dda89b5edd870b47373722264f48 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4071,7 +4071,7 @@ EXPORT_SYMBOL_GPL(validate_xmit_skb_list); static void qdisc_pkt_len_init(struct sk_buff *skb) { - const struct skb_shared_info *shinfo = skb_shinfo(skb); + struct skb_shared_info *shinfo = skb_shinfo(skb); qdisc_skb_cb(skb)->pkt_len = skb->len; @@ -4112,6 +4112,7 @@ static void qdisc_pkt_len_init(struct sk_buff *skb) if (payload <= 0) return; gso_segs = DIV_ROUND_UP(payload, shinfo->gso_size); + shinfo->gso_segs = gso_segs; } qdisc_skb_cb(skb)->pkt_len += (gso_segs - 1) * hdr_len; } -- 2.52.0.460.gd25c4c69ec-goog