]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_nve: Make tunnel initialization symmetric
authorIdo Schimmel <idosch@mellanox.com>
Thu, 20 Feb 2020 07:08:00 +0000 (09:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Feb 2020 18:04:34 +0000 (10:04 -0800)
commitfb7e9e5327c9e695be813c21924d945e7c2d51ad
tree9dcac5c9f49abfdf4dc60921c8c1fa9d9df02e95
parentb3dc27aad2cd55aa8dfd3084ba21e9c4e6e11649
mlxsw: spectrum_nve: Make tunnel initialization symmetric

The device supports a single VTEP whose configuration is shared between
all VXLAN tunnels.

While the shared configuration is cleared upon the destruction of the
last tunnel - in mlxsw_sp_nve_tunnel_fini() - it is set in
mlxsw_sp_nve_fid_enable(), after calling mlxsw_sp_nve_tunnel_init().

Make tunnel initialization and destruction symmetric and set the
configuration in mlxsw_sp_nve_tunnel_init().

This will later allow us to protect the shared configuration with a
lock.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c