summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_rxq.c
diff options
context:
space:
mode:
authorDahir Osman <dahir.osman@windriver.com>2018-03-21 13:47:51 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2018-03-30 14:08:44 +0200
commit66669155da323e6d8516c3b276888ee0f3cbd799 (patch)
tree28c3880e48a17112a0f08eef842a5df0a350bea5 /drivers/net/mlx5/mlx5_rxq.c
parent7b2207afe86df58b571e722dcee14734e91cdb2e (diff)
downloaddpdk-66669155da323e6d8516c3b276888ee0f3cbd799.zip
dpdk-66669155da323e6d8516c3b276888ee0f3cbd799.tar.gz
dpdk-66669155da323e6d8516c3b276888ee0f3cbd799.tar.xz
net/mlx5: setup RSS regardless of queue count
In some environments it is desirable to have the NIC perform RSS normally on the packet regardless of the number of queues configured. The RSS hash result that is stored in the mbuf can then be used by the application to make decisions about how to distribute workloads to threads, secondary processes, or even virtual machines if the application is a virtual switch. This change to the mlx5 driver aligns with how other drivers in the Intel family work. Signed-off-by: Allain Legacy <allain.legacy@windriver.com> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Yongseok Koh <yskoh@mellanox.com> Tested-by: Allain Legacy <allain.legacy@windriver.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_rxq.c')
-rw-r--r--drivers/net/mlx5/mlx5_rxq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 56b2d19..1b45705 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1070,7 +1070,8 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
tmpl->rxq.crc_present ? "disabled" : "enabled",
tmpl->rxq.crc_present << 2);
/* Save port ID. */
- tmpl->rxq.rss_hash = priv->rxqs_n > 1;
+ tmpl->rxq.rss_hash = !!priv->rss_conf.rss_hf &&
+ (!!(dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS));
tmpl->rxq.port_id = dev->data->port_id;
tmpl->priv = priv;
tmpl->rxq.mp = mp;