[dpdk-stable] patch 'net/sfc: receive prepared packets even in Rx exception case' has been queued to LTS release 17.11.5

Yongseok Koh yskoh at mellanox.com
Fri Nov 30 00:10:49 CET 2018


Hi,

FYI, your patch has been queued to LTS release 17.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/01/18. 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. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Yongseok

---
>From 6cbe58f994f9e35d86d5e37427bc2cdcf14ab266 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko at solarflare.com>
Date: Wed, 3 Oct 2018 10:03:48 +0100
Subject: [PATCH] net/sfc: receive prepared packets even in Rx exception case

[ upstream commit f609ee3f2a32806689e0f1d9d841c97e0409bf55 ]

Make sure that number of prepared packets, completed and added
Rx ring pointers are reset to zeros on queue purge at stop.

Fixes: 638bddc99faa ("net/sfc: implement EF10 native Rx datapath")

Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov at oktetlabs.ru>
---
 drivers/net/sfc/sfc_ef10_rx.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c
index bd2cbd096..7069c534e 100644
--- a/drivers/net/sfc/sfc_ef10_rx.c
+++ b/drivers/net/sfc/sfc_ef10_rx.c
@@ -489,11 +489,11 @@ sfc_ef10_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	uint16_t n_rx_pkts;
 	efx_qword_t rx_ev;
 
+	n_rx_pkts = sfc_ef10_rx_prepared(rxq, rx_pkts, nb_pkts);
+
 	if (unlikely(rxq->flags &
 		     (SFC_EF10_RXQ_NOT_RUNNING | SFC_EF10_RXQ_EXCEPTION)))
-		return 0;
-
-	n_rx_pkts = sfc_ef10_rx_prepared(rxq, rx_pkts, nb_pkts);
+		goto done;
 
 	evq_old_read_ptr = rxq->evq_read_ptr;
 	while (n_rx_pkts != nb_pkts && sfc_ef10_rx_get_event(rxq, &rx_ev)) {
@@ -513,6 +513,7 @@ sfc_ef10_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	/* It is not a problem if we refill in the case of exception */
 	sfc_ef10_rx_qrefill(rxq);
 
+done:
 	return n_rx_pkts;
 }
 
@@ -646,8 +647,9 @@ sfc_ef10_rx_qstart(struct sfc_dp_rxq *dp_rxq, unsigned int evq_read_ptr)
 {
 	struct sfc_ef10_rxq *rxq = sfc_ef10_rxq_by_dp_rxq(dp_rxq);
 
-	rxq->prepared = 0;
-	rxq->completed = rxq->added = 0;
+	SFC_ASSERT(rxq->prepared == 0);
+	SFC_ASSERT(rxq->completed == 0);
+	SFC_ASSERT(rxq->added == 0);
 
 	sfc_ef10_rx_qrefill(rxq);
 
@@ -694,12 +696,16 @@ sfc_ef10_rx_qpurge(struct sfc_dp_rxq *dp_rxq)
 	unsigned int i;
 	struct sfc_ef10_rx_sw_desc *rxd;
 
+	rxq->prepared = 0;
+
 	for (i = rxq->completed; i != rxq->added; ++i) {
 		rxd = &rxq->sw_ring[i & rxq->ptr_mask];
 		rte_mempool_put(rxq->refill_mb_pool, rxd->mbuf);
 		rxd->mbuf = NULL;
 	}
 
+	rxq->completed = rxq->added = 0;
+
 	rxq->flags &= ~SFC_EF10_RXQ_STARTED;
 }
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-29 15:01:47.669160581 -0800
+++ 0055-net-sfc-receive-prepared-packets-even-in-Rx-exceptio.patch	2018-11-29 15:01:45.132965000 -0800
@@ -1,13 +1,14 @@
-From f609ee3f2a32806689e0f1d9d841c97e0409bf55 Mon Sep 17 00:00:00 2001
+From 6cbe58f994f9e35d86d5e37427bc2cdcf14ab266 Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko at solarflare.com>
 Date: Wed, 3 Oct 2018 10:03:48 +0100
 Subject: [PATCH] net/sfc: receive prepared packets even in Rx exception case
 
+[ upstream commit f609ee3f2a32806689e0f1d9d841c97e0409bf55 ]
+
 Make sure that number of prepared packets, completed and added
 Rx ring pointers are reset to zeros on queue purge at stop.
 
 Fixes: 638bddc99faa ("net/sfc: implement EF10 native Rx datapath")
-Cc: stable at dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
 Reviewed-by: Ivan Malov <ivan.malov at oktetlabs.ru>
@@ -16,10 +17,10 @@
  1 file changed, 11 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c
-index 6a5052b93..5c0152d01 100644
+index bd2cbd096..7069c534e 100644
 --- a/drivers/net/sfc/sfc_ef10_rx.c
 +++ b/drivers/net/sfc/sfc_ef10_rx.c
-@@ -359,11 +359,11 @@ sfc_ef10_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -489,11 +489,11 @@ sfc_ef10_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
  	uint16_t n_rx_pkts;
  	efx_qword_t rx_ev;
  
@@ -34,7 +35,7 @@
  
  	evq_old_read_ptr = rxq->evq_read_ptr;
  	while (n_rx_pkts != nb_pkts && sfc_ef10_rx_get_event(rxq, &rx_ev)) {
-@@ -383,6 +383,7 @@ sfc_ef10_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -513,6 +513,7 @@ sfc_ef10_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
  	/* It is not a problem if we refill in the case of exception */
  	sfc_ef10_rx_qrefill(rxq);
  
@@ -42,7 +43,7 @@
  	return n_rx_pkts;
  }
  
-@@ -594,8 +595,9 @@ sfc_ef10_rx_qstart(struct sfc_dp_rxq *dp_rxq, unsigned int evq_read_ptr)
+@@ -646,8 +647,9 @@ sfc_ef10_rx_qstart(struct sfc_dp_rxq *dp_rxq, unsigned int evq_read_ptr)
  {
  	struct sfc_ef10_rxq *rxq = sfc_ef10_rxq_by_dp_rxq(dp_rxq);
  
@@ -54,7 +55,7 @@
  
  	sfc_ef10_rx_qrefill(rxq);
  
-@@ -642,12 +644,16 @@ sfc_ef10_rx_qpurge(struct sfc_dp_rxq *dp_rxq)
+@@ -694,12 +696,16 @@ sfc_ef10_rx_qpurge(struct sfc_dp_rxq *dp_rxq)
  	unsigned int i;
  	struct sfc_ef10_rx_sw_desc *rxd;
  


More information about the stable mailing list