From: Qi Zhang Date: Tue, 7 May 2019 01:53:46 +0000 (+0800) Subject: net/ice: set min and max MTU X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=c352338e44b24bc1aa3a1a1b165ac3f4baeef37e net/ice: set min and max MTU This commit sets the min and max supported MTU values for ice devices via the ice_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: Qi Zhang Acked-by: Qiming Yang --- diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 3b160081c0..c230445c61 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2015,6 +2015,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_tx_queues = vsi->nb_qps; 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 - ICE_ETH_OVERHEAD; + dev_info->min_mtu = ETHER_MIN_MTU; dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |