From: Robin Zhang Date: Sun, 27 Sep 2020 07:26:20 +0000 (+0000) Subject: net/iavf: set min and max MTU for VF X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1541a9d6b07ac6c5b44f2f346223b24d25e1fc2f;p=dpdk.git net/iavf: set min and max MTU for VF This commit sets the min and max supported MTU values for iavf VF devices via the iavf_dev_info_get() function. Min MTU supported is set to RTE_ETHER_MIN_MTU and max MTU is calculated as the max packet length supported minus the transport overhead. Signed-off-by: Robin Zhang Acked-by: Qi Zhang --- diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index ec19abb01f..81f23832ca 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -540,6 +540,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_tx_queues = vf->vsi_res->num_queue_pairs; dev_info->min_rx_bufsize = IAVF_BUF_SIZE_MIN; dev_info->max_rx_pktlen = IAVF_FRAME_SIZE_MAX; + dev_info->max_mtu = dev_info->max_rx_pktlen - IAVF_ETH_OVERHEAD; + dev_info->min_mtu = RTE_ETHER_MIN_MTU; dev_info->hash_key_size = vf->vf_res->rss_key_size; dev_info->reta_size = vf->vf_res->rss_lut_size; dev_info->flow_type_rss_offloads = IAVF_RSS_OFFLOAD_ALL;