From: Maor Gottlieb Date: Sun, 1 Jul 2018 12:50:17 +0000 (+0300) Subject: IB/mlx5: Fix GRE flow specification X-Git-Tag: v4.18.12~192 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b40f2ec52bf5647c4a1e71d73cd5a37a650f2944;p=users%2Fdwmw2%2Flinux.git IB/mlx5: Fix GRE flow specification [ Upstream commit a93b632c4531ff50c43d658447a45cbc11f488fd ] Currently the driver sets the mask of the gre_protocol to 0xffff without consideration in the user request. Fix it by copy the mask from the verbs spec. Fixes: da2f22ae7707 ("IB/mlx5: Add support for GRE flow specification") Signed-off-by: Maor Gottlieb Reviewed-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index cbeae45093594..85677afa6f772 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -2699,7 +2699,7 @@ static int parse_flow_attr(struct mlx5_core_dev *mdev, u32 *match_c, IPPROTO_GRE); MLX5_SET(fte_match_set_misc, misc_params_c, gre_protocol, - 0xffff); + ntohs(ib_spec->gre.mask.protocol)); MLX5_SET(fte_match_set_misc, misc_params_v, gre_protocol, ntohs(ib_spec->gre.val.protocol));