[dpdk-stable] patch 'mempool/dpaa2: report error on endless loop in mbuf release' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:34:06 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 ddbaab62521e6d5db2c9a216db1f71abc456a92f Mon Sep 17 00:00:00 2001
From: Radu Bulie <radu-andrei.bulie at nxp.com>
Date: Tue, 5 Nov 2019 19:53:19 +0530
Subject: [PATCH] mempool/dpaa2: report error on endless loop in mbuf release

[ upstream commit f0617163b8d2678371d0c93926cebb6c1e7981d7 ]

When BMAN is not able to accept more buffers, it could be that
there are no FBPR's (internal mem provided to bman) left.
Report error in such condition.

Fixes: 5dc43d22b5ad ("mempool/dpaa2: add hardware offloaded mempool")

Signed-off-by: Radu Bulie <radu-andrei.bulie at nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta at nxp.com>
---
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 27 +++++++++++++++++-------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 8bcbaa8927..81b7e85d4e 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -200,7 +200,7 @@ rte_dpaa2_mbuf_release(struct rte_mempool *pool __rte_unused,
 	struct qbman_release_desc releasedesc;
 	struct qbman_swp *swp;
 	int ret;
-	int i, n;
+	int i, n, retry_count;
 	uint64_t bufs[DPAA2_MBUF_MAX_ACQ_REL];
 
 	if (unlikely(!DPAA2_PER_LCORE_DPIO)) {
@@ -233,9 +233,15 @@ rte_dpaa2_mbuf_release(struct rte_mempool *pool __rte_unused,
 	}
 
 	/* feed them to bman */
-	do {
-		ret = qbman_swp_release(swp, &releasedesc, bufs, n);
-	} while (ret == -EBUSY);
+	retry_count = 0;
+	while ((ret = qbman_swp_release(swp, &releasedesc, bufs, n)) ==
+			-EBUSY) {
+		retry_count++;
+		if (retry_count > DPAA2_MAX_TX_RETRY_COUNT) {
+			DPAA2_MEMPOOL_ERR("bman release retry exceeded, low fbpr?");
+			return;
+		}
+	}
 
 aligned:
 	/* if there are more buffers to free */
@@ -251,10 +257,15 @@ aligned:
 #endif
 		}
 
-		do {
-			ret = qbman_swp_release(swp, &releasedesc, bufs,
-						DPAA2_MBUF_MAX_ACQ_REL);
-		} while (ret == -EBUSY);
+		retry_count = 0;
+		while ((ret = qbman_swp_release(swp, &releasedesc, bufs,
+					DPAA2_MBUF_MAX_ACQ_REL)) == -EBUSY) {
+			retry_count++;
+			if (retry_count > DPAA2_MAX_TX_RETRY_COUNT) {
+				DPAA2_MEMPOOL_ERR("bman release retry exceeded, low fbpr?");
+				return;
+			}
+		}
 		n += DPAA2_MBUF_MAX_ACQ_REL;
 	}
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-19 14:32:30.271833366 +0000
+++ 0099-mempool-dpaa2-report-error-on-endless-loop-in-mbuf-r.patch	2019-12-19 14:32:26.229300284 +0000
@@ -1,14 +1,15 @@
-From f0617163b8d2678371d0c93926cebb6c1e7981d7 Mon Sep 17 00:00:00 2001
+From ddbaab62521e6d5db2c9a216db1f71abc456a92f Mon Sep 17 00:00:00 2001
 From: Radu Bulie <radu-andrei.bulie at nxp.com>
 Date: Tue, 5 Nov 2019 19:53:19 +0530
 Subject: [PATCH] mempool/dpaa2: report error on endless loop in mbuf release
 
+[ upstream commit f0617163b8d2678371d0c93926cebb6c1e7981d7 ]
+
 When BMAN is not able to accept more buffers, it could be that
 there are no FBPR's (internal mem provided to bman) left.
 Report error in such condition.
 
 Fixes: 5dc43d22b5ad ("mempool/dpaa2: add hardware offloaded mempool")
-Cc: stable at dpdk.org
 
 Signed-off-by: Radu Bulie <radu-andrei.bulie at nxp.com>
 Signed-off-by: Nipun Gupta <nipun.gupta at nxp.com>
@@ -17,10 +18,10 @@
  1 file changed, 19 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
-index f26c30b007..cc4f837b68 100644
+index 8bcbaa8927..81b7e85d4e 100644
 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
 +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
-@@ -192,7 +192,7 @@ rte_dpaa2_mbuf_release(struct rte_mempool *pool __rte_unused,
+@@ -200,7 +200,7 @@ rte_dpaa2_mbuf_release(struct rte_mempool *pool __rte_unused,
  	struct qbman_release_desc releasedesc;
  	struct qbman_swp *swp;
  	int ret;
@@ -29,7 +30,7 @@
  	uint64_t bufs[DPAA2_MBUF_MAX_ACQ_REL];
  
  	if (unlikely(!DPAA2_PER_LCORE_DPIO)) {
-@@ -225,9 +225,15 @@ rte_dpaa2_mbuf_release(struct rte_mempool *pool __rte_unused,
+@@ -233,9 +233,15 @@ rte_dpaa2_mbuf_release(struct rte_mempool *pool __rte_unused,
  	}
  
  	/* feed them to bman */
@@ -48,7 +49,7 @@
  
  aligned:
  	/* if there are more buffers to free */
-@@ -243,10 +249,15 @@ aligned:
+@@ -251,10 +257,15 @@ aligned:
  #endif
  		}
  


More information about the stable mailing list