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>,
Andrew Lunn <andrew+netdev@lunn.ch>, Joe Damato <joe@dama.to>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
Eric Dumazet <edumazet@google.com>,
Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
Marcin Wojtas <marcin.s.wojtas@gmail.com>
Subject: [PATCH net-next 2/9] net: mvneta: use tso_features_check()
Date: Fri, 3 Apr 2026 04:32:30 +0000 [thread overview]
Message-ID: <20260403043237.3909226-3-edumazet@google.com> (raw)
In-Reply-To: <20260403043237.3909226-1-edumazet@google.com>
We must fallback to GSO if a TSO packet has too big headers,
or risk corruptions.
Fixes: 2adb719d74f6 ("net: mvneta: Implement software TSO")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: Marcin Wojtas <marcin.s.wojtas@gmail.com>
---
drivers/net/ethernet/marvell/mvneta.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 0c061fb0ed072aa192a0c5c7a3209b045540721a..5b52e125220c1f293cd9696016b6ea527e6f86f2 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -2823,6 +2823,7 @@ static int mvneta_tx_tso(struct sk_buff *skb, struct net_device *dev,
/* Initialize the TSO handler, and prepare the first payload */
hdr_len = tso_start(skb, &tso);
+ DEBUG_NET_WARN_ON_ONCE(hdr_len > TSO_HEADER_SIZE);
total_len = skb->len - hdr_len;
while (total_len > 0) {
@@ -5320,6 +5321,7 @@ static int mvneta_setup_tc(struct net_device *dev, enum tc_setup_type type,
static const struct net_device_ops mvneta_netdev_ops = {
.ndo_open = mvneta_open,
.ndo_stop = mvneta_stop,
+ .ndo_features_check = tso_features_check,
.ndo_start_xmit = mvneta_tx,
.ndo_set_rx_mode = mvneta_set_rx_mode,
.ndo_set_mac_address = mvneta_set_mac_addr,
--
2.53.0.1213.gd9a14994de-goog
next prev parent reply other threads:[~2026-04-03 4:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 4:32 [PATCH net-next 0/9] net: safe guard net/core/tso.c users Eric Dumazet
2026-04-03 4:32 ` [PATCH net-next 1/9] net: tso: add tso_features_check() Eric Dumazet
2026-04-03 6:41 ` Eric Dumazet
2026-04-03 7:20 ` Eric Dumazet
2026-04-03 20:47 ` Jakub Kicinski
2026-04-03 20:49 ` Eric Dumazet
2026-04-03 21:00 ` Eric Dumazet
2026-04-03 4:32 ` Eric Dumazet [this message]
2026-04-03 4:32 ` [PATCH net-next 3/9] net: thunderx: use tso_features_check() Eric Dumazet
2026-04-03 4:32 ` [PATCH net-next 4/9] dpaa2-eth: " Eric Dumazet
2026-04-03 4:32 ` [PATCH net-next 5/9] net: enetc: " Eric Dumazet
2026-04-03 4:32 ` [PATCH net-next 6/9] net: fec: " Eric Dumazet
2026-04-03 4:32 ` [PATCH net-next 7/9] net: mv643xx_eth: " Eric Dumazet
2026-04-03 4:32 ` [PATCH net-next 8/9] net: mvpp2: " Eric Dumazet
2026-04-03 4:32 ` [PATCH net-next 9/9] octeontx2-pf: " Eric Dumazet
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=20260403043237.3909226-3-edumazet@google.com \
--to=edumazet@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=ezequiel.garcia@free-electrons.com \
--cc=horms@kernel.org \
--cc=joe@dama.to \
--cc=kuba@kernel.org \
--cc=marcin.s.wojtas@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.