From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA032A034F for ; Wed, 11 Aug 2021 10:54:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AFF6040040; Wed, 11 Aug 2021 10:54:35 +0200 (CEST) Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by mails.dpdk.org (Postfix) with ESMTP id 0BBA340040 for ; Wed, 11 Aug 2021 10:54:35 +0200 (CEST) Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPS id B214F40618 for ; Wed, 11 Aug 2021 08:54:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1628672074; bh=4XYBlsPlzWzWNDorE3IDi/20z/3pLOYedrLWTE/hH/o=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=aI8gBsJoUQaM95LmS1s+4MuqdKtTboSpUl52rxXmpGOM12EhGHBmxOaoWTelifnXU TROm8G6As85bmQhWndixwDzycNIbKMNp6Ut9X3S8A4lxl9N0nspYACU29945FJBg3G MljUSXaEDMrCn9CxSzJvHukS72HCNAlwlsOQcC/uLx9aWPIsAPwuGBCaLhu/nTfPWN dXljWffBuNOIY8LGAJzf3RVqc+nX3XRGf8l3zNgbUhha3+lg1+gmnKznEfJyM2lu7Z Xit4xkao/SWJ+QT+rRH/zNQUv9ItP3+D5mubbJOeZ04bXdNHNr9StYQVFJ7nUDR9rf bNCR5yxq6uFYg== Received: by mail-qk1-f200.google.com with SMTP id w2-20020a3794020000b02903b54f40b442so976456qkd.0 for ; Wed, 11 Aug 2021 01:54:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=4XYBlsPlzWzWNDorE3IDi/20z/3pLOYedrLWTE/hH/o=; b=ZiOpB0K4wEAx9I4mL6yxxhXs+CBa6QwLklOfmYXdeboJsN/trdgPmmlDvhS60K2DQF nowhPn3xP3fOdfXpRJtP7qr2ANV2oY/hA8FuJ6mMp0c6qRIYnQ/juYlmBoJl2slR5yXu fjAxj9uVVcw15XS8KFomHLiClSoME3edxPt6Cs2O4QtTCHTfDWyZAtrNx++C6zbJivmU +cU2XIlNe79Y+tBS+vgXgaFLi/wvQKk04rWWtFo9wHZuYyQhc+F8Br1IOuXLKNpt9U16 DOjwzXvNeDCYyUwQRdmjbGfoirbGYl6SZLNwUT5oauJ0HJdj+5eIX4/f8j6KykKcnuWV TSfg== X-Gm-Message-State: AOAM531HWSb4SqlorsVFHMPN6qwb6KPVwGYhAQPUKpBA9l3Ve0C9WtEV QkKztE9li2zNWfqfFhRQrOq+P97ySnjqmB4vQFnb64YTdBIV2THS0cKzMCo5LRnl88g8W0Gy0KW Yvr7XbdrdK/gRqXuHxpWFhgesCjr2lBbpU8lc27di X-Received: by 2002:a0c:c78f:: with SMTP id k15mr21935719qvj.20.1628672073662; Wed, 11 Aug 2021 01:54:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+Bb29n6t2E0GxwzSnXFTLM+SOr8HnAOpd1iyXt07W5mF+VKz1zMBxMtGxrAfS/LhnRzKo5Ji2OIc3By7uKd4= X-Received: by 2002:a0c:c78f:: with SMTP id k15mr21935713qvj.20.1628672073471; Wed, 11 Aug 2021 01:54:33 -0700 (PDT) MIME-Version: 1.0 References: <20210810154022.749358-1-christian.ehrhardt@canonical.com> <20210810154022.749358-70-christian.ehrhardt@canonical.com> In-Reply-To: <20210810154022.749358-70-christian.ehrhardt@canonical.com> From: Christian Ehrhardt Date: Wed, 11 Aug 2021 10:54:07 +0200 Message-ID: To: Kalesh AP Cc: Ajit Khaparde , Lance Richardson , Somnath Kotur , dpdk stable Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-stable] patch 'net/bnxt: clear cached statistics' has been queued to stable release 19.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Tue, Aug 10, 2021 at 5:43 PM wrote: > > Hi, > > FYI, your patch has been queued to stable release 19.11.10 Hi, while applying cleanly your patch caused build time failures like: ../drivers/net/bnxt/bnxt_stats.c: In function =E2=80=98bnxt_clear_prev_stat= =E2=80=99: ../drivers/net/bnxt/bnxt_stats.c:433:11: error: =E2=80=98struct bnxt=E2=80= =99 has no member named =E2=80=98prev_rx_ring_stats=E2=80=99 433 | memset(bp->prev_rx_ring_stats, 0, sizeof(struct bnxt_ring_stats) * bp->rx_cp_nr_rings); | ^~ ../drivers/net/bnxt/bnxt_stats.c:433:43: error: invalid application of =E2=80=98sizeof=E2=80=99 to incomplete type =E2=80=98struct bnxt_ring_stats= =E2=80=99 433 | memset(bp->prev_rx_ring_stats, 0, sizeof(struct bnxt_ring_stats) * bp->rx_cp_nr_rings); | ^~~~~~ ../drivers/net/bnxt/bnxt_stats.c:434:11: error: =E2=80=98struct bnxt=E2=80= =99 has no member named =E2=80=98prev_tx_ring_stats=E2=80=99 434 | memset(bp->prev_tx_ring_stats, 0, sizeof(struct bnxt_ring_stats) * bp->tx_cp_nr_rings); | ^~ ../drivers/net/bnxt/bnxt_stats.c:434:43: error: invalid application of =E2=80=98sizeof=E2=80=99 to incomplete type =E2=80=98struct bnxt_ring_stats= =E2=80=99 434 | memset(bp->prev_tx_ring_stats, 0, sizeof(struct bnxt_ring_stats) * bp->tx_cp_nr_rings); | Therefore the patch will be de-qeueud from the stable branch that shall bec= ome 19.11.10. Please consider having a look and providing a backport. A backport should contain a reference to the DPDK main branch commit in it's commit message in the following fashion: [ upstream commit ] For example: https://git.dpdk.org/dpdk-stable/commit/?h=3D18.11&id=3Dd90e6ae6f936ecd= c2fd3811ff9f26aec7f3c06eb When sending the backported patch, please indicate the target branch in the subject line, as we have multiple branches, for example: [PATCH 19.11] foo/bar: fix baz With git format-patch, this can be achieved by appending the parameter: --subject-prefix=3D'PATCH 19.11' Send the backported patch to "stable@dpdk.org" but not "dev@dpdk.org". FYI, branch 19.11 is located at tree: https://git.dpdk.org/dpdk-stable Thanks in advance, Chrtistian > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. > It will be pushed if I get no objections before 08/12/21. So please > shout if anyone has objections. > > Also note that after the patch there's a diff of the upstream commit vs t= he > 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 reba= sing > (ie: not only metadata diffs), please double check that the rebase was > correctly done. > > Queued patches are on a temporary branch at: > https://github.com/cpaelzer/dpdk-stable-queue > > This queued commit can be viewed at: > https://github.com/cpaelzer/dpdk-stable-queue/commit/a0776bdb0995d658f4c9= 793b70b56fe7f4118e5f > > Thanks. > > Christian Ehrhardt > > --- > From a0776bdb0995d658f4c9793b70b56fe7f4118e5f Mon Sep 17 00:00:00 2001 > From: Kalesh AP > Date: Tue, 13 Jul 2021 19:04:13 +0530 > Subject: [PATCH] net/bnxt: clear cached statistics > > [ upstream commit 84fd852caac19795d0a05af8dabce8f011fe61a4 ] > > As part of the workaround put in the commit "219842b9990c", > driver caches the last read stats values from the hardware. > But this is not cleared during the clear stats operation. This > results in showing up stale stats values while reading the stats > after the clear operation. > > Fixes: 219842b9990c ("net/bnxt: workaround spurious zero stats in Thor") > > Signed-off-by: Kalesh AP > Reviewed-by: Ajit Khaparde > Reviewed-by: Lance Richardson > Reviewed-by: Somnath Kotur > --- > drivers/net/bnxt/bnxt_stats.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.= c > index 692b0967eb..a30e2b465d 100644 > --- a/drivers/net/bnxt/bnxt_stats.c > +++ b/drivers/net/bnxt/bnxt_stats.c > @@ -424,6 +424,16 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, > return rc; > } > > +static void bnxt_clear_prev_stat(struct bnxt *bp) > +{ > + /* > + * Clear the cached values of stats returned by HW in the previou= s > + * get operation. > + */ > + memset(bp->prev_rx_ring_stats, 0, sizeof(struct bnxt_ring_stats) = * bp->rx_cp_nr_rings); > + memset(bp->prev_tx_ring_stats, 0, sizeof(struct bnxt_ring_stats) = * bp->tx_cp_nr_rings); > +} > + > int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev) > { > struct bnxt *bp =3D eth_dev->data->dev_private; > @@ -446,6 +456,8 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev) > rte_atomic64_clear(&rxq->rx_mbuf_alloc_fail); > } > > + bnxt_clear_prev_stat(bp); > + > return ret; > } > > @@ -611,5 +623,7 @@ int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_= dev) > PMD_DRV_LOG(ERR, "Failed to reset xstats: %s\n", > strerror(-ret)); > > + bnxt_clear_prev_stat(bp); > + > return ret; > } > -- > 2.32.0 > > --- > Diff of the applied patch vs upstream commit (please double-check if no= n-empty: > --- > --- - 2021-08-10 15:11:15.728060604 +0200 > +++ 0070-net-bnxt-clear-cached-statistics.patch 2021-08-10 15:11:13.07463= 8504 +0200 > @@ -1 +1 @@ > -From 84fd852caac19795d0a05af8dabce8f011fe61a4 Mon Sep 17 00:00:00 2001 > +From a0776bdb0995d658f4c9793b70b56fe7f4118e5f Mon Sep 17 00:00:00 2001 > @@ -5,0 +6,2 @@ > +[ upstream commit 84fd852caac19795d0a05af8dabce8f011fe61a4 ] > + > @@ -13 +14,0 @@ > -Cc: stable@dpdk.org > @@ -24 +25 @@ > -index c7b23f46a1..991eafc644 100644 > +index 692b0967eb..a30e2b465d 100644 > @@ -27 +28 @@ > -@@ -603,6 +603,16 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, > +@@ -424,6 +424,16 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, > @@ -44 +45 @@ > -@@ -625,6 +635,8 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev) > +@@ -446,6 +456,8 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev) > @@ -53 +54 @@ > -@@ -933,6 +945,8 @@ int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth= _dev) > +@@ -611,5 +623,7 @@ int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth= _dev) > @@ -61 +61,0 @@ > - --=20 Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd