summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stokes <ian.stokes@intel.com>2019-03-29 17:52:15 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-29 18:59:10 +0100
commit92645b2ffd842a14c461376c1dca199121396cc5 (patch)
tree268707b83a9e5c3326a82a0f70e46bd8810f2283
parentc00deca2db34daa2d6ae335236507780db01f076 (diff)
downloaddpdk-next-eventdev-92645b2ffd842a14c461376c1dca199121396cc5.zip
dpdk-next-eventdev-92645b2ffd842a14c461376c1dca199121396cc5.tar.gz
dpdk-next-eventdev-92645b2ffd842a14c461376c1dca199121396cc5.tar.xz
net/i40e: set min and max MTU for VF
This commit sets the min and max supported MTU values for i40e VF devices via the i40evf_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_vf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 7e4bd73..add7b22 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2216,6 +2216,8 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_tx_queues = I40E_MAX_QP_NUM_PER_VF;
dev_info->min_rx_bufsize = I40E_BUF_SIZE_MIN;
dev_info->max_rx_pktlen = I40E_FRAME_SIZE_MAX;
+ dev_info->max_mtu = dev_info->max_rx_pktlen - I40E_ETH_OVERHEAD;
+ dev_info->min_mtu = ETHER_MIN_MTU;
dev_info->hash_key_size = (I40E_VFQF_HKEY_MAX_INDEX + 1) * sizeof(uint32_t);
dev_info->reta_size = ETH_RSS_RETA_SIZE_64;
dev_info->flow_type_rss_offloads = vf->adapter->flow_types_mask;