net: safe guard net/core/tso.c users
Subsystems (10)
cover net: safe guard net/core/tso.c users
Most net/core/tso.c users assume headers length is smaller than TSO_HEADER_SIZE. This is because they use pre-allocated and pre-mapped piece of memory of (N * TSO_HEADER_SIZE) bytes.
Add tso_features_check() helper so that these drivers can request a fallback to GSO if headers are too big.
We could in the future add more checks in tso_features_check() against max number of segments per TSO packet, as many drivers also seem to drop packets if gso_size is too small relative to their TX ring sizes.
Eric Dumazet (9):
net: tso: add tso_features_check()
net: mvneta: use tso_features_check()
net: thunderx: use tso_features_check()
dpaa2-eth: use tso_features_check()
net: enetc: use tso_features_check()
net: fec: use tso_features_check()
net: mv643xx_eth: use tso_features_check()
net: mvpp2: use tso_features_check()
octeontx2-pf: use tso_features_check()
drivers/net/ethernet/cavium/thunder/nicvf_main.c | 2 ++ drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 1 + drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 ++ drivers/net/ethernet/freescale/enetc/enetc.c | 2 ++ drivers/net/ethernet/freescale/enetc/enetc4_pf.c | 2 ++ drivers/net/ethernet/freescale/enetc/enetc_pf.c | 2 ++ drivers/net/ethernet/freescale/enetc/enetc_vf.c | 2 ++ drivers/net/ethernet/freescale/fec_main.c | 2 ++ drivers/net/ethernet/marvell/mv643xx_eth.c | 2 ++ drivers/net/ethernet/marvell/mvneta.c | 2 ++ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 ++ drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 ++ .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 1 + drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 2 ++ drivers/net/ethernet/marvell/octeontx2/nic/rep.c | 2 ++ include/net/tso.h | 11 +++++++++++ net/core/tso.c | 12 ++++++++++++ 17 files changed, 51 insertions(+)
Signature · 1 line
2.53.0.1213.gd9a14994de-goog
PATCH 1/9 net: tso: add tso_features_check()
net/core/tso.c users expecting headers size is smaller than TSO_HEADER_SIZE must fallback to GSO when headers are too big.
Provide tso_features_check() for drivers .ndo_features_check().
--- include/net/tso.h | 11 +++++++++++ net/core/tso.c | 12 ++++++++++++ 2 files changed, 23 insertions(+)
include/net/tso.h +11 -0
@@ -28,4 +28,15 @@ void tso_build_hdr(const struct sk_buff *skb, char *hdr, struct tso_t *tso,void tso_build_data (const struct sk_buff *skb,struct tso_t *tso,int size);int tso_start (struct sk_buff *skb,struct tso_t *tso); +static inline int tso_compute_hdr_len (const struct sk_buff *skb) +{ +int tlen =skb_is_gso_tcp (skb) ?tcp_hdrlen (skb) :sizeof (struct udphdr ); +int hdr_len =skb_transport_offset (skb) + tlen; + +return hdr_len; +} + +netdev_features_t tso_features_check (struct sk_buff *skb, +struct net_device *dev, +netdev_features_t features);#endif /* _TSO_H */
net/core/tso.c +12 -0
@@ -87,3 +87,15 @@ int tso_start(struct sk_buff *skb, struct tso_t *tso)return hdr_len; }EXPORT_SYMBOL (tso_start); + +netdev_features_t tso_features_check (struct sk_buff *skb, +struct net_device *dev, +netdev_features_t features) +{ +if (skb_is_gso (skb)) { +if (tso_compute_hdr_len (skb) >TSO_HEADER_SIZE ) + features &= ~NETIF_F_GSO_MASK ; + } +return features; +} +EXPORT_SYMBOL (tso_features_check);
Signature · 1 line
2.53.0.1213.gd9a14994de-goog
Re: [PATCH net-next 1/9] net: tso: add tso_features_check()
Quoted 41 lines · Eric Dumazet
net/core/tso.cusers expecting headers size is smaller thanTSO_HEADER_SIZEmust fallback to GSO when headers are too big.Provide
tso_features_check()for drivers .ndo_features_check().Signed-off-by Eric Dumazet <[email protected]>--- include/net/tso.h | 11 +++++++++++ net/core/tso.c | 12 ++++++++++++ 2 files changed, 23 insertions(+)include/net/tso.h +11
-0@@ -28,4 +28,15 @@ void tso_build_hdr(const struct sk_buff *skb, char *hdr, struct tso_t *tso,void tso_build_data (const struct sk_buff *skb,struct tso_t *tso,int size);int tso_start (struct sk_buff *skb,struct tso_t *tso); +static inline int tso_compute_hdr_len (const struct sk_buff *skb) +{ +int tlen =skb_is_gso_tcp (skb) ?tcp_hdrlen (skb) :sizeof (struct udphdr ); +int hdr_len =skb_transport_offset (skb) + tlen; + +return hdr_len; +} + +netdev_features_t tso_features_check (struct sk_buff *skb, +struct net_device *dev, +netdev_features_t features);#endif /* _TSO_H */ net/core/tso.c +0
-0@@ -87,3 +87,15 @@ int tso_start(struct sk_buff *skb, struct tso_t *tso)return hdr_len; }EXPORT_SYMBOL (tso_start);
net/core/tso.c int tso_start(struct sk_buff *skb, struct tso_t *tso) · line 99
Quoted 10 lines
net/core/tso.c +10
-0+ +netdev_features_t tso_features_check (struct sk_buff *skb, +struct net_device *dev, +netdev_features_t features) +{ +if (skb_is_gso (skb)) { +if (tso_compute_hdr_len (skb) >TSO_HEADER_SIZE ) + features &= ~NETIF_F_GSO_MASK ; + } +return features;
I forgot that netif_skb_features() uses:
if (dev->netdev_ops->ndo_features_check)
features &= dev->netdev_ops->ndo_features_check(skb, dev,
features);
else
features &= dflt_features_check(skb, dev, features);So I need to call vlan_features_check() from tso_features_check()
pw-bot: cr
Re: [PATCH net-next 1/9] net: tso: add tso_features_check()
Quoted 56 lines · Eric Dumazet
Quoted 41 lines · Eric Dumazet
net/core/tso.cusers expecting headers size is smaller thanTSO_HEADER_SIZEmust fallback to GSO when headers are too big.Provide
tso_features_check()for drivers .ndo_features_check().Signed-off-by Eric Dumazet <[email protected]>--- include/net/tso.h | 11 +++++++++++ net/core/tso.c | 12 ++++++++++++ 2 files changed, 23 insertions(+)include/net/tso.h +11
-0@@ -28,4 +28,15 @@ void tso_build_hdr(const struct sk_buff *skb, char *hdr, struct tso_t *tso,void tso_build_data (const struct sk_buff *skb,struct tso_t *tso,int size);int tso_start (struct sk_buff *skb,struct tso_t *tso); +static inline int tso_compute_hdr_len (const struct sk_buff *skb) +{ +int tlen =skb_is_gso_tcp (skb) ?tcp_hdrlen (skb) :sizeof (struct udphdr ); +int hdr_len =skb_transport_offset (skb) + tlen; + +return hdr_len; +} + +netdev_features_t tso_features_check (struct sk_buff *skb, +struct net_device *dev, +netdev_features_t features);#endif /* _TSO_H */ net/core/tso.c +0
-0@@ -87,3 +87,15 @@ int tso_start(struct sk_buff *skb, struct tso_t *tso)return hdr_len; }EXPORT_SYMBOL (tso_start);net/core/tso.c int tso_start(struct sk_buff *skb, struct tso_t *tso) · line 99
Quoted 10 lines
net/core/tso.c +10
-0+ +netdev_features_t tso_features_check (struct sk_buff *skb, +struct net_device *dev, +netdev_features_t features) +{ +if (skb_is_gso (skb)) { +if (tso_compute_hdr_len (skb) >TSO_HEADER_SIZE ) + features &= ~NETIF_F_GSO_MASK ; + } +return features;I forgot that
netif_skb_features()uses:
Quoted 7 lines
if (
dev->netdev_ops->ndo_features_check)features &= dev->netdev_ops->ndo_features_check(skb, dev, features); else features &= dflt_features_check(skb, dev, features);So I need to call
vlan_features_check()fromtso_features_check()
I could be wrong though, vlan_features_check() is about skbs with multiple vlan tags,
and net/core/tso.c should support them just fine.
Jakub Kicinski
maintainerRe: [PATCH net-next 1/9] net: tso: add tso_features_check()
Quoted 8 lines · On Fri, 3 Apr 2026 00:20:13 -0700 Eric Dumazet wrote:
Quoted 8 lines
I forgot that
netif_skb_features()uses:if (
dev->netdev_ops->ndo_features_check)features &= dev->netdev_ops->ndo_features_check(skb, dev, features); else features &= dflt_features_check(skb, dev, features);
Quoted 5 lines
Quoted 1 line
So I need to call
vlan_features_check()fromtso_features_check()I could be wrong though,
vlan_features_check()is about skbs with multiple vlan tags,
andnet/core/tso.cshould support them just fine.
But we probably still need to clear NETIF_F_IP_CSUM for example? Better safe than sorry. (I won't repeat the sashiko complaints assuming you saw those ;))
Re: [PATCH net-next 1/9] net: tso: add tso_features_check()
Quoted 12 lines · Jakub Kicinski
Quoted 10 lines · On Fri, 3 Apr 2026 00:20:13 -0700 Eric Dumazet wrote:
Quoted 9 lines
I forgot that
netif_skb_features()uses:if (
dev->netdev_ops->ndo_features_check)features &= dev->netdev_ops->ndo_features_check(skb, dev, features); else features &= dflt_features_check(skb, dev, features);So I need to call
vlan_features_check()fromtso_features_check()
Quoted 7 lines
Quoted 3 lines
I could be wrong though,
vlan_features_check()is about skbs with multiple vlan tags,
andnet/core/tso.cshould support them just fine.But we probably still need to clear
NETIF_F_IP_CSUMfor example? Better safe than sorry. (I won't repeat the sashiko complaints assuming you saw those ;))
Ah not yet, let me check ;)
Re: [PATCH net-next 1/9] net: tso: add tso_features_check()
Quoted 18 lines · Eric Dumazet
Quoted 16 lines · Jakub Kicinski
Quoted 13 lines · On Fri, 3 Apr 2026 00:20:13 -0700 Eric Dumazet wrote:
Quoted 9 lines
I forgot that
netif_skb_features()uses:if (
dev->netdev_ops->ndo_features_check)features &= dev->netdev_ops->ndo_features_check(skb, dev, features); else features &= dflt_features_check(skb, dev, features);So I need to call
vlan_features_check()fromtso_features_check()I could be wrong though,
vlan_features_check()is about skbs with multiple vlan tags,
andnet/core/tso.cshould support them just fine.
Quoted 5 lines
Quoted 3 lines
But we probably still need to clear
NETIF_F_IP_CSUMfor example? Better safe than sorry. (I won't repeat the sashiko complaints assuming you saw those ;))Ah not yet, let me check ;)
Oh well, lots of orthonal errors.
It is probably time for qdisc_pkt_len_segs_init() to pull the headers (at least for GSO packets)
and return an error if this pull fails, instead of letting malicious packets continue their way :/
PATCH 2/9 net: mvneta: use tso_features_check()
In reply to Eric DumazetWe must fallback to GSO if a TSO packet has too big headers, or risk corruptions.
--- drivers/net/ethernet/marvell/mvneta.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/marvell/mvneta.c +2 -0
@@ -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,
Signature · 1 line
2.53.0.1213.gd9a14994de-goog
PATCH 3/9 net: thunderx: use tso_features_check()
In reply to Eric DumazetWe must fallback to GSO if a TSO packet has too big headers, or risk corruptions.
--- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 2 ++ drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 1 + 2 files changed, 3 insertions(+)
drivers/net/ethernet/cavium/thunder/nicvf_main.c +2 -0
@@ -19,6 +19,7 @@#include <linux/filter.h> #include <linux/net_tstamp.h> #include <linux/workqueue.h> +#include <net/tso.h> #include "nic_reg.h" #include "nic.h"
@@ -2077,6 +2078,7 @@ static void nicvf_set_rx_mode(struct net_device *netdev)static const struct net_device_ops nicvf_netdev_ops = { .ndo_open = nicvf_open, .ndo_stop = nicvf_stop, + .ndo_features_check = tso_features_check, .ndo_start_xmit = nicvf_xmit, .ndo_change_mtu = nicvf_change_mtu, .ndo_set_mac_address = nicvf_set_mac_address,
drivers/net/ethernet/cavium/thunder/nicvf_queues.c +1 -0
@@ -1492,6 +1492,7 @@ static int nicvf_sq_append_tso(struct nicvf *nic, struct snd_queue *sq,int hdr_len; 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 ) {
Signature · 1 line
2.53.0.1213.gd9a14994de-goog
PATCH 4/9 dpaa2-eth: use tso_features_check()
In reply to Eric DumazetWe must fallback to GSO if a TSO packet has too big headers, or risk corruptions.
--- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +2 -0
@@ -1270,6 +1270,7 @@ static int dpaa2_eth_build_gso_fd(struct dpaa2_eth_priv *priv,/* 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_fds_len =0 ; total_len = skb->len - hdr_len;
@@ -3029,6 +3030,7 @@ static int dpaa2_eth_setup_tc(struct net_device *net_dev,static const struct net_device_ops dpaa2_eth_ops = { .ndo_open = dpaa2_eth_open, + .ndo_features_check = tso_features_check, .ndo_start_xmit = dpaa2_eth_tx, .ndo_stop = dpaa2_eth_stop, .ndo_set_mac_address = dpaa2_eth_set_addr,
Signature · 1 line
2.53.0.1213.gd9a14994de-goog
PATCH 5/9 net: enetc: use tso_features_check()
In reply to Eric DumazetWe must fallback to GSO if a TSO packet has too big headers, or risk corruptions.
--- drivers/net/ethernet/freescale/enetc/enetc.c | 2 ++ drivers/net/ethernet/freescale/enetc/enetc4_pf.c | 2 ++ drivers/net/ethernet/freescale/enetc/enetc_pf.c | 2 ++ drivers/net/ethernet/freescale/enetc/enetc_vf.c | 2 ++ 4 files changed, 8 insertions(+)
drivers/net/ethernet/freescale/enetc/enetc.c +2 -0
@@ -887,6 +887,8 @@ static int enetc_map_tx_tso_buffs(struct enetc_bdr *tx_ring, 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; i = tx_ring->next_to_use;
drivers/net/ethernet/freescale/enetc/enetc4_pf.c +2 -0
@@ -6,6 +6,7 @@#include <linux/of_net.h> #include <linux/of_platform.h> #include <linux/unaligned.h> +#include <net/tso.h> #include "enetc_pf_common.h" #include "enetc4_debugfs.h"
@@ -564,6 +565,7 @@ static int enetc4_pf_set_features(struct net_device *ndev,static const struct net_device_ops enetc4_ndev_ops = { .ndo_open = enetc_open, .ndo_stop = enetc_close, + .ndo_features_check = tso_features_check, .ndo_start_xmit = enetc_xmit, .ndo_get_stats = enetc_get_stats, .ndo_set_mac_address = enetc_pf_set_mac_addr,
drivers/net/ethernet/freescale/enetc/enetc_pf.c +2 -0
@@ -7,6 +7,7 @@#include <linux/of_platform.h> #include <linux/of_net.h> #include <linux/pcs-lynx.h> +#include <net/tso.h> #include "enetc_ierb.h" #include "enetc_pf_common.h"
@@ -617,6 +618,7 @@ static int enetc_pf_setup_tc(struct net_device *ndev, enum tc_setup_type type,static const struct net_device_ops enetc_ndev_ops = { .ndo_open = enetc_open, .ndo_stop = enetc_close, + .ndo_features_check = tso_features_check, .ndo_start_xmit = enetc_xmit, .ndo_get_stats = enetc_get_stats, .ndo_set_mac_address = enetc_pf_set_mac_addr,
drivers/net/ethernet/freescale/enetc/enetc_vf.c +2 -0
@@ -3,6 +3,7 @@#include <linux/module.h> #include "enetc.h" +#include <net/tso.h> #define ENETC_DRV_NAME_STR "ENETC VF driver"
@@ -115,6 +116,7 @@ static int enetc_vf_setup_tc(struct net_device *ndev, enum tc_setup_type type,static const struct net_device_ops enetc_ndev_ops = { .ndo_open = enetc_open, .ndo_stop = enetc_close, + .ndo_features_check = tso_features_check, .ndo_start_xmit = enetc_xmit, .ndo_get_stats = enetc_get_stats, .ndo_set_mac_address = enetc_vf_set_mac_addr,
Signature · 1 line
2.53.0.1213.gd9a14994de-goog
PATCH 6/9 net: fec: use tso_features_check()
In reply to Eric DumazetWe must fallback to GSO if a TSO packet has too big headers, or risk corruptions.
--- drivers/net/ethernet/freescale/fec_main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/freescale/fec_main.c +2 -0
@@ -860,6 +860,7 @@ static int fec_enet_txq_submit_tso(struct fec_enet_priv_tx_q *txq,/* 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 ) {
@@ -4887,6 +4888,7 @@ static int fec_change_mtu(struct net_device *ndev, int new_mtu)static const struct net_device_ops fec_netdev_ops = { .ndo_open = fec_enet_open, .ndo_stop = fec_enet_close, + .ndo_features_check = tso_features_check, .ndo_start_xmit = fec_enet_start_xmit, .ndo_select_queue = fec_enet_select_queue, .ndo_set_rx_mode = set_multicast_list,
Signature · 1 line
2.53.0.1213.gd9a14994de-goog
PATCH 7/9 net: mv643xx_eth: use tso_features_check()
In reply to Eric DumazetWe must fallback to GSO if a TSO packet has too big headers, or risk corruptions.
--- drivers/net/ethernet/marvell/mv643xx_eth.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/marvell/mv643xx_eth.c +2 -0
@@ -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,
Signature · 1 line
2.53.0.1213.gd9a14994de-goog
PATCH 8/9 net: mvpp2: use tso_features_check()
In reply to Eric DumazetWe must fallback to GSO if a TSO packet has too big headers, or risk corruptions.
--- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +2 -0
@@ -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,
Signature · 1 line
2.53.0.1213.gd9a14994de-goog
PATCH 9/9 octeontx2-pf: use tso_features_check()
In reply to Eric DumazetWe must fallback to GSO if a TSO packet has too big headers, or risk corruptions.
--- drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 ++ drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 1 + drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 2 ++ drivers/net/ethernet/marvell/octeontx2/nic/rep.c | 2 ++ 4 files changed, 7 insertions(+)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +2 -0
@@ -17,6 +17,7 @@#include <linux/bpf_trace.h> #include <linux/bitfield.h> #include <net/page_pool/types.h> +#include <net/tso.h> #include "otx2_reg.h" #include "otx2_common.h"
@@ -2924,6 +2925,7 @@ static int otx2_ndo_set_vf_trust(struct net_device *netdev, int vf,static const struct net_device_ops otx2_netdev_ops = { .ndo_open = otx2_open, .ndo_stop = otx2_stop, + .ndo_features_check = tso_features_check, .ndo_start_xmit = otx2_xmit, .ndo_select_queue = otx2_select_queue, .ndo_fix_features = otx2_fix_features,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c +1 -0
@@ -936,6 +936,7 @@ static void otx2_sq_append_tso(struct otx2_nic *pfvf, struct otx2_snd_queue *sq,struct tso_t tso; hdr_len =tso_start (skb, &tso); +DEBUG_NET_WARN_ON_ONCE (hdr_len >TSO_HEADER_SIZE );/* Map SKB's fragments to DMA. * It's done here to avoid mapping for every TSO segment's packet.
drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c +2 -0
@@ -9,6 +9,7 @@#include <linux/module.h> #include <linux/pci.h> #include <linux/net_tstamp.h> +#include <net/tso.h> #include "otx2_common.h" #include "otx2_reg.h"
@@ -526,6 +527,7 @@ static int otx2vf_set_features(struct net_device *netdev,static const struct net_device_ops otx2vf_netdev_ops = { .ndo_open = otx2vf_open, .ndo_stop = otx2vf_stop, + .ndo_features_check = tso_features_check, .ndo_start_xmit = otx2vf_xmit, .ndo_select_queue = otx2_select_queue, .ndo_set_rx_mode = otx2vf_set_rx_mode,
drivers/net/ethernet/marvell/octeontx2/nic/rep.c +2 -0
@@ -10,6 +10,7 @@#include <linux/pci.h> #include <linux/net_tstamp.h> #include <linux/sort.h> +#include <net/tso.h> #include "otx2_common.h" #include "cn10k.h"
@@ -487,6 +488,7 @@ static int rvu_rep_stop(struct net_device *dev)static const struct net_device_ops rvu_rep_netdev_ops = { .ndo_open = rvu_rep_open, .ndo_stop = rvu_rep_stop, + .ndo_features_check = tso_features_check, .ndo_start_xmit = rvu_rep_xmit, .ndo_get_stats64 = rvu_rep_get_stats64, .ndo_change_mtu = rvu_rep_change_mtu,
Signature · 1 line
2.53.0.1213.gd9a14994de-goog