patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: Luca Boccassi <bluca@debian.org>
Cc: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>,
	dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: support speed capabilities query
Date: Wed, 12 Aug 2020 21:29:44 -0700	[thread overview]
Message-ID: <CACZ4nhsQeHHN_1fM7oy1DhG4ac00_Hp4vPRVxs9YvoDrF_aZhQ@mail.gmail.com> (raw)
In-Reply-To: <46749d3e5468b12d77f586181651666c38deffae.camel@debian.org>

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
>

  reply	other threads:[~2020-08-13  4:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
2020-08-13  4:29   ` Ajit Khaparde [this message]
2020-08-13  8:47     ` Luca Boccassi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACZ4nhsQeHHN_1fM7oy1DhG4ac00_Hp4vPRVxs9YvoDrF_aZhQ@mail.gmail.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=bluca@debian.org \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).