[PATCH v2] net/ice: fix missing MTU value setting

Kevin Liu kevinx.liu at intel.com
Tue May 17 10:18:29 CEST 2022


In the DCF module, Missing maximum and minimum
MTU value settings.

This patch adds the settings of the maximum and
minimum MTU to correctly calculate the MTU value.

Fixes: bf89db4409bb ("net/ice: complete device info get in DCF")
Cc: stable at dpdk.org

v2:
- update fixline

Signed-off-by: Kevin Liu <kevinx.liu at intel.com>
---
 drivers/net/ice/ice_dcf_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 8005eb2ab8..0da267db1f 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -713,6 +713,8 @@ ice_dcf_dev_info_get(struct rte_eth_dev *dev,
 	dev_info->reta_size = hw->vf_res->rss_lut_size;
 	dev_info->flow_type_rss_offloads = ICE_RSS_OFFLOAD_ALL;
 	dev_info->dev_capa &= ~RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP;
+	dev_info->max_mtu = dev_info->max_rx_pktlen - ICE_ETH_OVERHEAD;
+	dev_info->min_mtu = RTE_ETHER_MIN_MTU;
 
 	dev_info->rx_offload_capa =
 		RTE_ETH_RX_OFFLOAD_VLAN_STRIP |
-- 
2.34.1



More information about the stable mailing list