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 A481E41D4F for ; Thu, 23 Feb 2023 10:38:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 395EC43186; Thu, 23 Feb 2023 10:38:32 +0100 (CET) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mails.dpdk.org (Postfix) with ESMTP id 6746A43152 for ; Thu, 23 Feb 2023 10:38:30 +0100 (CET) Received: by mail-wm1-f41.google.com with SMTP id p18-20020a05600c359200b003dc57ea0dfeso9507356wmq.0 for ; Thu, 23 Feb 2023 01:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2GCnJ5tYUbBbsAHLib9+wKXQyQOg9/PFyatNV86a9mU=; b=GDJfBXG4Jnq1n6sDhF488k99EenZFU3M3iFM8NI3QwDgrIJqKyqb2jXbVg33qc8fPD RTQIkm5xUUbHOzT29uywq8g+ckj14A1aQ9IybtTSC4HwWiydI5mAboEB9dniy10XIAYC XgmBAjuf+VNXW7raCFVjAQ/j87iJOy+CKX9pfGiiN0lbVmj0M9V736szwrYNDVOk8h4m TANK12czK3hfJL2/ViAal4d1D5H2/sQFoVK8ZWEu3OmFQyQHaoyrtaeiiwuQ2Se4EEeW qv16OWoZ8DX3C7CMkNYC7fkf0ELWhs5kf4sKgIJcdWIDFcGhkH7ldZr/n+RtrCcPk4Ji ISWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2GCnJ5tYUbBbsAHLib9+wKXQyQOg9/PFyatNV86a9mU=; b=gScoAduLwhQ90LkoOEBI1hqgYxIEIbty9X0YdfR3G5i8RdhLeTxUP83olu2s247z0e 8eXIARvvvsgUM1MzB62P8zU7cc+4x4UxFAr53/+5ii8g3Gv5VLgrJkHG8/i1JNzZUnAw ZtCeW5Jt1uJH9dd0oj63bepYZ3hk3oVwhM7+C3dFSifJgvVycwHGm8KOkzoZ4gPa2EXO FDx0nOtPosFCIJdufpRKfBwmMkPRLT8R0HGgcbLTzHabKPBOfc/rxCcqEAa3lq+rhhUr 3zZ4duo2y14MRt43bnAOgU3Bbx7voUrn92Qt8l8qztQ/n/gb19zEvXIoEEdBebxWFo4e llsA== X-Gm-Message-State: AO0yUKUri+u4oIrs7L2mSpIbJ7GafwaCVZOFiGwlF5HZZQBdu1w9lg4h ZHfIeQJSVgcIyE+NtiukYq0= X-Google-Smtp-Source: AK7set8/EFQZZDZUyHl2dWyTDReOfak9GbHTL1rQ7nrDo0XxR4jVU5Kv17b0URrZtWC3kPMsOwCzVw== X-Received: by 2002:a05:600c:3d15:b0:3df:ea09:fcc9 with SMTP id bh21-20020a05600c3d1500b003dfea09fcc9mr9824475wmb.7.1677145110143; Thu, 23 Feb 2023 01:38:30 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id h6-20020a05600c350600b003e0238d9101sm11940083wmq.31.2023.02.23.01.38.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:38:29 -0800 (PST) From: luca.boccassi@gmail.com To: Mike Baucom Cc: Somnath Kotur , Kishore Padmanabha , Randy Schacher , Ajit Khaparde , dpdk stable Subject: patch 'net/bnxt: fix Rx queue stats after queue stop and start' has been queued to stable release 20.11.8 Date: Thu, 23 Feb 2023 09:36:28 +0000 Message-Id: <20230223093715.3926893-24-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Hi, FYI, your patch has been queued to stable release 20.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/25/23. So please shout if anyone has objections. 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. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/37a8b1a6dd47c44e7dff7e5fed8830d06eba108c Thanks. Luca Boccassi --- >From 37a8b1a6dd47c44e7dff7e5fed8830d06eba108c Mon Sep 17 00:00:00 2001 From: Mike Baucom Date: Wed, 1 Feb 2023 09:50:13 +0530 Subject: [PATCH] net/bnxt: fix Rx queue stats after queue stop and start [ upstream commit 0180d3040e4a7734dc9987ff6c49ec1daedcdf8c ] The Rx queue stats are being reported incorrectly due to a workaround for ring counters sometimes being reported as zero. When a queue is stopped and started, the ring counter is reset to zero. The workaround interprets the zero as incorrect, and sets the reported ring count as the previously read value (from before the queue being restared). This shows up as negative counters in testpmd's "show fwd stats" command. The fix clears the prev counter for the queue when the queue is started. Fixes: 219842b9990c ("net/bnxt: workaround spurious zero stats in Thor") Signed-off-by: Mike Baucom Reviewed-by: Somnath Kotur Reviewed-by: Kishore Padmanabha Reviewed-by: Randy Schacher Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_rxq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index f597f376e6..2ed1ae117f 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -446,6 +446,12 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) return -EINVAL; } + /* reset the previous stats for the rx_queue since the counters + * will be cleared when the queue is started. + */ + memset(&bp->prev_rx_ring_stats[rx_queue_id], 0, + sizeof(struct bnxt_ring_stats)); + /* Set the queue state to started here. * We check the status of the queue while posting buffer. * If queue is it started, we do not post buffers for Rx. -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 09:36:29.239122685 +0000 +++ 0024-net-bnxt-fix-Rx-queue-stats-after-queue-stop-and-sta.patch 2023-02-23 09:36:28.218169792 +0000 @@ -1 +1 @@ -From 0180d3040e4a7734dc9987ff6c49ec1daedcdf8c Mon Sep 17 00:00:00 2001 +From 37a8b1a6dd47c44e7dff7e5fed8830d06eba108c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0180d3040e4a7734dc9987ff6c49ec1daedcdf8c ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index fabbbd4560..99758dd304 100644 +index f597f376e6..2ed1ae117f 100644 @@ -30 +31 @@ -@@ -471,6 +471,12 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) +@@ -446,6 +446,12 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)