From: Eric Dumazet <edumazet@google.com>
To: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org,
Eddie Phillips <eddiephillips@google.com>,
Ankit Garg <nktgrg@google.com>,
Harshitha Ramamurthy <hramamurthy@google.com>,
Joshua Washington <joshwash@google.com>,
Willem de Bruijn <willemb@google.com>,
edumazet@kernel.org, Eric Dumazet <edumazet@google.com>
Subject: [PATCH net 0/2] gve: DQO: fix handling of out of range TSO MSS
Date: Thu, 24 Sep 2026 00:42:50 +0000 [thread overview]
Message-ID: <20260924004252.1196328-1-edumazet@google.com> (raw)
The DQO TX path assumes that the MSS of a TSO packet is within the
range supported by the device, [88, 9728].
This holds for locally generated traffic, but not for packets coming
from a tap or from a packet socket: virtio_net_hdr_to_skb() takes
gso_size from user space and only enforces a minimum, layer 2
forwarding does not check the MTU of GSO packets, and
gso_features_check() bounds skb->len and gso_segs but never gso_size.
Patch 1, from Eddie Phillips, deals with the lower bound. It moves the
existing test out of gve_prep_tso() into gve_features_check_dqo(), so
that these packets are segmented in software instead of being dropped.
Patch 2 deals with the upper bound, which is currently not checked at
all. gve_tx_fill_tso_ctx_desc() stores gso_size into a 14 bits wide
field, so that an MSS of 16384 silently becomes zero. Falling back to
software segmentation is not an option here, because skb_segment()
splits at gso_size regardless of the MTU, and would only replace an
invalid TSO packet by non TSO packets larger than the 9728 bytes the
device supports. These packets are dropped instead.
As noted in patch 2, oversized non TSO packets can still reach the
device whenever the stack segments in software. This is not specific
to gve and is better fixed in the core, so a patch for
__is_skb_forwardable() will be sent separately for net-next.
Eddie Phillips (1):
gve: fix TX drop when GSO MSS is too small for hw
Eric Dumazet (1):
gve: DQO: reject TSO packets with an out of range MSS
.../net/ethernet/google/gve/gve_desc_dqo.h | 5 +++
drivers/net/ethernet/google/gve/gve_tx_dqo.c | 32 ++++++++++++++-----
2 files changed, 29 insertions(+), 8 deletions(-)
--
2.56.0.rc1.310.g51773c2048-goog
next reply other threads:[~2026-09-24 0:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 0:42 Eric Dumazet [this message]
2026-09-24 0:42 ` [PATCH net 1/2] gve: fix TX drop when GSO MSS is too small for hw Eric Dumazet
2026-09-24 0:42 ` [PATCH net 2/2] gve: DQO: reject TSO packets with an out of range MSS Eric Dumazet
2026-09-24 1:32 ` [PATCH net 0/2] gve: DQO: fix handling of out of range TSO MSS Harshitha Ramamurthy
2026-09-24 18:00 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260924004252.1196328-1-edumazet@google.com \
--to=edumazet@google.com \
--cc=davem@davemloft.net \
--cc=eddiephillips@google.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=hramamurthy@google.com \
--cc=joshwash@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nktgrg@google.com \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox