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 37B3DA0548 for ; Mon, 8 Feb 2021 12:15:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2EE8D1606DA; Mon, 8 Feb 2021 12:15:03 +0100 (CET) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 1112940147 for ; Mon, 8 Feb 2021 12:15:01 +0100 (CET) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l94VQ-0001Ac-RR; Mon, 08 Feb 2021 11:15:00 +0000 From: Christian Ehrhardt To: Ferruh Yigit Cc: Cian Ferriter , dpdk stable Date: Mon, 8 Feb 2021 12:14:25 +0100 Message-Id: <20210208111429.1875789-13-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208111429.1875789-1-christian.ehrhardt@canonical.com> References: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> <20210208111429.1875789-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/pcap: fix byte stats for drop Tx' has been queued to stable release 19.11.7 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 19.11.7 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/10/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/de27f6be212feb50f8a8d7e4f8bcd3d068c795c4 Thanks. Christian Ehrhardt --- >From de27f6be212feb50f8a8d7e4f8bcd3d068c795c4 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Wed, 3 Feb 2021 17:30:25 +0000 Subject: [PATCH] net/pcap: fix byte stats for drop Tx [ upstream commit cec222d6e55d9bd15eff7fbbf45464c0c6a941c0 ] Drop Tx path in pcap is Tx that just drops the packets, which is used for the case only Rx from a pcap file is requested/matters. The byte stats was calculated using first mbuf segment, which gives wrong values for multi segmented mbufs, updated to use packet length instead. Bugzilla ID: 597 Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file") Reported-by: Cian Ferriter Signed-off-by: Ferruh Yigit Acked-by: Cian Ferriter --- drivers/net/pcap/rte_eth_pcap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index f0c900ba88..6fbf61f819 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -377,7 +377,7 @@ eth_tx_drop(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) return 0; for (i = 0; i < nb_pkts; i++) { - tx_bytes += bufs[i]->data_len; + tx_bytes += bufs[i]->pkt_len; rte_pktmbuf_free(bufs[i]); } -- 2.30.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-08 12:04:30.029288623 +0100 +++ 0013-net-pcap-fix-byte-stats-for-drop-Tx.patch 2021-02-08 12:04:29.551496794 +0100 @@ -1 +1 @@ -From cec222d6e55d9bd15eff7fbbf45464c0c6a941c0 Mon Sep 17 00:00:00 2001 +From de27f6be212feb50f8a8d7e4f8bcd3d068c795c4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit cec222d6e55d9bd15eff7fbbf45464c0c6a941c0 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index ff02ade70d..c7751b7ba7 100644 +index f0c900ba88..6fbf61f819 100644 @@ -28 +29 @@ -@@ -386,7 +386,7 @@ eth_tx_drop(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) +@@ -377,7 +377,7 @@ eth_tx_drop(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)