Thread (31 messages) 31 messages, 2 authors, 2018-01-26

Re: [PATCH v2 6/7] net/bnxt: add 100G speed detection

From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: 2018-01-26 17:34:27

On Fri, Jan 26, 2018 at 9:08 AM, Ferruh Yigit [off-list ref]
wrote:
On 1/25/2018 10:47 PM, Ajit Khaparde wrote:
quoted
When the driver is loaded on a 100G NIC, the port speed is not
displayed correctly. Parse the 100G speed before displaying it.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 8fac05251..d412e51fc 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2139,6 +2139,8 @@ static uint32_t bnxt_parse_hw_link_speed(uint16_t
hw_link_speed)
quoted
              break;
      case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_50GB:
              eth_link_speed = ETH_SPEED_NUM_50G;
This case doesn't have a "break" statement, which looks like
unintentional, but
if it is intentional please put /* Fallthrough */ comment to prevent build
error
[1].
​No. Its unintentional. I copy pasted those lines from the test setup and
​missed it.

I am sending a fresh set. ​Thanks​

[1]
...dpdk/drivers/net/bnxt/bnxt_hwrm.c: In function
‘bnxt_parse_hw_link_speed’:
...dpdk/drivers/net/bnxt/bnxt_hwrm.c:2141:18: error: this statement may
fall
through [-Werror=implicit-fallthrough=]
   eth_link_speed = ETH_SPEED_NUM_50G;
...dpdk/drivers/net/bnxt/bnxt_hwrm.c:2142:2: note: here
  case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100GB:
  ^~~~
quoted
+     case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100GB:
+             eth_link_speed = ETH_SPEED_NUM_100G;
              break;
      case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_2GB:
      default:
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help