diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-02-07 23:55:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-08 10:01:27 -0500 |
commit | 0d592e52fbbda26155b686dd93878cf774a3ab0e (patch) | |
tree | bd5d0a7658d8bf238a2fabe13f1b44049f810e1c | |
parent | d692403e5cf8008f31f5664a6f3ce3e65d54f458 (diff) |
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: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index 19e989239af7..a05be0ab2713 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c | |||
@@ -3750,6 +3750,8 @@ static void nfp_net_netdev_init(struct nfp_net *nn) | |||
3750 | netdev->min_mtu = ETH_MIN_MTU; | 3750 | netdev->min_mtu = ETH_MIN_MTU; |
3751 | netdev->max_mtu = nn->max_mtu; | 3751 | netdev->max_mtu = nn->max_mtu; |
3752 | 3752 | ||
3753 | netdev->gso_max_segs = NFP_NET_LSO_MAX_SEGS; | ||
3754 | |||
3753 | netif_carrier_off(netdev); | 3755 | netif_carrier_off(netdev); |
3754 | 3756 | ||
3755 | nfp_net_set_ethtool_ops(netdev); | 3757 | nfp_net_set_ethtool_ops(netdev); |
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h b/drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h index eeecef2caac6..4499a7333078 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | |||
@@ -59,9 +59,12 @@ | |||
59 | #define NFP_NET_RX_OFFSET 32 | 59 | #define NFP_NET_RX_OFFSET 32 |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * Maximum header size supported for LSO frames | 62 | * LSO parameters |
63 | * %NFP_NET_LSO_MAX_HDR_SZ: Maximum header size supported for LSO frames | ||
64 | * %NFP_NET_LSO_MAX_SEGS: Maximum number of segments LSO frame can produce | ||
63 | */ | 65 | */ |
64 | #define NFP_NET_LSO_MAX_HDR_SZ 255 | 66 | #define NFP_NET_LSO_MAX_HDR_SZ 255 |
67 | #define NFP_NET_LSO_MAX_SEGS 64 | ||
65 | 68 | ||
66 | /** | 69 | /** |
67 | * Prepend field types | 70 | * Prepend field types |