summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
diff options
context:
space:
mode:
authorRaghu Vatsavayi <rvatsavayi@caviumnetworks.com>2016-07-03 13:56:53 -0700
committerDavid S. Miller <davem@davemloft.net>2016-07-04 16:15:31 -0700
commit4c2743f9ac00e6a1c9b61ee59d9648ad9c83d1a8 (patch)
tree9267272739503bbb46a72632ac78d87fec9a9246 /drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
parent1e0d30fe2143ae8db342e62be67a12479c3c2a20 (diff)
downloadlinux-stable-4c2743f9ac00e6a1c9b61ee59d9648ad9c83d1a8.tar.gz
linux-stable-4c2743f9ac00e6a1c9b61ee59d9648ad9c83d1a8.tar.bz2
linux-stable-4c2743f9ac00e6a1c9b61ee59d9648ad9c83d1a8.zip
liquidio: MTU limits
This patch limits the MTU between 68 bytes and 16000 bytes. Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio/lio_ethtool.c')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/lio_ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
index 0f29dc44fcad..82f20c9a73eb 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
@@ -554,7 +554,7 @@ lio_ethtool_get_ringparam(struct net_device *netdev,
tx_pending = CFG_GET_NUM_TX_DESCS_NIC_IF(conf6x, lio->ifidx);
}
- if (lio->mtu > OCTNET_DEFAULT_FRM_SIZE) {
+ if (lio->mtu > OCTNET_DEFAULT_FRM_SIZE - OCTNET_FRM_HEADER_SIZE) {
ering->rx_pending = 0;
ering->rx_max_pending = 0;
ering->rx_mini_pending = 0;