DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] bnx2x: fix maximum PF queues
@ 2016-10-06  5:36 Rasesh Mody
  2016-10-06  5:36 ` [dpdk-dev] [PATCH 2/2] bnx2x: fix to use SOCKET_ID_ANY for slowpath memory Rasesh Mody
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rasesh Mody @ 2016-10-06  5:36 UTC (permalink / raw)
  To: dev; +Cc: Dept-EngDPDKDev, Rasesh Mody

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;
 	}
 }
 
-- 
1.7.10.3

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

* [dpdk-dev] [PATCH 2/2] bnx2x: fix to use SOCKET_ID_ANY for slowpath memory
  2016-10-06  5:36 [dpdk-dev] [PATCH 1/2] bnx2x: fix maximum PF queues Rasesh Mody
@ 2016-10-06  5:36 ` Rasesh Mody
  2016-10-11 13:56 ` [dpdk-dev] [PATCH 1/2] bnx2x: fix maximum PF queues Chas Williams
  2016-10-12 16:33 ` Bruce Richardson
  2 siblings, 0 replies; 5+ messages in thread
From: Rasesh Mody @ 2016-10-06  5:36 UTC (permalink / raw)
  To: dev; +Cc: Dept-EngDPDKDev, Rasesh Mody

When the DMA allocation routine is invoked in the context of a non-EAL
thread, the API rte_lcore_id() returns -1 and indexing on that in
rte_lcore_to_socket_id() leads to segfault. The fix is to use
SOCKET_ID_ANY as the socket_id for all slowpath memory allocation.

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

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

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 2bb4a84..8970334 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -178,7 +178,7 @@ bnx2x_dma_alloc(struct bnx2x_softc *sc, size_t size, struct bnx2x_dma *dma,
 
 	/* Caller must take care that strlen(mz_name) < RTE_MEMZONE_NAMESIZE */
 	z = rte_memzone_reserve_aligned(mz_name, (uint64_t) (size),
-					rte_lcore_to_socket_id(rte_lcore_id()),
+					SOCKET_ID_ANY,
 					0, align);
 	if (z == NULL) {
 		PMD_DRV_LOG(ERR, "DMA alloc failed for %s", msg);
-- 
1.7.10.3

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

* Re: [dpdk-dev] [PATCH 1/2] bnx2x: fix maximum PF queues
  2016-10-06  5:36 [dpdk-dev] [PATCH 1/2] bnx2x: fix maximum PF queues Rasesh Mody
  2016-10-06  5:36 ` [dpdk-dev] [PATCH 2/2] bnx2x: fix to use SOCKET_ID_ANY for slowpath memory Rasesh Mody
@ 2016-10-11 13:56 ` Chas Williams
  2016-10-11 14:22   ` Harish Patil
  2016-10-12 16:33 ` Bruce Richardson
  2 siblings, 1 reply; 5+ messages in thread
From: Chas Williams @ 2016-10-11 13:56 UTC (permalink / raw)
  To: Rasesh Mody, dev; +Cc: Dept-EngDPDKDev

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>

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

* Re: [dpdk-dev] [PATCH 1/2] bnx2x: fix maximum PF queues
  2016-10-11 13:56 ` [dpdk-dev] [PATCH 1/2] bnx2x: fix maximum PF queues Chas Williams
@ 2016-10-11 14:22   ` Harish Patil
  0 siblings, 0 replies; 5+ messages in thread
From: Harish Patil @ 2016-10-11 14:22 UTC (permalink / raw)
  To: Chas Williams, Rasesh Mody, dev; +Cc: Dept-Eng DPDK Dev

>

>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 


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

* Re: [dpdk-dev] [PATCH 1/2] bnx2x: fix maximum PF queues
  2016-10-06  5:36 [dpdk-dev] [PATCH 1/2] bnx2x: fix maximum PF queues Rasesh Mody
  2016-10-06  5:36 ` [dpdk-dev] [PATCH 2/2] bnx2x: fix to use SOCKET_ID_ANY for slowpath memory Rasesh Mody
  2016-10-11 13:56 ` [dpdk-dev] [PATCH 1/2] bnx2x: fix maximum PF queues Chas Williams
@ 2016-10-12 16:33 ` Bruce Richardson
  2 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2016-10-12 16:33 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dev, Dept-EngDPDKDev

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

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

end of thread, other threads:[~2016-10-12 16:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-06  5:36 [dpdk-dev] [PATCH 1/2] bnx2x: fix maximum PF queues Rasesh Mody
2016-10-06  5:36 ` [dpdk-dev] [PATCH 2/2] bnx2x: fix to use SOCKET_ID_ANY for slowpath memory Rasesh Mody
2016-10-11 13:56 ` [dpdk-dev] [PATCH 1/2] bnx2x: fix maximum PF queues Chas Williams
2016-10-11 14:22   ` Harish Patil
2016-10-12 16:33 ` Bruce Richardson

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