diff options
author | Dima Chumak <dchumak@nvidia.com> | 2021-02-11 09:36:33 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2021-03-31 13:12:24 -0700 |
commit | 929a2faddd55290fbb0b73f453b200ed1b2b2947 (patch) | |
tree | 6f9a7ca9845e6e517074968bd025999446ea00f9 /drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gre.c | |
parent | a7b76002ae78cd230ee652ccdfedf21aa94fcecc (diff) | |
download | linux-stable-929a2faddd55290fbb0b73f453b200ed1b2b2947.tar.gz linux-stable-929a2faddd55290fbb0b73f453b200ed1b2b2947.tar.bz2 linux-stable-929a2faddd55290fbb0b73f453b200ed1b2b2947.zip |
net/mlx5e: Consider geneve_opts for encap contexts
Current algorithm for encap keys is legacy from initial vxlan
implementation and doesn't take into account all possible fields of a
tunnel. For example, for a Geneve tunnel, which may have additional TLV
options, they are ignored when comparing encap keys and a rule can be
attached to an incorrect encap entry.
Fix that by introducing encap_info_equal() operation in
struct mlx5e_tc_tunnel. Geneve tunnel type uses custom implementation,
which extends generic algorithm and considers options if they are set.
Fixes: 7f1a546e3222 ("net/mlx5e: Consider tunnel type for encap contexts")
Signed-off-by: Dima Chumak <dchumak@nvidia.com>
Reviewed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gre.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gre.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gre.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gre.c index 2805416c32a3..ada14f0574dc 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gre.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gre.c @@ -94,4 +94,5 @@ struct mlx5e_tc_tunnel gre_tunnel = { .generate_ip_tun_hdr = mlx5e_gen_ip_tunnel_header_gretap, .parse_udp_ports = NULL, .parse_tunnel = mlx5e_tc_tun_parse_gretap, + .encap_info_equal = mlx5e_tc_tun_encap_info_equal_generic, }; |