From: Pablo de Lara Date: Mon, 27 Jun 2016 22:35:19 +0000 (+0100) Subject: app/testpmd: limit number of forwarding cores X-Git-Tag: spdx-start~6328 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=017d680a91fcf30da14a6d3a2f96d41f6dda3a0f;p=dpdk.git 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 Tested-by: Nelio Laranjeiro Acked-by: John McNamara --- diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 9ccabf9108..de60284da4 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();