net/mlx5: fix running without Rx queue
authorShiri Kuzin <shirik@mellanox.com>
Thu, 20 Feb 2020 14:42:26 +0000 (14:42 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 21 Feb 2020 10:41:21 +0000 (11:41 +0100)
commit606d690548983ef69560c20b21c1431d4ebc0ca2
tree549f6245ceb0426a559afff1f167ac05d53eb022
parent797329d6c4a1d054a6fce38c960811cb7878283d
net/mlx5: fix running without Rx queue

When running mlx5_dev_start in mlx5_ethdev the function calls
mlx5_dev_configure_rss_reta in order to configure the rxq's.

Before mlx5_dev_configure_rss_reta there isn't a check whether
there are rxq's and if rxq's are 0 the function fails.
For example, this command:
/build/app/test-pmd/testpmd -n 4  -w 0000:08:00.0,rx_vec_en=0
-- --burst=64 --mbcache=512 -i  --nb-cores=27  --txd=2048 --rxd=2048
--vxlan-gpe-port=6081 --mp-alloc=xbuf --rxq 0 --forward-mode=txonly
would fail.

In order to fix this issue, we should call mlx5_dev_configure_rss_reta
only if we have rxq's.

Fixes: 63bd16292c3a ("net/mlx5: support RSS on hairpin")
Cc: stable@dpdk.org
Reported-by: Sylvain Rodon <srn@nexatech.fr>
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx5/mlx5_trigger.c