summaryrefslogtreecommitdiff
path: root/drivers/net/mlx4/mlx4.c
diff options
context:
space:
mode:
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>2018-04-26 18:26:15 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2018-05-02 19:28:48 +0200
commit1d173da83ef2176b7ef107b76a4c5b80d47e1d00 (patch)
tree76b65fc4661092475aab62ce565a755b85834995 /drivers/net/mlx4/mlx4.c
parent84a684862f502f2d885bc5fa112da26265d5a0f4 (diff)
downloaddpdk-1d173da83ef2176b7ef107b76a4c5b80d47e1d00.zip
dpdk-1d173da83ef2176b7ef107b76a4c5b80d47e1d00.tar.gz
dpdk-1d173da83ef2176b7ef107b76a4c5b80d47e1d00.tar.xz
net/mlx4: fix default RSS hash fields
Using special types value -1 with mlx4_conv_rss_types() is supposed to return a supported set of Verbs RSS hash fields, that is, priv->hw_rss_sup unmodified. Due to the way this function is written and because it is also used to initially populate priv->hw_rss_sup however, this special value works properly only once and fails with ENOTSUP errors afterward. This problem can be seen when re-creating default flows (e.g. by entering and leaving isolated mode). Fixes: 024e87bef40b ("net/mlx4: restore UDP RSS by probing capabilities") Cc: stable@dpdk.org Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Diffstat (limited to 'drivers/net/mlx4/mlx4.c')
-rw-r--r--drivers/net/mlx4/mlx4.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 3dd72db..4e472fa 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -569,14 +569,13 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
if (!priv->hw_rss_sup) {
WARN("no RSS capabilities reported; disabling support"
" for UDP RSS and inner VXLAN RSS");
- /* Fake support for all possible RSS hash fields. */
- priv->hw_rss_sup = ~UINT64_C(0);
- priv->hw_rss_sup = mlx4_conv_rss_types(priv, -1);
- /* Filter out known unsupported fields. */
- priv->hw_rss_sup &=
- ~(uint64_t)(IBV_RX_HASH_SRC_PORT_UDP |
- IBV_RX_HASH_DST_PORT_UDP |
- IBV_RX_HASH_INNER);
+ priv->hw_rss_sup =
+ IBV_RX_HASH_SRC_IPV4 |
+ IBV_RX_HASH_DST_IPV4 |
+ IBV_RX_HASH_SRC_IPV6 |
+ IBV_RX_HASH_DST_IPV6 |
+ IBV_RX_HASH_SRC_PORT_TCP |
+ IBV_RX_HASH_DST_PORT_TCP;
}
DEBUG("supported RSS hash fields mask: %016" PRIx64,
priv->hw_rss_sup);