DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: limit number of forwarding cores
@ 2016-06-27 22:35 Pablo de Lara
  2016-06-28  8:41 ` Nélio Laranjeiro
  2016-06-28  9:58 ` Mcnamara, John
  0 siblings, 2 replies; 4+ messages in thread
From: Pablo de Lara @ 2016-06-27 22:35 UTC (permalink / raw)
  To: dev; +Cc: Pablo de Lara

Number of forwarding cores must be equal or less than
number of forwarding streams, otherwise two cores
would try to use a same queue on a port, which is not allowed.

Fixes: f2bb7ae1d204 ("app/testpmd: handle all Rx queues in RSS setup")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-pmd/config.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 9ccabf9..de60284 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1236,6 +1236,10 @@ rss_fwd_config_setup(void)
 	cur_fwd_config.nb_fwd_streams =
 		(streamid_t) (nb_q * cur_fwd_config.nb_fwd_ports);
 
+	if (cur_fwd_config.nb_fwd_streams < cur_fwd_config.nb_fwd_lcores)
+		cur_fwd_config.nb_fwd_lcores =
+			(lcoreid_t)cur_fwd_config.nb_fwd_streams;
+
 	/* reinitialize forwarding streams */
 	init_fwd_streams();
 
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH] app/testpmd: limit number of forwarding cores
  2016-06-27 22:35 [dpdk-dev] [PATCH] app/testpmd: limit number of forwarding cores Pablo de Lara
@ 2016-06-28  8:41 ` Nélio Laranjeiro
  2016-06-30 17:23   ` Thomas Monjalon
  2016-06-28  9:58 ` Mcnamara, John
  1 sibling, 1 reply; 4+ messages in thread
From: Nélio Laranjeiro @ 2016-06-28  8:41 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dev

On Mon, Jun 27, 2016 at 11:35:19PM +0100, Pablo de Lara wrote:
> Number of forwarding cores must be equal or less than
> number of forwarding streams, otherwise two cores
> would try to use a same queue on a port, which is not allowed.
> 
> Fixes: f2bb7ae1d204 ("app/testpmd: handle all Rx queues in RSS setup")
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>  app/test-pmd/config.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index 9ccabf9..de60284 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -1236,6 +1236,10 @@ rss_fwd_config_setup(void)
>  	cur_fwd_config.nb_fwd_streams =
>  		(streamid_t) (nb_q * cur_fwd_config.nb_fwd_ports);
>  
> +	if (cur_fwd_config.nb_fwd_streams < cur_fwd_config.nb_fwd_lcores)
> +		cur_fwd_config.nb_fwd_lcores =
> +			(lcoreid_t)cur_fwd_config.nb_fwd_streams;
> +
>  	/* reinitialize forwarding streams */
>  	init_fwd_streams();
>  
> -- 
> 2.5.5

Tested with:
 - coremask allowing to use 12 cores for 4 txqs and 4 rxqs.
 - coremask allowing to use 12 cores for 6 txqs and 6 rxqs.
 - coremask allowing to use 12 cores for 8 txqs and 8 rxqs.

It fixes the issue.

Tested-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> 

-- 
Nélio Laranjeiro
6WIND

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

* Re: [dpdk-dev] [PATCH] app/testpmd: limit number of forwarding cores
  2016-06-27 22:35 [dpdk-dev] [PATCH] app/testpmd: limit number of forwarding cores Pablo de Lara
  2016-06-28  8:41 ` Nélio Laranjeiro
@ 2016-06-28  9:58 ` Mcnamara, John
  1 sibling, 0 replies; 4+ messages in thread
From: Mcnamara, John @ 2016-06-28  9:58 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, dev; +Cc: De Lara Guarch, Pablo



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Monday, June 27, 2016 11:35 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH] app/testpmd: limit number of forwarding cores
> 
> Number of forwarding cores must be equal or less than number of forwarding
> streams, otherwise two cores would try to use a same queue on a port,
> which is not allowed.
> 
> Fixes: f2bb7ae1d204 ("app/testpmd: handle all Rx queues in RSS setup")
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Acked-by: John McNamara <john.mcnamara@intel.com>

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

* Re: [dpdk-dev] [PATCH] app/testpmd: limit number of forwarding cores
  2016-06-28  8:41 ` Nélio Laranjeiro
@ 2016-06-30 17:23   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2016-06-30 17:23 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dev, Nélio Laranjeiro

2016-06-28 10:41, Nélio Laranjeiro:
> On Mon, Jun 27, 2016 at 11:35:19PM +0100, Pablo de Lara wrote:
> > Number of forwarding cores must be equal or less than
> > number of forwarding streams, otherwise two cores
> > would try to use a same queue on a port, which is not allowed.
> > 
> > Fixes: f2bb7ae1d204 ("app/testpmd: handle all Rx queues in RSS setup")
> > 
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> 
> Tested with:
>  - coremask allowing to use 12 cores for 4 txqs and 4 rxqs.
>  - coremask allowing to use 12 cores for 6 txqs and 6 rxqs.
>  - coremask allowing to use 12 cores for 8 txqs and 8 rxqs.
> 
> It fixes the issue.
> 
> Tested-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> 

Applied, thanks

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

end of thread, other threads:[~2016-06-30 17:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-27 22:35 [dpdk-dev] [PATCH] app/testpmd: limit number of forwarding cores Pablo de Lara
2016-06-28  8:41 ` Nélio Laranjeiro
2016-06-30 17:23   ` Thomas Monjalon
2016-06-28  9:58 ` Mcnamara, John

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