Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: init shinfo->gso_segs from qdisc_pkt_len_init()

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 <edumazet@google.com>
Link: https://patch.msgid.link/20251121083256.674562-3-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Eric Dumazet and committed by
Paolo Abeni
be1b70ab b2a38f6d

+2 -1
+2 -1
net/core/dev.c
··· 4071 4071 4072 4072 static void qdisc_pkt_len_init(struct sk_buff *skb) 4073 4073 { 4074 - const struct skb_shared_info *shinfo = skb_shinfo(skb); 4074 + struct skb_shared_info *shinfo = skb_shinfo(skb); 4075 4075 4076 4076 qdisc_skb_cb(skb)->pkt_len = skb->len; 4077 4077 ··· 4112 4112 if (payload <= 0) 4113 4113 return; 4114 4114 gso_segs = DIV_ROUND_UP(payload, shinfo->gso_size); 4115 + shinfo->gso_segs = gso_segs; 4115 4116 } 4116 4117 qdisc_skb_cb(skb)->pkt_len += (gso_segs - 1) * hdr_len; 4117 4118 }