patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'net/ena: fix Rx checksum errors statistics' has been queued to LTS release 18.11.3
@ 2019-06-24 16:32 Kevin Traynor
  0 siblings, 0 replies; only message in thread
From: Kevin Traynor @ 2019-06-24 16:32 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: dpdk 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 <mk@semihalf.com>
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 <mk@semihalf.com>
---
 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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-24 16:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 16:32 [dpdk-stable] patch 'net/ena: fix Rx checksum errors statistics' has been queued to LTS release 18.11.3 Kevin Traynor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).