diff mbox series

net/bnxt: fix Rx queue startup state

Message ID 20210914125058.215396-1-lance.richardson@broadcom.com (mailing list archive)
State Accepted
Delegated to: Ajit Khaparde
Headers show
Series net/bnxt: fix Rx queue startup state | expand

Checks

Context Check Description
ci/iol-aarch64-compile-testing success Testing PASS
ci/intel-Testing fail Testing issues
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/checkpatch success coding style OK

Commit Message

Lance Richardson Sept. 14, 2021, 12:50 p.m. UTC
Since the addition of support for runtime queue setup,
receive queues that are started by default no longer
have the correct state. Fix this by setting the state
when a port is started.

Fixes: 0105ea1296c9 ("net/bnxt: support runtime queue setup")
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Ajit Khaparde Sept. 15, 2021, 3:48 a.m. UTC | #1
On Tue, Sep 14, 2021 at 5:51 AM Lance Richardson
<lance.richardson@broadcom.com> wrote:
>
> Since the addition of support for runtime queue setup,
> receive queues that are started by default no longer
> have the correct state. Fix this by setting the state
> when a port is started.
>
> Fixes: 0105ea1296c9 ("net/bnxt: support runtime queue setup")
> Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Reviewed-by: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@broadcom.com>
Patch applied to dpdk-next-net-brcm. Thanks

> ---
>  drivers/net/bnxt/bnxt_ethdev.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index d6e3847963..097dd10de9 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -482,6 +482,12 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
>                         rxq->vnic->fw_grp_ids[j] = INVALID_HW_RING_ID;
>                 else
>                         vnic->rx_queue_cnt++;
> +
> +               if (!rxq->rx_deferred_start) {
> +                       bp->eth_dev->data->rx_queue_state[j] =
> +                               RTE_ETH_QUEUE_STATE_STARTED;
> +                       rxq->rx_started = true;
> +               }
>         }
>
>         PMD_DRV_LOG(DEBUG, "vnic->rx_queue_cnt = %d\n", vnic->rx_queue_cnt);
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index d6e3847963..097dd10de9 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -482,6 +482,12 @@  static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
 			rxq->vnic->fw_grp_ids[j] = INVALID_HW_RING_ID;
 		else
 			vnic->rx_queue_cnt++;
+
+		if (!rxq->rx_deferred_start) {
+			bp->eth_dev->data->rx_queue_state[j] =
+				RTE_ETH_QUEUE_STATE_STARTED;
+			rxq->rx_started = true;
+		}
 	}
 
 	PMD_DRV_LOG(DEBUG, "vnic->rx_queue_cnt = %d\n", vnic->rx_queue_cnt);