[PATCH net-next 7/9] net: mv643xx_eth: use tso_features_check()

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

Fixes: 3ae8f4e0b98b ("net: mv643xx_eth: Implement software TSO")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
drivers/net/ethernet/marvell/mv643xx_eth.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index f9055b3d6fb102ebc695dce9c6c8321889a78dfa..95781e1f42dd69404ca60f0cb383bd783f7e5322 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -835,6 +835,7 @@ static int txq_submit_tso(struct tx_queue *txq, struct sk_buff *skb,

/* 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) {
@@ -3066,6 +3067,7 @@ static void init_pscr(struct mv643xx_eth_private *mp, int speed, int duplex)
static const struct net_device_ops mv643xx_eth_netdev_ops = {
.ndo_open = mv643xx_eth_open,
.ndo_stop = mv643xx_eth_stop,
+ .ndo_features_check = tso_features_check,
.ndo_start_xmit = mv643xx_eth_xmit,
.ndo_set_rx_mode = mv643xx_eth_set_rx_mode,
.ndo_set_mac_address = mv643xx_eth_set_mac_address,
--
2.53.0.1213.gd9a14994de-goog