From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C367BA04B0 for ; Thu, 13 Aug 2020 10:48:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ABBE71C031; Thu, 13 Aug 2020 10:48:01 +0200 (CEST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id B7BD21C031 for ; Thu, 13 Aug 2020 10:47:59 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id y3so4514101wrl.4 for ; Thu, 13 Aug 2020 01:47:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=d7cWqJcAvD3MfgnDDwuOGSVC+2uW/fv7Dn0weHng0ns=; b=tfAtLrVG+0UqzMnSvsy03hdlBKu3BKRvHfrizNzUkdFNWhp222qhC1FpGJZTYocyGL I+5HiV6rIWOw19viksLPBQSpIAvUdUrxJkzzRVjFhIVYZP+D9wJ6Ktm3+Xsu0TCvqcEF jCtOY+BUfw2uZ2HoaHYmQo8+fZzMxXvZdVR21qcXj6BS3IgFtqOkhWIyNbenTih3BX1j 3tOBYgdbAMfBb+rw7WM1vbjfOKuJnOB3QuN1NOw8g4sMc0crdB3J28RRbbOKOi+WvdMq d3LvrAMMdAx/W/kuiss0m1zhYD2SyF5rylNBahYGnYipVyVKE/kyR6nMSPrOQlmDqIB1 Q/AQ== X-Gm-Message-State: AOAM531LXeKcGQlz1//9WaA320i0dS8ohCsUl/V2gaplciUbBUHNy71Q 4MDx5251SkuFjq/fe8IKYXY= X-Google-Smtp-Source: ABdhPJwnF28AX9L6cnLpuwaPcpbjUxZ6Cn4CBRIOBJfWf12di4h4XyFS9xMZvotdXWlGaosWoZWgjg== X-Received: by 2002:adf:de09:: with SMTP id b9mr3012583wrm.409.1597308479117; Thu, 13 Aug 2020 01:47:59 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id c10sm8486523wro.84.2020.08.13.01.47.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Aug 2020 01:47:57 -0700 (PDT) Message-ID: From: Luca Boccassi To: Ajit Khaparde Cc: Kalesh A P , dpdk stable Date: Thu, 13 Aug 2020 09:47:56 +0100 In-Reply-To: References: <20200812035235.32516-1-kalesh-anakkur.purayil@broadcom.com> <46749d3e5468b12d77f586181651666c38deffae.camel@debian.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: support speed capabilities query X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Wed, 2020-08-12 at 21:29 -0700, Ajit Khaparde wrote: > Luca, >=20 > On Wed, Aug 12, 2020 at 1:38 AM Luca Boccassi wrote: >=20 > > On Wed, 2020-08-12 at 09:22 +0530, Kalesh A P wrote: > > > From: Kalesh AP > > >=20 > > > [ upstream commit 85cf7f2bba0f665fe91710cd1cf0ca852f73890a ] > > >=20 > > > 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. > > >=20 > > > Signed-off-by: Kalesh AP > > > Reviewed-by: Ajit Khaparde > > > --- > > > drivers/net/bnxt/bnxt_ethdev.c | 36 ++++++++++++++++++++++++++++++++= ++++ > > > 1 file changed, 36 insertions(+) > > >=20 > > > 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 > > > */ > > >=20 > > > +static uint32_t bnxt_get_speed_capabilities(struct bnxt *bp) > > > +{ > > > + uint32_t link_speed =3D bp->link_info.support_speeds; > > > + uint32_t speed_capa =3D 0; > > > + > > > + if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100MB) > > > + speed_capa |=3D ETH_LINK_SPEED_100M; > > > + if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100MB= HD) > > > + speed_capa |=3D ETH_LINK_SPEED_100M_HD; > > > + if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GB) > > > + speed_capa |=3D ETH_LINK_SPEED_1G; > > > + if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2_5GB= ) > > > + speed_capa |=3D ETH_LINK_SPEED_2_5G; > > > + if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB) > > > + speed_capa |=3D ETH_LINK_SPEED_10G; > > > + if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_20GB) > > > + speed_capa |=3D ETH_LINK_SPEED_20G; > > > + if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_25GB) > > > + speed_capa |=3D ETH_LINK_SPEED_25G; > > > + if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_40GB) > > > + speed_capa |=3D ETH_LINK_SPEED_40G; > > > + if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_50GB) > > > + speed_capa |=3D ETH_LINK_SPEED_50G; > > > + if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB= ) > > > + speed_capa |=3D ETH_LINK_SPEED_100G; > > > + > > > + if (bp->link_info.auto_mode =3D=3D > > HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_NONE) > > > + speed_capa |=3D ETH_LINK_SPEED_FIXED; > > > + else > > > + speed_capa |=3D 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_de= v > > *eth_dev, > > > dev_info->tx_offload_capa =3D BNXT_DEV_TX_OFFLOAD_SUPPORT; > > > dev_info->flow_type_rss_offloads =3D BNXT_ETH_RSS_SUPPORT; > > >=20 > > > + dev_info->speed_capa =3D bnxt_get_speed_capabilities(bp); > > > + > > > /* *INDENT-OFF* */ > > > dev_info->default_rxconf =3D (struct rte_eth_rxconf) { > > > .rx_thresh =3D { > >=20 > > Hi, > >=20 > > 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? > >=20 > 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? >=20 > 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? --=20 Kind regards, Luca Boccassi