[dpdk-dev,v2,6/7] net/bnxt: add 100G speed detection
Checks
Commit Message
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(+)
Comments
On 1/25/2018 10:47 PM, Ajit Khaparde wrote:
> 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)
> 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].
[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:
^~~~
> + 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:
>
Please apply this patchset.
Ajit Khaparde (6):
net/bnxt: fix size of tx ring in HW
net/bnxt: use driver specific dynamic log type
net/bnxt: register for more async events
net/bnxt: check if MAC address is all zeros
net/bnxt: add 100G speed detection
net/bnxt: fix number of pools for RSS
Somnath Kotur (1):
net/bnxt: support for rx/tx_queue_start/stop ops
drivers/net/bnxt/bnxt.h | 8 ++
drivers/net/bnxt/bnxt_cpr.c | 19 ++-
drivers/net/bnxt/bnxt_ethdev.c | 282 +++++++++++++++++++++-------------------
drivers/net/bnxt/bnxt_filter.c | 44 +++----
drivers/net/bnxt/bnxt_filter.h | 1 +
drivers/net/bnxt/bnxt_hwrm.c | 182 +++++++++++++++-----------
drivers/net/bnxt/bnxt_hwrm.h | 13 ++
drivers/net/bnxt/bnxt_irq.c | 4 +-
drivers/net/bnxt/bnxt_ring.c | 12 +-
drivers/net/bnxt/bnxt_rxq.c | 77 +++++++++--
drivers/net/bnxt/bnxt_rxq.h | 6 +-
drivers/net/bnxt/bnxt_rxr.c | 23 ++--
drivers/net/bnxt/bnxt_rxr.h | 3 +-
drivers/net/bnxt/bnxt_stats.c | 16 +--
drivers/net/bnxt/bnxt_txq.c | 10 +-
drivers/net/bnxt/bnxt_txq.h | 1 -
drivers/net/bnxt/bnxt_txr.c | 34 ++++-
drivers/net/bnxt/bnxt_txr.h | 2 +
drivers/net/bnxt/bnxt_vnic.c | 14 +-
drivers/net/bnxt/bnxt_vnic.h | 1 -
drivers/net/bnxt/rte_pmd_bnxt.c | 48 +++----
21 files changed, 482 insertions(+), 318 deletions(-)
On Fri, Jan 26, 2018 at 9:08 AM, Ferruh Yigit <ferruh.yigit@intel.com>
wrote:
> On 1/25/2018 10:47 PM, Ajit Khaparde wrote:
> > 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)
> > 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:
> ^~~~
>
> > + 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:
> >
>
>
On 1/26/2018 5:31 PM, Ajit Khaparde wrote:
> Please apply this patchset.
>
> Ajit Khaparde (6):
> net/bnxt: fix size of tx ring in HW
> net/bnxt: use driver specific dynamic log type
> net/bnxt: register for more async events
> net/bnxt: check if MAC address is all zeros
> net/bnxt: add 100G speed detection
> net/bnxt: fix number of pools for RSS
>
> Somnath Kotur (1):
> net/bnxt: support for rx/tx_queue_start/stop ops
Series applied to dpdk-next-net/master, thanks.
@@ -2139,6 +2139,8 @@ static uint32_t bnxt_parse_hw_link_speed(uint16_t hw_link_speed)
break;
case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_50GB:
eth_link_speed = ETH_SPEED_NUM_50G;
+ 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: