From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 766AEA046B for ; Mon, 24 Jun 2019 18:33:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2EB671B9E0; Mon, 24 Jun 2019 18:33:02 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 5A12D1B9E0 for ; Mon, 24 Jun 2019 18:33:00 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9CC55309264F; Mon, 24 Jun 2019 16:32:56 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-250.ams2.redhat.com [10.36.116.250]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9AC7519C69; Mon, 24 Jun 2019 16:32:53 +0000 (UTC) From: Kevin Traynor To: Michal Krawczyk Cc: dpdk stable Date: Mon, 24 Jun 2019 17:32:41 +0100 Message-Id: <20190624163241.23246-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 24 Jun 2019 16:32:56 +0000 (UTC) Subject: [dpdk-stable] patch 'net/ena: fix Rx checksum errors statistics' has been queued to LTS release 18.11.3 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, FYI, your patch has been queued to LTS release 18.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/19. 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/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/bff8a8fcc3a3581e3dfaaaef78c20ff82619d98b Thanks. Kevin Traynor --- >From bff8a8fcc3a3581e3dfaaaef78c20ff82619d98b Mon Sep 17 00:00:00 2001 From: Michal Krawczyk Date: Tue, 28 May 2019 10:28:34 +0200 Subject: [PATCH] net/ena: fix Rx checksum errors statistics [ upstream commit ef74b5f7b69b9502ddab81121611243efcfe1dde ] Rx checksum flags and input errors shouldn't be updated on Tx, as it would work only for packets forwarding. The ierrors statistic should be updated on Rx, right after checking Rx checksum flags if the Rx checksum offload is enabled. Fixes: 1173fca25af9 ("ena: add polling-mode driver") Signed-off-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 9359d4d76..fa7b58b7d 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1917,4 +1917,10 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, /* fill mbuf attributes if any */ ena_rx_mbuf_prepare(mbuf_head, &ena_rx_ctx); + + if (unlikely(mbuf_head->ol_flags & + (PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD))) + rte_atomic64_inc(&rx_ring->adapter->drv_stats->ierrors); + + mbuf_head->hash.rss = ena_rx_ctx.hash; @@ -2108,8 +2114,4 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, ena_tx_mbuf_prepare(mbuf, &ena_tx_ctx, tx_ring->offloads); - if (unlikely(mbuf->ol_flags & - (PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD))) - rte_atomic64_inc(&tx_ring->adapter->drv_stats->ierrors); - rte_prefetch0(tx_pkts[(sent_idx + 4) & ring_mask]); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-06-24 17:19:50.133633483 +0100 +++ 0001-net-ena-fix-Rx-checksum-errors-statistics.patch 2019-06-24 17:19:50.089876510 +0100 @@ -1 +1 @@ -From ef74b5f7b69b9502ddab81121611243efcfe1dde Mon Sep 17 00:00:00 2001 +From bff8a8fcc3a3581e3dfaaaef78c20ff82619d98b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ef74b5f7b69b9502ddab81121611243efcfe1dde ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -17,2 +18,2 @@ - drivers/net/ena/ena_ethdev.c | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) + drivers/net/ena/ena_ethdev.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) @@ -21 +22 @@ -index ffecdb869..a42ec8c79 100644 +index 9359d4d76..fa7b58b7d 100644 @@ -24,5 +25,6 @@ -@@ -2090,6 +2090,8 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, - - if (unlikely(mbuf_head->ol_flags & -- (PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD))) -+ (PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD))) { +@@ -1917,4 +1917,10 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, + /* fill mbuf attributes if any */ + ena_rx_mbuf_prepare(mbuf_head, &ena_rx_ctx); ++ ++ if (unlikely(mbuf_head->ol_flags & ++ (PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD))) @@ -30,3 +32,2 @@ - ++rx_ring->rx_stats.bad_csum; -+ } - ++ ++ @@ -34 +35,2 @@ -@@ -2319,8 +2321,4 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, + +@@ -2108,8 +2114,4 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,