aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlan Tayari <ilant@mellanox.com>2017-07-05 10:17:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-11 08:33:58 -0700
commit31d1e9e703dc03866e9fd5a2e0358be807390f3a (patch)
treea4ed80053c2fa861657a1791127b1fc456a7b69c
parent76370f2953ccf59dc23e72defe0d38a83fe57c39 (diff)
downloadlinux-yocto-4.12-31d1e9e703dc03866e9fd5a2e0358be807390f3a.tar.gz
linux-yocto-4.12-31d1e9e703dc03866e9fd5a2e0358be807390f3a.tar.bz2
linux-yocto-4.12-31d1e9e703dc03866e9fd5a2e0358be807390f3a.zip
net/mlx5e: Fix outer_header_zero() check size
[ Upstream commit 0242f4a0bb03906010bbf80495512be00494a0ef ] outer_header_zero() routine checks if the outer_headers match of a flow-table entry are all zero. This function uses the size of whole fte_match_param, instead of just the outer_headers member, causing failure to detect all-zeros if any other members of the fte_match_param are non-zero. Use the correct size for zero check. Fixes: 6dc6071cfcde ("net/mlx5e: Add ethtool flow steering support") Signed-off-by: Ilan Tayari <ilant@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
index 85bf4a389295..969ddb3aaf6e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
@@ -276,7 +276,7 @@ static void add_rule_to_list(struct mlx5e_priv *priv,
static bool outer_header_zero(u32 *match_criteria)
{
- int size = MLX5_ST_SZ_BYTES(fte_match_param);
+ int size = MLX5_FLD_SZ_BYTES(fte_match_param, outer_headers);
char *outer_headers_c = MLX5_ADDR_OF(fte_match_param, match_criteria,
outer_headers);