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 280B2A04B3 for ; Tue, 24 Dec 2019 12:16:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1922D1252; Tue, 24 Dec 2019 12:16:52 +0100 (CET) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 426CA1252 for ; Tue, 24 Dec 2019 12:16:50 +0100 (CET) Received: by mail-wr1-f65.google.com with SMTP id j42so19506935wrj.12 for ; Tue, 24 Dec 2019 03:16:50 -0800 (PST) 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=VEWz87QEKVQUmW8Bni9VZCPjLpFXWyh1WUxyhYvWb8g=; b=ZOdM+Cu+UrN6cjeABjfiwrpIPOl/sMkxYD6EaU00k7xBvIsKWZvgyOaQ38lRMYeQ0Z eFIOjNuWGtJKCdy+QxGliWSCtC2jlVgFSkifMG4hgcELe7AZBnOtm/ZMpPzDJp3VO2Xc sT//FtVADQP/dqYsTwzDM2Ocw6pLdI68E+z62+4oVgAk0VlfySHhYLWsMHhOeFDEOegc hNJyNQYeReFLGWfi+DJjcXxCOaykitT8WDfslaU30CSbbGX2tkmNrfwOez402uHQGyS+ uyUtUqPV1hLg7NIcrLFmFNwwyytSfYSGOIkIADYnKg3LM+cj48cstQWoocJ8d0gwKF9m dcRQ== X-Gm-Message-State: APjAAAVwqr9Rko+u5f5f5XpJEwv5KYz1iPtsN6hLhadKyIOlTc2n3+L6 2Phbkv9juEpPZagTJvkjh/w/EgPg9KA= X-Google-Smtp-Source: APXvYqy/SvsypQqXNOI2BpV3w4ff3LpbevZxQdGratYt8qjo4ujeNB6FSATfUeyu6zP2NKPDqU5cqQ== X-Received: by 2002:a5d:50cf:: with SMTP id f15mr34904215wrt.381.1577186209966; Tue, 24 Dec 2019 03:16:49 -0800 (PST) Received: from localhost ([80.120.231.178]) by smtp.gmail.com with ESMTPSA id n3sm23241732wrs.8.2019.12.24.03.16.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2019 03:16:49 -0800 (PST) Message-ID: From: Luca Boccassi To: Kalesh Anakkur Purayil Cc: Somnath Kotur , Ajit Khaparde , dpdk stable Date: Tue, 24 Dec 2019 11:16:48 +0000 In-Reply-To: References: <20191219143447.21506-1-luca.boccassi@gmail.com> <20191219143447.21506-59-luca.boccassi@gmail.com> 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 'net/bnxt: fix stats errors handling' has been queued to LTS release 17.11.10 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" Hi, Thanks for checking, removed. On Thu, 2019-12-19 at 20:26 +0530, Kalesh Anakkur Purayil wrote: > Hi Luca, >=20 > NAK for this patch as the rebasing was not correctly done. You can > ignore this patch for now from 17.11 stable inclusion. >=20 > Regards, > Kalesh >=20 >=20 > On Thu, Dec 19, 2019 at 8:07 PM wrote: > > Hi, > >=20 > > FYI, your patch has been queued to LTS release 17.11.10 > >=20 > > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable > > yet. > > It will be pushed if I get no objections before 12/21/19. So please > > shout if anyone has objections. > >=20 > > Also note that after the patch there's a diff of the upstream > > commit vs the > > patch applied to the branch. This will indicate if there was any > > rebasing > > needed to apply to the stable branch. If there were code changes > > for rebasing > > (ie: not only metadata diffs), please double check that the rebase > > was > > correctly done. > >=20 > > Thanks. > >=20 > > Luca Boccassi > >=20 > > --- > > From ed1b2592aee44b786ac897651e9e5fc7ed350e9c Mon Sep 17 00:00:00 > > 2001 > > From: Kalesh AP > > Date: Wed, 9 Oct 2019 18:41:42 -0700 > > Subject: [PATCH] net/bnxt: fix stats errors handling > >=20 > > [ upstream commit 9f55e6ac7500e828d42e95100d5cb061e912be5c ] > >=20 > > This patch fixes few checks and few return values while getting > > and clearing device statistics. > >=20 > > 1. Fixed to return standard error code. > > 2. Clubbed few error checks > > 3. Removed an unnecessary return check > >=20 > > Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset") > > Fixes: 88920136688c ("net/bnxt: support xstats get by id") > >=20 > > Signed-off-by: Kalesh AP > > Reviewed-by: Somnath Kotur > > Reviewed-by: Ajit Khaparde > > --- > > drivers/net/bnxt/bnxt_stats.c | 21 +++++++++++---------- > > 1 file changed, 11 insertions(+), 10 deletions(-) > >=20 > > diff --git a/drivers/net/bnxt/bnxt_stats.c > > b/drivers/net/bnxt/bnxt_stats.c > > index f8bb4ed9e5..6497926162 100644 > > --- a/drivers/net/bnxt/bnxt_stats.c > > +++ b/drivers/net/bnxt/bnxt_stats.c > > @@ -360,16 +360,17 @@ int bnxt_dev_xstats_get_names_op(__rte_unused > > struct rte_eth_dev *eth_dev, > > void bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev) > > { > > struct bnxt *bp =3D (struct bnxt *)eth_dev->data- > > >dev_private; > > + int ret; > >=20 > > - if (bp->flags & BNXT_FLAG_PORT_STATS && !BNXT_NPAR_PF(bp)) > > - bnxt_hwrm_port_clr_stats(bp); > > - > > - if (BNXT_VF(bp)) > > - RTE_LOG(ERR, PMD, "Operation not supported on a VF > > device\n"); > > - if (BNXT_NPAR_PF(bp)) > > - RTE_LOG(ERR, PMD, "Operation not supported on a MF > > device\n"); > > - if (!(bp->flags & BNXT_FLAG_PORT_STATS)) > > + if (BNXT_VF(bp) || !BNXT_NPAR_PF(bp) || > > + !(bp->flags & BNXT_FLAG_PORT_STATS)) { > > RTE_LOG(ERR, PMD, "Operation not supported\n"); > > + } > > + > > + ret =3D bnxt_hwrm_port_clr_stats(bp); > > + if (ret !=3D 0) > > + RTE_LOG(ERR, PMD, "Failed to reset xstats: %s\n", > > + strerror(-ret)); > > } > >=20 > > int bnxt_dev_xstats_get_by_id_op(struct rte_eth_dev *dev, const > > uint64_t *ids, > > @@ -389,7 +390,7 @@ int bnxt_dev_xstats_get_by_id_op(struct > > rte_eth_dev *dev, const uint64_t *ids, > > for (i =3D 0; i < limit; i++) { > > if (ids[i] >=3D stat_cnt) { > > RTE_LOG(ERR, PMD, "id value isn't valid"); > > - return -1; > > + return -EINVAL; > > } > > values[i] =3D values_copy[ids[i]]; > > } > > @@ -415,7 +416,7 @@ int bnxt_dev_xstats_get_names_by_id_op(struct > > rte_eth_dev *dev, > > for (i =3D 0; i < limit; i++) { > > if (ids[i] >=3D stat_cnt) { > > RTE_LOG(ERR, PMD, "id value isn't valid"); > > - return -1; > > + return -EINVAL; > > } > > strcpy(xstats_names[i].name, > > xstats_names_copy[ids[i]].name); > > --=20 > > 2.20.1 > >=20 > > --- > > Diff of the applied patch vs upstream commit (please double-check=20 > > if non-empty: > > --- > > --- - 2019-12-19 14:32:28.664004493 +0000 > > +++ 0059-net-bnxt-fix-stats-errors-handling.patch 2019-12-19 > > 14:32:26.109297904 +0000 > > @@ -1,8 +1,10 @@ > > -From 9f55e6ac7500e828d42e95100d5cb061e912be5c Mon Sep 17 00:00:00 > > 2001 > > +From ed1b2592aee44b786ac897651e9e5fc7ed350e9c Mon Sep 17 00:00:00 > > 2001 > > From: Kalesh AP > > Date: Wed, 9 Oct 2019 18:41:42 -0700 > > Subject: [PATCH] net/bnxt: fix stats errors handling > >=20 > > +[ upstream commit 9f55e6ac7500e828d42e95100d5cb061e912be5c ] > > + > > This patch fixes few checks and few return values while getting > > and clearing device statistics. > >=20 > > @@ -12,90 +14,57 @@ > >=20 > > Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset") > > Fixes: 88920136688c ("net/bnxt: support xstats get by id") > > -Cc: stable@dpdk.org > >=20 > > Signed-off-by: Kalesh AP > > Reviewed-by: Somnath Kotur > > Reviewed-by: Ajit Khaparde > > --- > > - drivers/net/bnxt/bnxt_stats.c | 36 +++++++++++------------------- > > ----- > > - 1 file changed, 11 insertions(+), 25 deletions(-) > > + drivers/net/bnxt/bnxt_stats.c | 21 +++++++++++---------- > > + 1 file changed, 11 insertions(+), 10 deletions(-) > >=20 > > diff --git a/drivers/net/bnxt/bnxt_stats.c > > b/drivers/net/bnxt/bnxt_stats.c > > -index 21012e1fee..f486a5634b 100644 > > +index f8bb4ed9e5..6497926162 100644 > > --- a/drivers/net/bnxt/bnxt_stats.c > > +++ b/drivers/net/bnxt/bnxt_stats.c > > -@@ -360,7 +360,7 @@ int bnxt_stats_get_op(struct rte_eth_dev > > *eth_dev, > > - memset(bnxt_stats, 0, sizeof(*bnxt_stats)); > > - if (!(bp->flags & BNXT_FLAG_INIT_DONE)) { > > - PMD_DRV_LOG(ERR, "Device Initialization not > > complete!\n"); > > -- return -1; > > -+ return -EIO; > > - } > > -=20 > > - num_q_stats =3D RTE_MIN(bp->rx_cp_nr_rings, > > -@@ -390,9 +390,8 @@ int bnxt_stats_get_op(struct rte_eth_dev > > *eth_dev, > > - if (unlikely(rc)) > > - return rc; > > - } > > -+ > > - rc =3D bnxt_hwrm_func_qstats(bp, 0xffff, bnxt_stats); > > -- if (unlikely(rc)) > > -- return rc; > > - return rc; > > - } > > +@@ -360,16 +360,17 @@ int > > bnxt_dev_xstats_get_names_op(__rte_unused struct rte_eth_dev > > *eth_dev, > > + void bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev) > > + { > > + struct bnxt *bp =3D (struct bnxt *)eth_dev->data- > > >dev_private; > > ++ int ret; > >=20 > > -@@ -573,30 +572,17 @@ int bnxt_dev_xstats_reset_op(struct > > rte_eth_dev *eth_dev) > > - if (ret) > > - return ret; > > -=20 > > -- if (bp->flags & BNXT_FLAG_PORT_STATS && BNXT_SINGLE_PF(bp)) > > { > > -- ret =3D bnxt_hwrm_port_clr_stats(bp); > > -- if (ret !=3D 0) { > > -- PMD_DRV_LOG(ERR, "Operation failed: %s\n", > > -- strerror(-ret)); > > -- return ret; > > -- } > > -- } > > -- > > -- ret =3D 0; > > +- if (bp->flags & BNXT_FLAG_PORT_STATS && !BNXT_NPAR_PF(bp)) > > +- bnxt_hwrm_port_clr_stats(bp); > > - > > -- if (BNXT_VF(bp)) { > > -- PMD_DRV_LOG(ERR, "Operation not supported on a VF > > device\n"); > > -- ret =3D -ENOTSUP; > > -- } > > -- if (!BNXT_SINGLE_PF(bp)) { > > -- PMD_DRV_LOG(ERR, "Operation not supported on a MF > > device\n"); > > -- ret =3D -ENOTSUP; > > -- } > > -- if (!(bp->flags & BNXT_FLAG_PORT_STATS)) { > > -+ if (BNXT_VF(bp) || !BNXT_SINGLE_PF(bp) || > > +- if (BNXT_VF(bp)) > > +- RTE_LOG(ERR, PMD, "Operation not supported on a VF > > device\n"); > > +- if (BNXT_NPAR_PF(bp)) > > +- RTE_LOG(ERR, PMD, "Operation not supported on a MF > > device\n"); > > +- if (!(bp->flags & BNXT_FLAG_PORT_STATS)) > > ++ if (BNXT_VF(bp) || !BNXT_NPAR_PF(bp) || > > + !(bp->flags & BNXT_FLAG_PORT_STATS)) { > > - PMD_DRV_LOG(ERR, "Operation not supported\n"); > > - ret =3D -ENOTSUP; > > - } > > -=20 > > + RTE_LOG(ERR, PMD, "Operation not supported\n"); > > ++ } > > ++ > > + ret =3D bnxt_hwrm_port_clr_stats(bp); > > + if (ret !=3D 0) > > -+ PMD_DRV_LOG(ERR, "Failed to reset xstats: %s\n", > > ++ RTE_LOG(ERR, PMD, "Failed to reset xstats: %s\n", > > + strerror(-ret)); > > -+ > > - return ret; > > } > >=20 > > -@@ -625,7 +611,7 @@ int bnxt_dev_xstats_get_by_id_op(struct > > rte_eth_dev *dev, const uint64_t *ids, > > + int bnxt_dev_xstats_get_by_id_op(struct rte_eth_dev *dev, const > > uint64_t *ids, > > +@@ -389,7 +390,7 @@ int bnxt_dev_xstats_get_by_id_op(struct > > rte_eth_dev *dev, const uint64_t *ids, > > for (i =3D 0; i < limit; i++) { > > if (ids[i] >=3D stat_cnt) { > > - PMD_DRV_LOG(ERR, "id value isn't valid"); > > + RTE_LOG(ERR, PMD, "id value isn't valid"); > > - return -1; > > + return -EINVAL; > > } > > values[i] =3D values_copy[ids[i]]; > > } > > -@@ -659,7 +645,7 @@ int bnxt_dev_xstats_get_names_by_id_op(struct > > rte_eth_dev *dev, > > +@@ -415,7 +416,7 @@ int bnxt_dev_xstats_get_names_by_id_op(struct > > rte_eth_dev *dev, > > for (i =3D 0; i < limit; i++) { > > if (ids[i] >=3D stat_cnt) { > > - PMD_DRV_LOG(ERR, "id value isn't valid"); > > + RTE_LOG(ERR, PMD, "id value isn't valid"); > > - return -1; > > + return -EINVAL; > > } >=20 >=20 >=20 --=20 Kind regards, Luca Boccassi