DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bnxt: fix Rx queue pool calculation
@ 2019-11-18 20:31 Ajit Khaparde
  2019-11-18 20:41 ` Ajit Khaparde
  0 siblings, 1 reply; 3+ messages in thread
From: Ajit Khaparde @ 2019-11-18 20:31 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Somnath Kotur

When the number of Rx queues requested by the application is less than
the number of pools calculated, we end up calling HWRM_VNIC_ALLOC with
incorrect parameters. This causes the firmware to return an error.
Fix the Rx queue pool calculation.

Fixes: 10bb6ddc2984 ("net/bnxt: fix flow creation with non-consecutive group ids")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 94f105d34..457ebede0 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -104,6 +104,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
 		pools = bp->rx_cosq_cnt ? bp->rx_cosq_cnt : pools;
 	}
 
+	pools = RTE_MIN(pools, bp->rx_cp_nr_rings);
 	nb_q_per_grp = bp->rx_cp_nr_rings / pools;
 	bp->rx_num_qs_per_vnic = nb_q_per_grp;
 	PMD_DRV_LOG(DEBUG, "pools = %u nb_q_per_grp = %u\n",
-- 
2.21.0 (Apple Git-122.2)


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

* Re: [dpdk-dev] [PATCH] net/bnxt: fix Rx queue pool calculation
  2019-11-18 20:31 [dpdk-dev] [PATCH] net/bnxt: fix Rx queue pool calculation Ajit Khaparde
@ 2019-11-18 20:41 ` Ajit Khaparde
  2019-11-19 13:03   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Ajit Khaparde @ 2019-11-18 20:41 UTC (permalink / raw)
  To: dpdk-dev; +Cc: Ferruh Yigit, Somnath Kotur

On Mon, Nov 18, 2019 at 12:32 PM Ajit Khaparde <ajit.khaparde@broadcom.com>
wrote:

> When the number of Rx queues requested by the application is less than
> the number of pools calculated, we end up calling HWRM_VNIC_ALLOC with
> incorrect parameters. This causes the firmware to return an error.
> Fix the Rx queue pool calculation.
>
> Fixes: 10bb6ddc2984 ("net/bnxt: fix flow creation with non-consecutive
> group ids")
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
>
Patch applied to dpdk-next-net-brcm


> ---
>  drivers/net/bnxt/bnxt_rxq.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
> index 94f105d34..457ebede0 100644
> --- a/drivers/net/bnxt/bnxt_rxq.c
> +++ b/drivers/net/bnxt/bnxt_rxq.c
> @@ -104,6 +104,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
>                 pools = bp->rx_cosq_cnt ? bp->rx_cosq_cnt : pools;
>         }
>
> +       pools = RTE_MIN(pools, bp->rx_cp_nr_rings);
>         nb_q_per_grp = bp->rx_cp_nr_rings / pools;
>         bp->rx_num_qs_per_vnic = nb_q_per_grp;
>         PMD_DRV_LOG(DEBUG, "pools = %u nb_q_per_grp = %u\n",
> --
> 2.21.0 (Apple Git-122.2)
>
>

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

* Re: [dpdk-dev] [PATCH] net/bnxt: fix Rx queue pool calculation
  2019-11-18 20:41 ` Ajit Khaparde
@ 2019-11-19 13:03   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2019-11-19 13:03 UTC (permalink / raw)
  To: Ajit Khaparde, dpdk-dev; +Cc: Somnath Kotur

On 11/18/2019 8:41 PM, Ajit Khaparde wrote:
> 
> 
> On Mon, Nov 18, 2019 at 12:32 PM Ajit Khaparde <ajit.khaparde@broadcom.com
> <mailto:ajit.khaparde@broadcom.com>> wrote:
> 
>     When the number of Rx queues requested by the application is less than
>     the number of pools calculated, we end up calling HWRM_VNIC_ALLOC with
>     incorrect parameters. This causes the firmware to return an error.
>     Fix the Rx queue pool calculation.
> 
>     Fixes: 10bb6ddc2984 ("net/bnxt: fix flow creation with non-consecutive group
>     ids")
> 
>     Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com
>     <mailto:ajit.khaparde@broadcom.com>>
>     Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com
>     <mailto:somnath.kotur@broadcom.com>>
> 
> Patch applied to dpdk-next-net-brcm

Squashed into relevant commit in next-net, thanks.

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

end of thread, other threads:[~2019-11-19 13:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-18 20:31 [dpdk-dev] [PATCH] net/bnxt: fix Rx queue pool calculation Ajit Khaparde
2019-11-18 20:41 ` Ajit Khaparde
2019-11-19 13:03   ` Ferruh Yigit

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).