net/mlx5e: Add helper for encap_info_equal for tunnels with options
authorGavin Li <gavinl@nvidia.com>
Thu, 16 Mar 2023 07:07:56 +0000 (09:07 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 18 Mar 2023 05:41:16 +0000 (22:41 -0700)
commit58de53c1025836529af9e22e96375d0874e2baca
tree2336ac65a0b3124d45b6c93d94138b03c553e483
parentc641e9279f3530aa2fe4bcb250477b555b75104a
net/mlx5e: Add helper for encap_info_equal for tunnels with options

For tunnels with options, eg, geneve and vxlan with gbp, they share the
same way to compare the headers and options. Extract the code as a common
function for them.

Signed-off-by: Gavin Li <gavinl@nvidia.com>
Reviewed-by: Gavi Teitz <gavi@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Acked-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c