Skip to contentSkip to conversation

net/ice: set min and max MTU

PATCH In review Qi Zhang 2 participants 3 messages May 7, 2019 – May 14, 2019 Network drivers

lore
Share & tools
lore

Qi Zhang

author
#0 lore raw

PATCH v2 1/1 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.

---

v2:
- fix typo

 drivers/net/ice/ice_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ice/ice_ethdev.c +2 -0
index 1f06a2c80..9f5f919f4 100644
@@ -1994,6 +1994,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 |
Signature · 1 line
2.13.6
Acked-by on v2 1/1
#1 lore raw
Quoted 41 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Tuesday, May 7, 2019 9:54 AM
To: Lu, Wenzhuo <[email protected]>; Yang, Qiming <[email protected]>
Cc: Stokes, Ian <[email protected]>; Yigit, Ferruh <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>
Subject: [PATCH v2] 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.

---

v2:
- fix typo

 drivers/net/ice/ice_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ice/ice_ethdev.c index renamed from drivers/net/ice/ice_ethdev.c +0 -0

1f06a2c80..9f5f919f4 100644

drivers/net/ice/ice_ethdev.c +2 -0
@@ -1994,6 +1994,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;
 
drivers/net/ice/ice_ethdev.c +0 -1
 	dev_info->rx_offload_capa =
 		DEV_RX_OFFLOAD_VLAN_STRIP |
--
Quoted 1 line

2.13.6

author Applied
#2 lore raw
Quoted 22 lines

-----Original Message-----
From: Yang, Qiming
Sent: Tuesday, May 14, 2019 10:16 AM
To: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>
Cc: Stokes, Ian <[email protected]>; Yigit, Ferruh <[email protected]>; [email protected]
Subject: RE: [PATCH v2] net/ice: set min and max MTU

Quoted 10 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Tuesday, May 7, 2019 9:54 AM
To: Lu, Wenzhuo <[email protected]>; Yang, Qiming <[email protected]>
Cc: Stokes, Ian <[email protected]>; Yigit, Ferruh <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>
Subject: [PATCH v2] net/ice: set min and max MTU

Quoted 7 lines
Quoted 6 lines

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.

Applied to dpdk-next-net-intel.

Thanks
Qi