OSDN Git Service

net/mlx5: convert to new udp_tunnel infrastructure
authorJakub Kicinski <kuba@kernel.org>
Tue, 28 Jul 2020 21:47:59 +0000 (14:47 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 3 Aug 2020 17:13:56 +0000 (10:13 -0700)
commit18a2b7f969c9b6386a506a5d026962e53dc0bb14
tree1e02d2b5a3996885a36c64599e94d3e054c50b21
parent966e50597666d530b69de2abb9c83ff0a9bd3ee6
net/mlx5: convert to new udp_tunnel infrastructure

Allocate nic_info dynamically - n_entries is not constant.

Attach the tunnel offload info only to the uplink representor.
We expect the "main" netdev to be unregistered in switchdev
mode, and there to be only one uplink representor.

Drop the udp_tunnel_drop_rx_info() call, it was not there until
commit b3c2ed21c0bd ("net/mlx5e: Fix VXLAN configuration restore after function reload")
so the device doesn't need it, and core should handle reloads and
reset just fine.

v2:
 - don't drop the ndos on reprs, and register info on uplink repr.
v4:
 - Move netdev tunnel structure handling to en_main.c

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c
drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h