[dpdk-stable] patch 'net/bnxt: fix Rx queue count' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:33:10 CET 2019


Hi,

FYI, your patch has been queued to LTS release 17.11.10

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/21/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.

Thanks.

Luca Boccassi

---
>From a48d576d0e302d86fb6de853859c0bb401b3ef3b Mon Sep 17 00:00:00 2001
From: Rahul Gupta <rahul.gupta at broadcom.com>
Date: Wed, 2 Oct 2019 10:17:42 -0700
Subject: [PATCH] net/bnxt: fix Rx queue count

[ upstream commit 34c0ba839baeaf9a8621e4e3524eec96f82dfce0 ]

Fix Computing of number of used descriptors in an Rx queue.

Fixes: 1b7ceba3e375 ("net/bnxt: support Rx queue count")

Signed-off-by: Rahul Gupta <rahul.gupta at broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 31 +++++++------------------------
 1 file changed, 7 insertions(+), 24 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 0e990014d0..c699d29b8d 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1644,39 +1644,22 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	struct bnxt_cp_ring_info *cpr;
 	struct bnxt_rx_queue *rxq;
 	struct rx_pkt_cmpl *rxcmp;
-	uint16_t cmp_type;
-	uint8_t cmp = 1;
-	bool valid;
 
 	rxq = dev->data->rx_queues[rx_queue_id];
 	cpr = rxq->cp_ring;
-	valid = cpr->valid;
+	raw_cons = cpr->cp_raw_cons;
 
-	while (raw_cons < rxq->nb_rx_desc) {
+	while (1) {
 		cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
+		rte_prefetch0(&cpr->cp_desc_ring[cons]);
 		rxcmp = (struct rx_pkt_cmpl *)&cpr->cp_desc_ring[cons];
 
-		if (!CMPL_VALID(rxcmp, valid))
-			goto nothing_to_do;
-		valid = FLIP_VALID(cons, cpr->cp_ring_struct->ring_mask, valid);
-		cmp_type = CMP_TYPE(rxcmp);
-		if (cmp_type == RX_TPA_END_CMPL_TYPE_RX_TPA_END) {
-			cmp = (rte_le_to_cpu_32(
-					((struct rx_tpa_end_cmpl *)
-					 (rxcmp))->agg_bufs_v1) &
-			       RX_TPA_END_CMPL_AGG_BUFS_MASK) >>
-				RX_TPA_END_CMPL_AGG_BUFS_SFT;
-			desc++;
-		} else if (cmp_type == 0x11) {
-			desc++;
-			cmp = (rxcmp->agg_bufs_v1 &
-				   RX_PKT_CMPL_AGG_BUFS_MASK) >>
-				RX_PKT_CMPL_AGG_BUFS_SFT;
+		if (!CMP_VALID(rxcmp, raw_cons, cpr->cp_ring_struct)) {
+			break;
 		} else {
-			cmp = 1;
+			raw_cons++;
+			desc++;
 		}
-nothing_to_do:
-		raw_cons += cmp ? cmp : 2;
 	}
 
 	return desc;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-19 14:32:28.053924927 +0000
+++ 0043-net-bnxt-fix-Rx-queue-count.patch	2019-12-19 14:32:25.941294574 +0000
@@ -1,12 +1,13 @@
-From 34c0ba839baeaf9a8621e4e3524eec96f82dfce0 Mon Sep 17 00:00:00 2001
+From a48d576d0e302d86fb6de853859c0bb401b3ef3b Mon Sep 17 00:00:00 2001
 From: Rahul Gupta <rahul.gupta at broadcom.com>
 Date: Wed, 2 Oct 2019 10:17:42 -0700
 Subject: [PATCH] net/bnxt: fix Rx queue count
 
+[ upstream commit 34c0ba839baeaf9a8621e4e3524eec96f82dfce0 ]
+
 Fix Computing of number of used descriptors in an Rx queue.
 
 Fixes: 1b7ceba3e375 ("net/bnxt: support Rx queue count")
-Cc: stable at dpdk.org
 
 Signed-off-by: Rahul Gupta <rahul.gupta at broadcom.com>
 Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
@@ -16,20 +17,16 @@
  1 file changed, 7 insertions(+), 24 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 74ded7717a..0159be3462 100644
+index 0e990014d0..c699d29b8d 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -2096,9 +2096,6 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -1644,39 +1644,22 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
  	struct bnxt_cp_ring_info *cpr;
  	struct bnxt_rx_queue *rxq;
  	struct rx_pkt_cmpl *rxcmp;
 -	uint16_t cmp_type;
 -	uint8_t cmp = 1;
 -	bool valid;
- 	int rc;
- 
- 	rc = is_bnxt_in_error(bp);
-@@ -2107,33 +2104,19 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
  
  	rxq = dev->data->rx_queues[rx_queue_id];
  	cpr = rxq->cp_ring;


More information about the stable mailing list