]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Replace tunnel mpls capability bits for tunnel_offloads
authorAlex Vesker <valex@mellanox.com>
Thu, 5 Mar 2020 12:38:41 +0000 (14:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 08:48:10 +0000 (10:48 +0200)
commit9b2adcea04f6875ce4dfda8b83184abc3028fcd0
tree8d1189cb41d8fb68cb5cb9466c41e90b58a19e1a
parent8270e2d987e746dc591247fd43bdff421aba3822
IB/mlx5: Replace tunnel mpls capability bits for tunnel_offloads

commit 88d4501821b9ae77436bc3c8aab851da36b218c7 upstream.

Until now the flex parser capability was used in ib_query_device() to
indicate tunnel_offloads_caps support for mpls_over_gre/mpls_over_udp.

Newer devices and firmware will have configurations with the flexparser
but without mpls support.

Testing for the flex parser capability was a mistake, the tunnel_stateless
capability was intended for detecting mpls and was introduced at the same
time as the flex parser capability.

Otherwise userspace will be incorrectly informed that a future device
supports MPLS when it does not.

Link: https://lore.kernel.org/r/20200305123841.196086-1-leon@kernel.org
Cc: <stable@vger.kernel.org> # 4.17
Fixes: 125a114c8495 ("IB/mlx5: Expose MPLS related tunneling offloads")
Signed-off-by: Alex Vesker <valex@mellanox.com>
Reviewed-by: Ariel Levkovich <lariel@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx5/main.c
include/linux/mlx5/mlx5_ifc.h