[3/3] net/cnxk: reduce Tx queue release time

Message ID 20231205100048.1387058-3-rkudurumalla@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [1/3] common/cnxk: optimize ethdev teardown time |

Checks

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

Commit Message

Rakesh Kudurumalla Dec. 5, 2023, 10 a.m. UTC
  Invoked newly added roc API to disable
SQB aura FC during TX queue start and TX queue
stop. This fix reduces ethdev teardown time

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Jerin Jacob Dec. 7, 2023, 6:15 a.m. UTC | #1
On Tue, Dec 5, 2023 at 3:39 PM Rakesh Kudurumalla
<rkudurumalla@marvell.com> wrote:
>
> Invoked newly added roc API to disable
> SQB aura FC during TX queue start and TX queue
> stop. This fix reduces ethdev teardown time
>
> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> ---



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


commit 48e0c652ed7116df61db6a0d1cf3f0b450faec79 (HEAD -> for-main)
Author: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date:   Tue Dec 5 15:30:48 2023 +0530

    net/cnxk: reduce Tx queue release time

    Invoked newly added roc API to disable SQB aura FC
    during TX queue start and TX queue stop.

    This fix reduces ethdev teardown time

    Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>

commit 3f2604b698e530c8296030de3be60d242d7fc761
Author: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date:   Tue Dec 5 15:30:47 2023 +0530

    common/cnxk: support to enable disable SQ

    Added a new ROC API to disable SQB aura FC and update SQ state
    to disabled state in TX queue stop.

    The same SQ status is verified during sq flush to enable or
    disable SQB aura FC during ethdev teardown.

    This fix reduces teardown time by 90%.

    Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>

commit 6ed4c08ec7023a119e181b8e29442c3cc95c48ce
Author: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date:   Tue Dec 5 15:30:46 2023 +0530

    common/cnxk: optimize ethdev teardown time

    API mbox_alloc_msg_npa_aq_enq() mbox is called if SQ needs
    to be updated from mbox response else mbox call to kernel
    is bypassed reducing the time taken to complete
    roc_nix_tm_sq_aura_fc() function.

    This reduces ethdev teardown time by 20%.

    Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
  

Patch

diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 5e11bbb017..2372a4e793 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -1521,7 +1521,7 @@  cnxk_nix_tx_queue_start(struct rte_eth_dev *eth_dev, uint16_t qid)
 	if (data->tx_queue_state[qid] == RTE_ETH_QUEUE_STATE_STARTED)
 		return 0;
 
-	rc = roc_nix_tm_sq_aura_fc(sq, true);
+	rc = roc_nix_sq_ena_dis(sq, true);
 	if (rc) {
 		plt_err("Failed to enable sq aura fc, txq=%u, rc=%d", qid, rc);
 		goto done;
@@ -1543,7 +1543,7 @@  cnxk_nix_tx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t qid)
 	if (data->tx_queue_state[qid] == RTE_ETH_QUEUE_STATE_STOPPED)
 		return 0;
 
-	rc = roc_nix_tm_sq_aura_fc(sq, false);
+	rc = roc_nix_sq_ena_dis(sq, false);
 	if (rc) {
 		plt_err("Failed to disable sqb aura fc, txq=%u, rc=%d", qid,
 			rc);