DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bnxt: fix Tx queue startup state
@ 2021-09-25  0:55 Ajit Khaparde
  2021-09-26 21:17 ` Ajit Khaparde
  0 siblings, 1 reply; 2+ messages in thread
From: Ajit Khaparde @ 2021-09-25  0:55 UTC (permalink / raw)
  To: dev; +Cc: stable, Lance Richardson

[-- Attachment #1: Type: text/plain, Size: 1539 bytes --]

Default queue state of Tx queues on startup is not correct.
Fix this by setting the state when the port is started.

Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 10 ++++++++++
 drivers/net/bnxt/bnxt_txq.c    |  5 -----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 097dd10de9..eb9147927e 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -814,6 +814,16 @@ static int bnxt_start_nic(struct bnxt *bp)
 		}
 	}
 
+	for (j = 0; j < bp->tx_nr_rings; j++) {
+		struct bnxt_tx_queue *txq = bp->tx_queues[j];
+
+		if (!txq->tx_deferred_start) {
+			bp->eth_dev->data->tx_queue_state[j] =
+				RTE_ETH_QUEUE_STATE_STARTED;
+			txq->tx_started = true;
+		}
+	}
+
 	rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, &bp->vnic_info[0], 0, NULL);
 	if (rc) {
 		PMD_DRV_LOG(ERR,
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index 830416af3d..3ffc334cff 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -166,11 +166,6 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 
 	eth_dev->data->tx_queues[queue_idx] = txq;
 
-	if (txq->tx_deferred_start)
-		txq->tx_started = false;
-	else
-		txq->tx_started = true;
-
 	return 0;
 err:
 	bnxt_tx_queue_release_op(txq);
-- 
2.30.1 (Apple Git-130)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bnxt: fix Tx queue startup state
  2021-09-25  0:55 [dpdk-dev] [PATCH] net/bnxt: fix Tx queue startup state Ajit Khaparde
@ 2021-09-26 21:17 ` Ajit Khaparde
  0 siblings, 0 replies; 2+ messages in thread
From: Ajit Khaparde @ 2021-09-26 21:17 UTC (permalink / raw)
  To: dpdk-dev; +Cc: dpdk stable, Ferruh Yigit

[-- Attachment #1: Type: text/plain, Size: 1981 bytes --]

On Fri, Sep 24, 2021 at 5:55 PM Ajit Khaparde
<ajit.khaparde@broadcom.com> wrote:
>
> Default queue state of Tx queues on startup is not correct.
> Fix this by setting the state when the port is started.
>
> Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Patch applied to dpdk-next-net-brcm. Thanks

> ---
>  drivers/net/bnxt/bnxt_ethdev.c | 10 ++++++++++
>  drivers/net/bnxt/bnxt_txq.c    |  5 -----
>  2 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index 097dd10de9..eb9147927e 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -814,6 +814,16 @@ static int bnxt_start_nic(struct bnxt *bp)
>                 }
>         }
>
> +       for (j = 0; j < bp->tx_nr_rings; j++) {
> +               struct bnxt_tx_queue *txq = bp->tx_queues[j];
> +
> +               if (!txq->tx_deferred_start) {
> +                       bp->eth_dev->data->tx_queue_state[j] =
> +                               RTE_ETH_QUEUE_STATE_STARTED;
> +                       txq->tx_started = true;
> +               }
> +       }
> +
>         rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, &bp->vnic_info[0], 0, NULL);
>         if (rc) {
>                 PMD_DRV_LOG(ERR,
> diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
> index 830416af3d..3ffc334cff 100644
> --- a/drivers/net/bnxt/bnxt_txq.c
> +++ b/drivers/net/bnxt/bnxt_txq.c
> @@ -166,11 +166,6 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
>
>         eth_dev->data->tx_queues[queue_idx] = txq;
>
> -       if (txq->tx_deferred_start)
> -               txq->tx_started = false;
> -       else
> -               txq->tx_started = true;
> -
>         return 0;
>  err:
>         bnxt_tx_queue_release_op(txq);
> --
> 2.30.1 (Apple Git-130)
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-26 21:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-25  0:55 [dpdk-dev] [PATCH] net/bnxt: fix Tx queue startup state Ajit Khaparde
2021-09-26 21:17 ` Ajit Khaparde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).