path: root/drivers/net/mlx5/mlx5_rxq.c
diff options
authorDahir Osman <>2018-03-21 13:47:51 +0100
committerFerruh Yigit <>2018-03-30 14:08:44 +0200
commit66669155da323e6d8516c3b276888ee0f3cbd799 (patch)
tree28c3880e48a17112a0f08eef842a5df0a350bea5 /drivers/net/mlx5/mlx5_rxq.c
parent7b2207afe86df58b571e722dcee14734e91cdb2e (diff)
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 <> Signed-off-by: Nelio Laranjeiro <> Acked-by: Yongseok Koh <> Tested-by: Allain Legacy <>
Diffstat (limited to 'drivers/net/mlx5/mlx5_rxq.c')
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-> = mp;