net/mlx5e: MPLSoUDP decap, fix check for unsupported matches
authorMaor Dickman <maord@nvidia.com>
Thu, 6 Jan 2022 12:46:24 +0000 (14:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Mar 2022 10:48:00 +0000 (11:48 +0100)
commit95c1867704d0b4c0ee0fec46c52101049ff4c03d
tree55418991ba4bcd2314b08e82b21556cc6e152e4f
parentd4d188487ddc257fc16821380fbd6fc42d28944a
net/mlx5e: MPLSoUDP decap, fix check for unsupported matches

commit fdc18e4e4bded2a08638cdcd22dc087a64b9ddad upstream.

Currently offload of rule on bareudp device require tunnel key
in order to match on mpls fields and without it the mpls fields
are ignored, this is incorrect due to the fact udp tunnel doesn't
have key to match on.

Fix by returning error in case flow is matching on tunnel key.

Fixes: 72046a91d134 ("net/mlx5e: Allow to match on mpls parameters")
Signed-off-by: Maor Dickman <maord@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_mplsoudp.c