Skip to contentSkip to conversation

cxgbe: fix supported speed capabilities

PATCH In review Rahul Lakkireddy 2 participants 4 messages Jun 28, 2017 Network drivers

lore
Share & tools
lore
#0 lore raw

cover cxgbe: fix supported speed capabilities

Patch 1 updates supported port module types.
Patch 2 uses port type to determine the supported speed capabilities.

Thanks,
Rahul

Rahul Lakkireddy (2):
cxgbe: update supported port module types
cxgbe: fix supported speed capabilities

 doc/guides/nics/features/cxgbe.ini      |   2 +-
 drivers/net/cxgbe/base/t4fw_interface.h |  15 ++---
 drivers/net/cxgbe/cxgbe.h               |   1 +
 drivers/net/cxgbe/cxgbe_ethdev.c        |   2 +-
 drivers/net/cxgbe/cxgbe_main.c          | 104 ++++++++++++++++++++++++++++++++
 5 files changed, 113 insertions(+), 11 deletions(-)
Signature · 1 line
2.5.3
#1 lore raw

PATCH 1/2 cxgbe: update supported port module types

---
 drivers/net/cxgbe/base/t4fw_interface.h | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
drivers/net/cxgbe/base/t4fw_interface.h +6 -9
index 6283fe9..6ca4f31 100644
@@ -1293,15 +1293,12 @@ enum fw_port_type {
 	FW_PORT_TYPE_QSFP	= 14, /* No, 4, Yes, No, No, No, 40G */
 	FW_PORT_TYPE_BP40_BA	= 15,
 	/* No, 4, No, No, Yes, Yes, 40G/10G/1G, BP ANGE */
-	FW_PORT_TYPE_KR4_100G   = 16,   /* No, 4, 100G*/
-	FW_PORT_TYPE_CR4_QSFP   = 17,   /* No, 4, 100G*/
-	FW_PORT_TYPE_CR4_CFP4   = 18,   /* No, 4, 100G*/
-	FW_PORT_TYPE_CR_QSFP    = 19,   /* No, 1, 25G*/
-	FW_PORT_TYPE_CR_CFP4    = 20,   /* No, 1, 25G*/
-	FW_PORT_TYPE_CR2_QSFP   = 21,   /* No, 2, 50G*/
-	FW_PORT_TYPE_CR2_CFP4   = 22,   /* No, 2, 50G*/
-	FW_PORT_TYPE_SFP28      = 23,   /* No, 1, 25G*/
-
+	FW_PORT_TYPE_KR4_100G	= 16, /* No, 4, 100G/40G/25G, Backplane */
+	FW_PORT_TYPE_CR4_QSFP	= 17, /* No, 4, 100G/40G/25G */
+	FW_PORT_TYPE_CR_QSFP	= 18, /* No, 1, 25G Spider cable */
+	FW_PORT_TYPE_CR2_QSFP	= 19, /* No, 2, 50G */
+	FW_PORT_TYPE_SFP28	= 20, /* No, 1, 25G/10G/1G */
+	FW_PORT_TYPE_KR_SFP28	= 21, /* No, 1, 25G/10G/1G using Backplane */
 	FW_PORT_TYPE_NONE = M_FW_PORT_CMD_PTYPE
 };
 
Signature · 1 line
2.5.3
#2 lore raw

PATCH 2/2 cxgbe: fix supported speed capabilities

In reply to Rahul Lakkireddy

Use port type to determine the supported speed capabilities.

---
 doc/guides/nics/features/cxgbe.ini |   2 +-
 drivers/net/cxgbe/cxgbe.h          |   1 +
 drivers/net/cxgbe/cxgbe_ethdev.c   |   2 +-
 drivers/net/cxgbe/cxgbe_main.c     | 104 +++++++++++++++++++++++++++++++++++++
 4 files changed, 107 insertions(+), 2 deletions(-)
doc/guides/nics/features/cxgbe.ini +1 -1
index 2cf0af3..3d0fde2 100644
@@ -4,7 +4,7 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Features]
-Speed capabilities   = P
+Speed capabilities   = Y
 Link status          = Y
 Queue start/stop     = Y
 MTU update           = Y
drivers/net/cxgbe/cxgbe.h +1 -0
index 9120c43..f989154 100644
@@ -47,6 +47,7 @@
 #define CXGBE_MAX_RX_PKTLEN (9000 + ETHER_HDR_LEN + ETHER_CRC_LEN) /* max pkt */
 
 int cxgbe_probe(struct adapter *adapter);
+void cxgbe_get_speed_caps(struct port_info *pi, u32 *speed_caps);
 int cxgbe_up(struct adapter *adap);
 int cxgbe_down(struct port_info *pi);
 void cxgbe_close(struct adapter *adapter);
drivers/net/cxgbe/cxgbe_ethdev.c +1 -1
index b622d25..981dd47 100644
@@ -175,7 +175,7 @@ static void cxgbe_dev_info_get(struct rte_eth_dev *eth_dev,
 
 	device_info->rx_desc_lim = cxgbe_desc_lim;
 	device_info->tx_desc_lim = cxgbe_desc_lim;
-	device_info->speed_capa = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_40G;
+	cxgbe_get_speed_caps(pi, &device_info->speed_capa);
 }
 
 static void cxgbe_dev_promiscuous_enable(struct rte_eth_dev *eth_dev)
drivers/net/cxgbe/cxgbe_main.c +104 -0

110 lines not on this page · raw message

Signature · 1 line
2.5.3
#3 lore raw
In reply to Rahul Lakkireddy
Quoted 9 lines · Rahul Lakkireddy

Patch 1 updates supported port module types.
Patch 2 uses port type to determine the supported speed capabilities.

Thanks,
Rahul

Rahul Lakkireddy (2):
cxgbe: update supported port module types
cxgbe: fix supported speed capabilities

Series applied to dpdk-next-net/master, thanks.