summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stokes <ian.stokes@intel.com>2019-03-29 17:52:14 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-29 18:58:38 +0100
commitc00deca2db34daa2d6ae335236507780db01f076 (patch)
tree32badb1885e5d3e75468f325919f59ada5cd980c
parentad97ceece12cde7d1f7da50679de2c93cc23a95a (diff)
downloaddpdk-next-eventdev-c00deca2db34daa2d6ae335236507780db01f076.zip
dpdk-next-eventdev-c00deca2db34daa2d6ae335236507780db01f076.tar.gz
dpdk-next-eventdev-c00deca2db34daa2d6ae335236507780db01f076.tar.xz
net/i40e: set min and max MTU
This commit sets the min and max supported MTU values for i40e devices via the i40e_dev_info_get() function. Min MTU supported is set to ETHER_MIN_MTU and max mtu is calculated as the max packet length supported minus the transport overhead. Signed-off-by: Ian Stokes <ian.stokes@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
-rw-r--r--drivers/net/i40e/i40e_ethdev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 3815aef..891bdc0 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3499,6 +3499,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_rx_pktlen = I40E_FRAME_SIZE_MAX;
dev_info->max_mac_addrs = vsi->max_macaddrs;
dev_info->max_vfs = pci_dev->max_vfs;
+ dev_info->max_mtu = dev_info->max_rx_pktlen - I40E_ETH_OVERHEAD;
+ dev_info->min_mtu = ETHER_MIN_MTU;
dev_info->rx_queue_offload_capa = 0;
dev_info->rx_offload_capa =
DEV_RX_OFFLOAD_VLAN_STRIP |