[2/2] common/cnxk: split XAQ counts

Message ID 20230909165747.7458-2-pbhagavatula@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [1/2] event/cnxk: flush flow context on cleanup |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS

Commit Message

Pavan Nikhilesh Bhagavatula Sept. 9, 2023, 4:57 p.m. UTC
  From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Split XAQ counts into reserved and cached to allow more events
to be inflight.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/common/cnxk/roc_sso.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
  

Comments

Jerin Jacob Sept. 19, 2023, 5 p.m. UTC | #1
On Sun, Sep 10, 2023 at 1:46 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Split XAQ counts into reserved and cached to allow more events
> to be inflight.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>


Updated the git commit as follows and applied to
dpdk-next-net-eventdev/for-main. Thanks


commit e227b98adbbacde663fbf0cafe512a1a123adef1 (HEAD -> for-main,
origin/for-main, origin/HEAD)
Author: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date:   Sat Sep 9 22:27:47 2023 +0530

    common/cnxk: fix XAQ limits

    Split XAQ counts into reserved and cached to allow more events
    to be in flight.

    Fixes: c3320d21b475 ("event/cnxk: use LMTST for enqueue new burst")
    Cc: stable@dpdk.org

    Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

commit 87007fcc6a0c7274226dcb80675986fdcab57de8
Author: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date:   Sat Sep 9 22:27:46 2023 +0530

    event/cnxk: fix context flush in port cleanup

    Flush currently held flow context during event port cleanup.

    Fixes: e8594de2731d ("event/cnxk: implement event port quiesce function")
    Cc: stable@dpdk.org

    Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
  

Patch

diff --git a/drivers/common/cnxk/roc_sso.c b/drivers/common/cnxk/roc_sso.c
index a5f48d5bbc..0a1074b018 100644
--- a/drivers/common/cnxk/roc_sso.c
+++ b/drivers/common/cnxk/roc_sso.c
@@ -5,7 +5,8 @@ 
 #include "roc_api.h"
 #include "roc_priv.h"
 
-#define SSO_XAQ_CACHE_CNT (0x7)
+#define SSO_XAQ_CACHE_CNT (0x3)
+#define SSO_XAQ_RSVD_CNT  (0x4)
 #define SSO_XAQ_SLACK	  (16)
 
 /* Private functions. */
@@ -499,6 +500,7 @@  sso_hwgrp_init_xaq_aura(struct dev *dev, struct roc_sso_xaq_data *xaq,
 	 * pipelining.
 	 */
 	xaq->nb_xaq = (SSO_XAQ_CACHE_CNT * nb_hwgrp);
+	xaq->nb_xaq += (SSO_XAQ_RSVD_CNT * nb_hwgrp);
 	xaq->nb_xaq += PLT_MAX(1 + ((xaq->nb_xae - 1) / xae_waes), xaq->nb_xaq);
 	xaq->nb_xaq += SSO_XAQ_SLACK;
 
@@ -542,8 +544,7 @@  sso_hwgrp_init_xaq_aura(struct dev *dev, struct roc_sso_xaq_data *xaq,
 	 * There should be a minimum headroom of 7 XAQs per HWGRP for SSO
 	 * to request XAQ to cache them even before enqueue is called.
 	 */
-	xaq->xaq_lmt =
-		xaq->nb_xaq - (nb_hwgrp * SSO_XAQ_CACHE_CNT) - SSO_XAQ_SLACK;
+	xaq->xaq_lmt = xaq->nb_xaq - (nb_hwgrp * SSO_XAQ_CACHE_CNT) - SSO_XAQ_SLACK;
 
 	return 0;
 npa_fill_fail: