[dpdk-dev,1/2] bnx2x: fix maximum PF queues

Message ID 1475732197-668-1-git-send-email-rasesh.mody@qlogic.com (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers

Commit Message

Rasesh Mody Oct. 6, 2016, 5:36 a.m. UTC
  Fix the max number of PF rx/tx queues. Set the value based
on BNX2X_MAX_RSS_COUNT() rather than hard coding it to 128.

Fixes: 540a211 ("bnx2x: driver core")

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
---
 drivers/net/bnx2x/bnx2x.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Chas Williams Oct. 11, 2016, 1:56 p.m. UTC | #1
On Wed, 2016-10-05 at 22:36 -0700, Rasesh Mody wrote:
> Fix the max number of PF rx/tx queues. Set the value based
> on BNX2X_MAX_RSS_COUNT() rather than hard coding it to 128.
> 
> Fixes: 540a211 ("bnx2x: driver core")
> 
> Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
> ---
>  drivers/net/bnx2x/bnx2x.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
> index a49a07f..2bb4a84 100644
> --- a/drivers/net/bnx2x/bnx2x.c
> +++ b/drivers/net/bnx2x/bnx2x.c
> @@ -9556,8 +9556,8 @@ static void bnx2x_init_rte(struct bnx2x_softc *sc)
>  		sc->max_rx_queues = min(BNX2X_VF_MAX_QUEUES_PER_VF,
>  					sc->igu_sb_cnt);
>  	} else {
> -		sc->max_tx_queues = 128;
> -		sc->max_rx_queues = 128;
> +		sc->max_rx_queues = BNX2X_MAX_RSS_COUNT(sc);
> +		sc->max_tx_queues = sc->max_rx_queues;
>  	}
>  }

Technically, I think max_tx_queues would be max_rx_queues * max_cos.
However, I don't think there are any DPDK applications that would take
advantage of this.

Acked-By: Chas Williams <3chas3@gmail.com>
  
Harish Patil Oct. 11, 2016, 2:22 p.m. UTC | #2
>


>On Wed, 2016-10-05 at 22:36 -0700, Rasesh Mody wrote:

>> Fix the max number of PF rx/tx queues. Set the value based

>> on BNX2X_MAX_RSS_COUNT() rather than hard coding it to 128.

>> 

>> Fixes: 540a211 ("bnx2x: driver core")

>> 

>> Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>

>> ---

>>  drivers/net/bnx2x/bnx2x.c |    4 ++--

>>  1 file changed, 2 insertions(+), 2 deletions(-)

>> 

>> diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c

>> index a49a07f..2bb4a84 100644

>> --- a/drivers/net/bnx2x/bnx2x.c

>> +++ b/drivers/net/bnx2x/bnx2x.c

>> @@ -9556,8 +9556,8 @@ static void bnx2x_init_rte(struct bnx2x_softc *sc)

>>  		sc->max_rx_queues = min(BNX2X_VF_MAX_QUEUES_PER_VF,

>>  					sc->igu_sb_cnt);

>>  	} else {

>> -		sc->max_tx_queues = 128;

>> -		sc->max_rx_queues = 128;

>> +		sc->max_rx_queues = BNX2X_MAX_RSS_COUNT(sc);

>> +		sc->max_tx_queues = sc->max_rx_queues;

>>  	}

>>  }

>

>Technically, I think max_tx_queues would be max_rx_queues * max_cos.

>However, I don't think there are any DPDK applications that would take

>advantage of this.

>

>Acked-By: Chas Williams <3chas3@gmail.com>

>


Thanks Chas.
Ideally yes that’s the case.
But the driver doesn’t support asymmetrical no. of rx/tx queues, its only
the queue-pairs and hence RX=TX.
Many places in the driver assumes rx/tx queues are same and loop on rss_id
to access the corresponding tss_id.

Thanks,
Harish
  
Bruce Richardson Oct. 12, 2016, 4:33 p.m. UTC | #3
On Wed, Oct 05, 2016 at 10:36:36PM -0700, Rasesh Mody wrote:
> Fix the max number of PF rx/tx queues. Set the value based
> on BNX2X_MAX_RSS_COUNT() rather than hard coding it to 128.
> 
> Fixes: 540a211 ("bnx2x: driver core")
> 
> Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
> ---

Series applied to dpdk-next-net/rel_16_11

/Bruce
  

Patch

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index a49a07f..2bb4a84 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -9556,8 +9556,8 @@  static void bnx2x_init_rte(struct bnx2x_softc *sc)
 		sc->max_rx_queues = min(BNX2X_VF_MAX_QUEUES_PER_VF,
 					sc->igu_sb_cnt);
 	} else {
-		sc->max_tx_queues = 128;
-		sc->max_rx_queues = 128;
+		sc->max_rx_queues = BNX2X_MAX_RSS_COUNT(sc);
+		sc->max_tx_queues = sc->max_rx_queues;
 	}
 }