common/cnxk: restore NIX SQB pool limit before destroy
authorNithin Dabilpuram <ndabilpuram@marvell.com>
Fri, 1 Oct 2021 13:40:05 +0000 (19:10 +0530)
committerJerin Jacob <jerinj@marvell.com>
Sat, 2 Oct 2021 13:44:47 +0000 (15:44 +0200)
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>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/common/cnxk/roc_nix_queue.c

index 41a1422..a8a713a 100644 (file)
@@ -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);