diff mbox series

[v3,11/28] common/cnxk: restore NIX sqb pool limit before destroy

Message ID 20211001134022.22700-12-ndabilpuram@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers show
Series net/cnxk: support for inline ipsec | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Nithin Dabilpuram Oct. 1, 2021, 1:40 p.m. UTC
Restore SQB AURA/POOL limit before destroying SQB to be
able to drain all the buffers from the aura.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/common/cnxk/roc_nix_queue.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c
index 41a1422..a8a713a 100644
--- a/drivers/common/cnxk/roc_nix_queue.c
+++ b/drivers/common/cnxk/roc_nix_queue.c
@@ -934,6 +934,11 @@  roc_nix_sq_fini(struct roc_nix_sq *sq)
 		rc |= NIX_ERR_NDC_SYNC;
 
 	rc |= nix_tm_sq_flush_post(sq);
+
+	/* Restore limit to max SQB count that the pool was created
+	 * for aura drain to succeed.
+	 */
+	roc_npa_aura_limit_modify(sq->aura_handle, NIX_MAX_SQB);
 	rc |= roc_npa_pool_destroy(sq->aura_handle);
 	plt_free(sq->fc);
 	plt_free(sq->sqe_mem);