summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2026-09-23 14:59:42 +0000
committerJakub Kicinski <kuba@kernel.org>2026-09-24 10:51:29 -0700
commit83769c23fb1879edc916a526ba424285033baf2d (patch)
treeac3e133847e92e1be5420840455588279ccab477 /tools/perf/scripts/python/bin/stackcollapse-record
parent06e3f54e8b22040ada01a28343badf1990b4dd7d (diff)
downloadlinux-next-83769c23fb1879edc916a526ba424285033baf2d.tar.gz
linux-next-83769c23fb1879edc916a526ba424285033baf2d.zip
gve: DQO: fix header length used by gve_can_send_tso() for UDP GSO
gve_can_send_tso() computes how many buffers each segment of a GSO packet would span, and for this it needs the length of the headers that the device replicates in front of every segment. It unconditionally uses skb_tcp_all_headers(), which reads the doff field of the TCP header. SKB_GSO_UDP_L4 packets have no TCP header: tcp_hdrlen() then reads one byte of the UDP payload, and header_len can be anything in [0, 60] instead of the transport offset plus the eight bytes of the UDP header that gve_prep_tso() programs into the TSO context descriptor. A wrong header length shifts all the segment boundaries computed in the loop, so the number of buffers per segment can be over or under estimated. In the first case, GSO is needlessly disabled for this packet by gve_features_check_dqo() and the stack has to segment it. In the second case, the driver hands the device a packet whose segments span more than GVE_TX_MAX_DATA_DESCS buffers. Use the UDP header length for SKB_GSO_UDP_L4 packets, matching what gve_prep_tso() does. Fixes: 014c607f86ab ("gve: add support for UDP GSO for DQO format") Closes: https://lore.kernel.org/netdev/CANn89i+MS4L60sFQ49=-f-mibeveUfcrpVkD5X+Qy6SOnEpd6w@mail.gmail.com/ Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Ankit Garg <nktgrg@google.com> Cc: Harshitha Ramamurthy <hramamurthy@google.com> Cc: Joshua Washington <joshwash@google.com> Cc: Willem de Bruijn <willemb@google.com> Reviewed-by: Ankit Garg <nktgrg@google.com> Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com> Link: https://patch.msgid.link/20260923145942.731365-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions