Commit 0d592e52 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

nfp: limit the number of TSO segments

Most FWs limit the number of TSO segments a frame can produce
to 64.  This is for fairness and efficiency (of FW datapath)
reasons.  If a frame with larger number of segments is submitted
the FW will drop it.
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d692403e
...@@ -3750,6 +3750,8 @@ static void nfp_net_netdev_init(struct nfp_net *nn) ...@@ -3750,6 +3750,8 @@ static void nfp_net_netdev_init(struct nfp_net *nn)
netdev->min_mtu = ETH_MIN_MTU; netdev->min_mtu = ETH_MIN_MTU;
netdev->max_mtu = nn->max_mtu; netdev->max_mtu = nn->max_mtu;
netdev->gso_max_segs = NFP_NET_LSO_MAX_SEGS;
netif_carrier_off(netdev); netif_carrier_off(netdev);
nfp_net_set_ethtool_ops(netdev); nfp_net_set_ethtool_ops(netdev);
......
...@@ -59,9 +59,12 @@ ...@@ -59,9 +59,12 @@
#define NFP_NET_RX_OFFSET 32 #define NFP_NET_RX_OFFSET 32
/** /**
* Maximum header size supported for LSO frames * LSO parameters
* %NFP_NET_LSO_MAX_HDR_SZ: Maximum header size supported for LSO frames
* %NFP_NET_LSO_MAX_SEGS: Maximum number of segments LSO frame can produce
*/ */
#define NFP_NET_LSO_MAX_HDR_SZ 255 #define NFP_NET_LSO_MAX_HDR_SZ 255
#define NFP_NET_LSO_MAX_SEGS 64
/** /**
* Prepend field types * Prepend field types
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment