diff options
author | Gavin Li <gavinl@nvidia.com> | 2022-12-27 05:54:09 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2023-01-10 09:08:36 +0300 |
commit | d515d63cae2cd186acf40deaa8ef33067bb7f637 (patch) | |
tree | ce243029c5610e0b2688e63b0b45535840bd084c /drivers/net | |
parent | fe91d57277eef8bb4aca05acfa337b4a51d0bba4 (diff) | |
download | linux-d515d63cae2cd186acf40deaa8ef33067bb7f637.tar.xz |
net/mlx5e: Don't support encap rules with gbp option
Previously, encap rules with gbp option would be offloaded by mistake but
driver does not support gbp option offload.
To fix this issue, check if the encap rule has gbp option and don't
offload the rule
Fixes: d8f9dfae49ce ("net: sched: allow flower to match vxlan options")
Signed-off-by: Gavin Li <gavinl@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c index fd07c4cbfd1d..1f62c702b625 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c @@ -88,6 +88,8 @@ static int mlx5e_gen_ip_tunnel_header_vxlan(char buf[], struct udphdr *udp = (struct udphdr *)(buf); struct vxlanhdr *vxh; + if (tun_key->tun_flags & TUNNEL_VXLAN_OPT) + return -EOPNOTSUPP; vxh = (struct vxlanhdr *)((char *)udp + sizeof(struct udphdr)); *ip_proto = IPPROTO_UDP; |