[v3,08/13] net/ionic: report 1G and 200G link speeds when applicable

Message ID 20240207031317.32293-9-andrew.boyer@amd.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/ionic: miscellaneous fixes and improvements |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Boyer, Andrew Feb. 7, 2024, 3:13 a.m. UTC
  From: Vamsi Krishna Atluri <vamsi.atluri@amd.com>

The hardware supports these speeds, so we should report them
correctly.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
Signed-off-by: Vamsi Krishna Atluri <vamsi.atluri@amd.com>
---
 drivers/net/ionic/ionic_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)
  

Patch

diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 008e50e0b9..327f6b9de5 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -285,6 +285,9 @@  ionic_dev_link_update(struct rte_eth_dev *eth_dev,
 		link.link_status = RTE_ETH_LINK_UP;
 		link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;
 		switch (adapter->link_speed) {
+		case  1000:
+			link.link_speed = RTE_ETH_SPEED_NUM_1G;
+			break;
 		case  10000:
 			link.link_speed = RTE_ETH_SPEED_NUM_10G;
 			break;
@@ -300,6 +303,9 @@  ionic_dev_link_update(struct rte_eth_dev *eth_dev,
 		case 100000:
 			link.link_speed = RTE_ETH_SPEED_NUM_100G;
 			break;
+		case 200000:
+			link.link_speed = RTE_ETH_SPEED_NUM_200G;
+			break;
 		default:
 			link.link_speed = RTE_ETH_SPEED_NUM_NONE;
 			break;