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 EB22AA0524 for ; Fri, 5 Feb 2021 12:38:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0299188A52; Fri, 5 Feb 2021 12:38:28 +0100 (CET) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id F04124067B for ; Fri, 5 Feb 2021 12:38:27 +0100 (CET) Received: by mail-wm1-f46.google.com with SMTP id y187so5661155wmd.3 for ; Fri, 05 Feb 2021 03:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2JQm2oPz12+XqVG1BZGug+WYlNGZRSzyyHOeqNeMaHI=; b=QVQVIYz6sEP+VGk5c0pir/Z/gpBwShZ5ySG2Qwh/6LI2mkUg6gRd5G/pQ/3oBOYgRw 1mSLQRnEc8tHNTFqp2W2sx/gzeARBaB/Mp/exynSJpy6V5WzsOF+v9zQPbAd/rQ+Gp7F ChY9enKEs7vfaEoZTnnHyx8TvIIa4KlhGxUlu2YWzTz6UvMo9flhlIkSOfGSaL90WJCa +w8dD5K6sFfluIYRHGjHgqkkwZTXZpLlXwmu15pewANwZnx0FQHLx8FpFtoZUqbHQrCC e8jIV/+HYoHdQxj3bb5RL4rEZ5R3ojr76tHiBj5Onois+Kyy4doyo0SGrefUxBN3pLRm KEqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2JQm2oPz12+XqVG1BZGug+WYlNGZRSzyyHOeqNeMaHI=; b=Tmp9DElHknstB9a22YkFgMhcOVHF7vw+qB2pZ/A53dGwFZvFETD+MXIf6uv/eTb5/+ iUfn/LXlHbQhAiFOx2p5QMQgRRjGiFI0g6T3ln9quCtVUCoUCVXw/Jsk3hgj3j2a+rzd tl1Q/jJjLOym4L3iU9lQ8bFtlG950tDaSG4APS0ZG4fDKN4ABbtwWlVcX5voCis84fkE QPL+/mRdeA0NI0repSm+g3k1vMoWeVe+pprsdYpAReKBhkhsrfkAHNvhwuEVYVvH/dLe okHA//uhz/xZhb1HqgdCYhqmePK6aE78FNl2gSNLXvkQSC4PCQugAN+goFSF/1ZlFdgT G3tg== X-Gm-Message-State: AOAM530q3QHlinQ9ImPqFSi954nsxoBuQQMFEpct9VS8JNKJgmTY+p+y 2VZqqMuRlgSjtIFc/zG0XCg= X-Google-Smtp-Source: ABdhPJzW4cv9VPlqQn/CaZ1qmRobT8OoGUiQvhIzpIbtUOyIqi6n/RW/7Grn032HrlHfts6MR/SUcw== X-Received: by 2002:a7b:c087:: with SMTP id r7mr3231747wmh.164.1612525107780; Fri, 05 Feb 2021 03:38:27 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id f4sm11826939wrs.34.2021.02.05.03.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:38:27 -0800 (PST) From: luca.boccassi@gmail.com To: Viacheslav Galaktionov Cc: Andrew Rybchenko , dpdk stable Date: Fri, 5 Feb 2021 11:18:53 +0000 Message-Id: <20210205111920.1272063-247-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/sfc: fix generic byte statistics to exclude FCS bytes' has been queued to stable release 20.11.1 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" Hi, FYI, your patch has been queued to stable release 20.11.1 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/07/21. 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/10b11c2704f960de87b13e85cea75c0db0e630ed Thanks. Luca Boccassi --- >From 10b11c2704f960de87b13e85cea75c0db0e630ed Mon Sep 17 00:00:00 2001 From: Viacheslav Galaktionov Date: Wed, 20 Jan 2021 15:44:18 +0300 Subject: [PATCH] net/sfc: fix generic byte statistics to exclude FCS bytes [ upstream commit 8a6930361bcfb0374cb84e95d75ab7c01231c96e ] Generic byte statistics should not include Ethernet FCS bytes. Fixes: 1caab2f1e684 ("net/sfc: add basic statistics") Signed-off-by: Viacheslav Galaktionov Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/sfc_ethdev.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index f2f5336435..a002e2c037 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -640,10 +640,19 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) mac_stats[EFX_MAC_VADAPTER_TX_BROADCAST_BYTES]; stats->imissed = mac_stats[EFX_MAC_VADAPTER_RX_BAD_PACKETS]; stats->oerrors = mac_stats[EFX_MAC_VADAPTER_TX_BAD_PACKETS]; + + /* CRC is included in these stats, but shouldn't be */ + stats->ibytes -= stats->ipackets * RTE_ETHER_CRC_LEN; + stats->obytes -= stats->opackets * RTE_ETHER_CRC_LEN; } else { stats->opackets = mac_stats[EFX_MAC_TX_PKTS]; stats->ibytes = mac_stats[EFX_MAC_RX_OCTETS]; stats->obytes = mac_stats[EFX_MAC_TX_OCTETS]; + + /* CRC is included in these stats, but shouldn't be */ + stats->ibytes -= mac_stats[EFX_MAC_RX_PKTS] * RTE_ETHER_CRC_LEN; + stats->obytes -= mac_stats[EFX_MAC_TX_PKTS] * RTE_ETHER_CRC_LEN; + /* * Take into account stats which are whenever supported * on EF10. If some stat is not supported by current -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:40.058729597 +0000 +++ 0247-net-sfc-fix-generic-byte-statistics-to-exclude-FCS-b.patch 2021-02-05 11:18:29.258699718 +0000 @@ -1 +1 @@ -From 8a6930361bcfb0374cb84e95d75ab7c01231c96e Mon Sep 17 00:00:00 2001 +From 10b11c2704f960de87b13e85cea75c0db0e630ed Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8a6930361bcfb0374cb84e95d75ab7c01231c96e ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index d6f6a84eab..479b4f4df6 100644 +index f2f5336435..a002e2c037 100644