IB/mlx4: Fix RSS hash fields restrictions
authorGuy Levi <guyle@mellanox.com>
Tue, 5 Dec 2017 20:30:03 +0000 (22:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:08:02 +0000 (11:08 +0100)
commit1840744a7f2e977f726f0197ecca5085f2e682da
tree313675008f742ddab6aa8947eb658abe8a32e082
parent8edeefab9ef2ddb13fad02594457c87386b7c2e0
IB/mlx4: Fix RSS hash fields restrictions

[ Upstream commit 4d02ebd9bbbdde1d524e62b540b0402cee7bbcdf ]

Mistakenly the driver didn't allow RSS hash fields combinations which
involve both IPv4 and IPv6 protocols. This bug caused to failures for
user's use cases for RSS.

Consequently, this patch fixes this bug and allows any combination that
the HW can support.

Additionally, the patch fixes the driver to return an error in case the
user provides an unsupported mask for RSS hash fields.

Fixes: 3078f5f1bd8b ("IB/mlx4: Add support for RSS QP")
Signed-off-by: Guy Levi <guyle@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx4/qp.c