diff options
author | Matan Barak <matanb@mellanox.com> | 2017-08-07 11:14:11 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2017-08-24 16:02:58 +0300 |
commit | 667cb65ae5ad01523505d48d6cfd92bd1d3c9785 (patch) | |
tree | 3372de0fb49b1b82f4dfcb2cd26631cb7944741b /drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | |
parent | net/mlx5: Convert linear search for free index to ida (diff) | |
download | linux-dev-667cb65ae5ad01523505d48d6cfd92bd1d3c9785.tar.xz linux-dev-667cb65ae5ad01523505d48d6cfd92bd1d3c9785.zip |
net/mlx5: Don't store reserved part in FTEs and FGs
The current code stores fte_match_param in the software representation
of FTEs and FGs. fte_match_param contains a large reserved area at the
bottom of the struct. Since downstream patches are going to hash this
part, we would like to avoid doing so on a reserved part.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c index 16b32f31d691..e0d0efd903bc 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c @@ -263,7 +263,7 @@ static int mlx5_cmd_set_fte(struct mlx5_core_dev *dev, MLX5_SET(flow_context, in_flow_context, modify_header_id, fte->modify_id); in_match_value = MLX5_ADDR_OF(flow_context, in_flow_context, match_value); - memcpy(in_match_value, &fte->val, MLX5_ST_SZ_BYTES(fte_match_param)); + memcpy(in_match_value, &fte->val, sizeof(fte->val)); in_dests = MLX5_ADDR_OF(flow_context, in_flow_context, destination); if (fte->action & MLX5_FLOW_CONTEXT_ACTION_FWD_DEST) { |