patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: support speed capabilities query
@ 2020-08-12  3:52 Kalesh A P
  2020-08-12  3:52 ` [dpdk-stable] [PATCH 19.11 2/2] net/bnxt: fix setting link speed Kalesh A P
  2020-08-12  8:38 ` [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: support speed capabilities query Luca Boccassi
  0 siblings, 2 replies; 5+ messages in thread
From: Kalesh A P @ 2020-08-12  3:52 UTC (permalink / raw)
  To: stable; +Cc: ajit.khaparde, bluca

From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

[ upstream commit 85cf7f2bba0f665fe91710cd1cf0ca852f73890a ]

Added information about supported speeds for the port in the
"dev_infos_get". As other PMDs are returning the speed capabilities,
apps may expect this behavior from bnxt PMD.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index fe240b6..90e1a33 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -490,6 +490,40 @@ static int bnxt_shutdown_nic(struct bnxt *bp)
  * Device configuration and status function
  */
 
+static uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
+{
+	uint32_t link_speed = bp->link_info.support_speeds;
+	uint32_t speed_capa = 0;
+
+	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100MB)
+		speed_capa |= ETH_LINK_SPEED_100M;
+	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100MBHD)
+		speed_capa |= ETH_LINK_SPEED_100M_HD;
+	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GB)
+		speed_capa |= ETH_LINK_SPEED_1G;
+	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2_5GB)
+		speed_capa |= ETH_LINK_SPEED_2_5G;
+	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB)
+		speed_capa |= ETH_LINK_SPEED_10G;
+	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_20GB)
+		speed_capa |= ETH_LINK_SPEED_20G;
+	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_25GB)
+		speed_capa |= ETH_LINK_SPEED_25G;
+	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_40GB)
+		speed_capa |= ETH_LINK_SPEED_40G;
+	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_50GB)
+		speed_capa |= ETH_LINK_SPEED_50G;
+	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB)
+		speed_capa |= ETH_LINK_SPEED_100G;
+
+	if (bp->link_info.auto_mode == HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_NONE)
+		speed_capa |= ETH_LINK_SPEED_FIXED;
+	else
+		speed_capa |= ETH_LINK_SPEED_AUTONEG;
+
+	return speed_capa;
+}
+
 static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
 				struct rte_eth_dev_info *dev_info)
 {
@@ -533,6 +567,8 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
 	dev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT;
 	dev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT;
 
+	dev_info->speed_capa = bnxt_get_speed_capabilities(bp);
+
 	/* *INDENT-OFF* */
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_thresh = {
-- 
2.10.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-stable] [PATCH 19.11 2/2] net/bnxt: fix setting link speed
  2020-08-12  3:52 [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: support speed capabilities query Kalesh A P
@ 2020-08-12  3:52 ` Kalesh A P
  2020-08-12  8:38 ` [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: support speed capabilities query Luca Boccassi
  1 sibling, 0 replies; 5+ messages in thread
From: Kalesh A P @ 2020-08-12  3:52 UTC (permalink / raw)
  To: stable; +Cc: ajit.khaparde, bluca

From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

[ upstream commit 0466d286cdedc98ab561fcb23fb125e6d9329678 ]

bnxt PMD uses the macro BNXT_SUPPORTED_SPEEDS to validate
the user requested speed. But this has all the speed values
supported by the PMD and is not chip specific.

The check against this macro returns success when the user
tries set the speed to 100G on a port even if the chip does
not support 100G speed.

Fixed it to use bnxt_get_speed_capabilities() to check the
supported speeds by the chip.

Fixes: 1d0704f4d793 ("net/bnxt: add device configure operation")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  1 +
 drivers/net/bnxt/bnxt_ethdev.c |  2 +-
 drivers/net/bnxt/bnxt_hwrm.c   | 14 +++++++++-----
 3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 46cf418..d9fe943 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -680,6 +680,7 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp);
 
 bool is_bnxt_supported(struct rte_eth_dev *dev);
 bool bnxt_stratus_device(struct bnxt *bp);
+uint32_t bnxt_get_speed_capabilities(struct bnxt *bp);
 extern const struct rte_flow_ops bnxt_flow_ops;
 #define bnxt_acquire_flow_lock(bp) \
 	pthread_mutex_lock(&(bp)->flow_lock)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 90e1a33..8e65839 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -490,7 +490,7 @@ static int bnxt_shutdown_nic(struct bnxt *bp)
  * Device configuration and status function
  */
 
-static uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
+uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
 {
 	uint32_t link_speed = bp->link_info.support_speeds;
 	uint32_t speed_capa = 0;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index fed1aa3..0e73f08 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2684,13 +2684,18 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed)
 		ETH_LINK_SPEED_10G | ETH_LINK_SPEED_20G | ETH_LINK_SPEED_25G | \
 		ETH_LINK_SPEED_40G | ETH_LINK_SPEED_50G | ETH_LINK_SPEED_100G)
 
-static int bnxt_valid_link_speed(uint32_t link_speed, uint16_t port_id)
+static int bnxt_validate_link_speed(struct bnxt *bp)
 {
+	uint32_t link_speed = bp->eth_dev->data->dev_conf.link_speeds;
+	uint16_t port_id = bp->eth_dev->data->port_id;
+	uint32_t link_speed_capa;
 	uint32_t one_speed;
 
 	if (link_speed == ETH_LINK_SPEED_AUTONEG)
 		return 0;
 
+	link_speed_capa = bnxt_get_speed_capabilities(bp);
+
 	if (link_speed & ETH_LINK_SPEED_FIXED) {
 		one_speed = link_speed & ~ETH_LINK_SPEED_FIXED;
 
@@ -2700,14 +2705,14 @@ static int bnxt_valid_link_speed(uint32_t link_speed, uint16_t port_id)
 				link_speed, port_id);
 			return -EINVAL;
 		}
-		if ((one_speed & BNXT_SUPPORTED_SPEEDS) != one_speed) {
+		if ((one_speed & link_speed_capa) != one_speed) {
 			PMD_DRV_LOG(ERR,
 				"Unsupported advertised speed (%u) for port %u\n",
 				link_speed, port_id);
 			return -EINVAL;
 		}
 	} else {
-		if (!(link_speed & BNXT_SUPPORTED_SPEEDS)) {
+		if (!(link_speed & link_speed_capa)) {
 			PMD_DRV_LOG(ERR,
 				"Unsupported advertised speeds (%u) for port %u\n",
 				link_speed, port_id);
@@ -2848,8 +2853,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
 	if (!BNXT_SINGLE_PF(bp) || BNXT_VF(bp))
 		return 0;
 
-	rc = bnxt_valid_link_speed(dev_conf->link_speeds,
-			bp->eth_dev->data->port_id);
+	rc = bnxt_validate_link_speed(bp);
 	if (rc)
 		goto error;
 
-- 
2.10.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: support speed capabilities query
  2020-08-12  3:52 [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: support speed capabilities query Kalesh A P
  2020-08-12  3:52 ` [dpdk-stable] [PATCH 19.11 2/2] net/bnxt: fix setting link speed Kalesh A P
@ 2020-08-12  8:38 ` Luca Boccassi
  2020-08-13  4:29   ` Ajit Khaparde
  1 sibling, 1 reply; 5+ messages in thread
From: Luca Boccassi @ 2020-08-12  8:38 UTC (permalink / raw)
  To: Kalesh A P, stable; +Cc: ajit.khaparde

On Wed, 2020-08-12 at 09:22 +0530, Kalesh A P wrote:
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> 
> [ upstream commit 85cf7f2bba0f665fe91710cd1cf0ca852f73890a ]
> 
> Added information about supported speeds for the port in the
> "dev_infos_get". As other PMDs are returning the speed capabilities,
> apps may expect this behavior from bnxt PMD.
> 
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt_ethdev.c | 36 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
> 
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index fe240b6..90e1a33 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -490,6 +490,40 @@ static int bnxt_shutdown_nic(struct bnxt *bp)
>   * Device configuration and status function
>   */
>  
> +static uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
> +{
> +	uint32_t link_speed = bp->link_info.support_speeds;
> +	uint32_t speed_capa = 0;
> +
> +	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100MB)
> +		speed_capa |= ETH_LINK_SPEED_100M;
> +	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100MBHD)
> +		speed_capa |= ETH_LINK_SPEED_100M_HD;
> +	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GB)
> +		speed_capa |= ETH_LINK_SPEED_1G;
> +	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2_5GB)
> +		speed_capa |= ETH_LINK_SPEED_2_5G;
> +	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB)
> +		speed_capa |= ETH_LINK_SPEED_10G;
> +	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_20GB)
> +		speed_capa |= ETH_LINK_SPEED_20G;
> +	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_25GB)
> +		speed_capa |= ETH_LINK_SPEED_25G;
> +	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_40GB)
> +		speed_capa |= ETH_LINK_SPEED_40G;
> +	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_50GB)
> +		speed_capa |= ETH_LINK_SPEED_50G;
> +	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB)
> +		speed_capa |= ETH_LINK_SPEED_100G;
> +
> +	if (bp->link_info.auto_mode == HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_NONE)
> +		speed_capa |= ETH_LINK_SPEED_FIXED;
> +	else
> +		speed_capa |= ETH_LINK_SPEED_AUTONEG;
> +
> +	return speed_capa;
> +}
> +
>  static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
>  				struct rte_eth_dev_info *dev_info)
>  {
> @@ -533,6 +567,8 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
>  	dev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT;
>  	dev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT;
>  
> +	dev_info->speed_capa = bnxt_get_speed_capabilities(bp);
> +
>  	/* *INDENT-OFF* */
>  	dev_info->default_rxconf = (struct rte_eth_rxconf) {
>  		.rx_thresh = {

Hi,

This smells like a feature? 20.02 does not have it, so what happens if
a user expects this to work and upgrades from 19.11.x to 20.02?

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: support speed capabilities query
  2020-08-12  8:38 ` [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: support speed capabilities query Luca Boccassi
@ 2020-08-13  4:29   ` Ajit Khaparde
  2020-08-13  8:47     ` Luca Boccassi
  0 siblings, 1 reply; 5+ messages in thread
From: Ajit Khaparde @ 2020-08-13  4:29 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: Kalesh A P, dpdk stable

Luca,

On Wed, Aug 12, 2020 at 1:38 AM Luca Boccassi <bluca@debian.org> wrote:

> On Wed, 2020-08-12 at 09:22 +0530, Kalesh A P wrote:
> > From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> >
> > [ upstream commit 85cf7f2bba0f665fe91710cd1cf0ca852f73890a ]
> >
> > Added information about supported speeds for the port in the
> > "dev_infos_get". As other PMDs are returning the speed capabilities,
> > apps may expect this behavior from bnxt PMD.
> >
> > Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> > Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> > ---
> >  drivers/net/bnxt/bnxt_ethdev.c | 36 ++++++++++++++++++++++++++++++++++++
> >  1 file changed, 36 insertions(+)
> >
> > diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> b/drivers/net/bnxt/bnxt_ethdev.c
> > index fe240b6..90e1a33 100644
> > --- a/drivers/net/bnxt/bnxt_ethdev.c
> > +++ b/drivers/net/bnxt/bnxt_ethdev.c
> > @@ -490,6 +490,40 @@ static int bnxt_shutdown_nic(struct bnxt *bp)
> >   * Device configuration and status function
> >   */
> >
> > +static uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
> > +{
> > +     uint32_t link_speed = bp->link_info.support_speeds;
> > +     uint32_t speed_capa = 0;
> > +
> > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100MB)
> > +             speed_capa |= ETH_LINK_SPEED_100M;
> > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100MBHD)
> > +             speed_capa |= ETH_LINK_SPEED_100M_HD;
> > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GB)
> > +             speed_capa |= ETH_LINK_SPEED_1G;
> > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2_5GB)
> > +             speed_capa |= ETH_LINK_SPEED_2_5G;
> > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB)
> > +             speed_capa |= ETH_LINK_SPEED_10G;
> > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_20GB)
> > +             speed_capa |= ETH_LINK_SPEED_20G;
> > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_25GB)
> > +             speed_capa |= ETH_LINK_SPEED_25G;
> > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_40GB)
> > +             speed_capa |= ETH_LINK_SPEED_40G;
> > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_50GB)
> > +             speed_capa |= ETH_LINK_SPEED_50G;
> > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB)
> > +             speed_capa |= ETH_LINK_SPEED_100G;
> > +
> > +     if (bp->link_info.auto_mode ==
> HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_NONE)
> > +             speed_capa |= ETH_LINK_SPEED_FIXED;
> > +     else
> > +             speed_capa |= ETH_LINK_SPEED_AUTONEG;
> > +
> > +     return speed_capa;
> > +}
> > +
> >  static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
> >                               struct rte_eth_dev_info *dev_info)
> >  {
> > @@ -533,6 +567,8 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev
> *eth_dev,
> >       dev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT;
> >       dev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT;
> >
> > +     dev_info->speed_capa = bnxt_get_speed_capabilities(bp);
> > +
> >       /* *INDENT-OFF* */
> >       dev_info->default_rxconf = (struct rte_eth_rxconf) {
> >               .rx_thresh = {
>
> Hi,
>
> This smells like a feature? 20.02 does not have it, so what happens if
> a user expects this to work and upgrades from 19.11.x to 20.02?
>
Well in this example, the user will see a regression.
A dumb question.. Does it ever happen that a user upgrades from an LTS
like 19.11.x to 20.02?

Thanks
Ajit

>
> --
> Kind regards,
> Luca Boccassi
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: support speed capabilities query
  2020-08-13  4:29   ` Ajit Khaparde
@ 2020-08-13  8:47     ` Luca Boccassi
  0 siblings, 0 replies; 5+ messages in thread
From: Luca Boccassi @ 2020-08-13  8:47 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Kalesh A P, dpdk stable

On Wed, 2020-08-12 at 21:29 -0700, Ajit Khaparde wrote:
> Luca,
> 
> On Wed, Aug 12, 2020 at 1:38 AM Luca Boccassi <bluca@debian.org> wrote:
> 
> > On Wed, 2020-08-12 at 09:22 +0530, Kalesh A P wrote:
> > > From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> > > 
> > > [ upstream commit 85cf7f2bba0f665fe91710cd1cf0ca852f73890a ]
> > > 
> > > Added information about supported speeds for the port in the
> > > "dev_infos_get". As other PMDs are returning the speed capabilities,
> > > apps may expect this behavior from bnxt PMD.
> > > 
> > > Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> > > Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> > > ---
> > >  drivers/net/bnxt/bnxt_ethdev.c | 36 ++++++++++++++++++++++++++++++++++++
> > >  1 file changed, 36 insertions(+)
> > > 
> > > diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> > b/drivers/net/bnxt/bnxt_ethdev.c
> > > index fe240b6..90e1a33 100644
> > > --- a/drivers/net/bnxt/bnxt_ethdev.c
> > > +++ b/drivers/net/bnxt/bnxt_ethdev.c
> > > @@ -490,6 +490,40 @@ static int bnxt_shutdown_nic(struct bnxt *bp)
> > >   * Device configuration and status function
> > >   */
> > > 
> > > +static uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
> > > +{
> > > +     uint32_t link_speed = bp->link_info.support_speeds;
> > > +     uint32_t speed_capa = 0;
> > > +
> > > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100MB)
> > > +             speed_capa |= ETH_LINK_SPEED_100M;
> > > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100MBHD)
> > > +             speed_capa |= ETH_LINK_SPEED_100M_HD;
> > > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GB)
> > > +             speed_capa |= ETH_LINK_SPEED_1G;
> > > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2_5GB)
> > > +             speed_capa |= ETH_LINK_SPEED_2_5G;
> > > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB)
> > > +             speed_capa |= ETH_LINK_SPEED_10G;
> > > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_20GB)
> > > +             speed_capa |= ETH_LINK_SPEED_20G;
> > > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_25GB)
> > > +             speed_capa |= ETH_LINK_SPEED_25G;
> > > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_40GB)
> > > +             speed_capa |= ETH_LINK_SPEED_40G;
> > > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_50GB)
> > > +             speed_capa |= ETH_LINK_SPEED_50G;
> > > +     if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB)
> > > +             speed_capa |= ETH_LINK_SPEED_100G;
> > > +
> > > +     if (bp->link_info.auto_mode ==
> > HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_NONE)
> > > +             speed_capa |= ETH_LINK_SPEED_FIXED;
> > > +     else
> > > +             speed_capa |= ETH_LINK_SPEED_AUTONEG;
> > > +
> > > +     return speed_capa;
> > > +}
> > > +
> > >  static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
> > >                               struct rte_eth_dev_info *dev_info)
> > >  {
> > > @@ -533,6 +567,8 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev
> > *eth_dev,
> > >       dev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT;
> > >       dev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT;
> > > 
> > > +     dev_info->speed_capa = bnxt_get_speed_capabilities(bp);
> > > +
> > >       /* *INDENT-OFF* */
> > >       dev_info->default_rxconf = (struct rte_eth_rxconf) {
> > >               .rx_thresh = {
> > 
> > Hi,
> > 
> > This smells like a feature? 20.02 does not have it, so what happens if
> > a user expects this to work and upgrades from 19.11.x to 20.02?
> > 
> Well in this example, the user will see a regression.
> A dumb question.. Does it ever happen that a user upgrades from an LTS
> like 19.11.x to 20.02?
> 
> Thanks
> Ajit

Hi,

I do not think we impose a "release date" based upgrade path, so I
think it's something that needs to be considered.

Now of course any missing bug fix would cause a regression - the
question is, would this be a bug in a behaviour in some corner case, or
is it a public interface/API/configuration that breaks?

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-13  8:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12  3:52 [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: support speed capabilities query Kalesh A P
2020-08-12  3:52 ` [dpdk-stable] [PATCH 19.11 2/2] net/bnxt: fix setting link speed Kalesh A P
2020-08-12  8:38 ` [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: support speed capabilities query Luca Boccassi
2020-08-13  4:29   ` Ajit Khaparde
2020-08-13  8:47     ` Luca Boccassi

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git