[PATCH net-next 8/9] net: mvpp2: use tso_features_check()

Eric Dumazet
2026-04-03T04:32:54Z

Fixes: 186cd4d4e414 ("net: mvpp2: software tso support")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Antoine Tenart <atenart@kernel.org>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index f442b874bb5933b298773bee7e6140e753bce013..6a065402f62605a9333c9050cdbb793ce547e74a 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -4318,6 +4318,7 @@ static int mvpp2_tx_tso(struct sk_buff *skb, struct net_device *dev,
return 0;

hdr_sz = tso_start(skb, &tso);
+ DEBUG_NET_WARN_ON_ONCE(hdr_sz > TSO_HEADER_SIZE);

len = skb->len - hdr_sz;
while (len > 0) {
@@ -5795,6 +5796,7 @@ static int mvpp2_ethtool_set_eee(struct net_device *dev,
static const struct net_device_ops mvpp2_netdev_ops = {
.ndo_open = mvpp2_open,
.ndo_stop = mvpp2_stop,
+ .ndo_features_check = tso_features_check,
.ndo_start_xmit = mvpp2_tx,
.ndo_set_rx_mode = mvpp2_set_rx_mode,
.ndo_set_mac_address = mvpp2_set_mac_address,
--
2.53.0.1213.gd9a14994de-goog