OSDN Git Service

be2net: convert to new udp_tunnel_nic infra
authorJakub Kicinski <kuba@kernel.org>
Tue, 14 Jul 2020 19:18:20 +0000 (12:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Jul 2020 00:04:27 +0000 (17:04 -0700)
commit8f0545d232ca4eb1449584c68725d02f03a1d1a9
treef8c25b1edc8c23deee5a3799cd920e1639f1d894
parent641ca08547f83bd265477150a66cf2378bc98ed7
be2net: convert to new udp_tunnel_nic infra

Convert be2net to new udp_tunnel_nic infra. NIC only takes one VxLAN
port. Remove the port tracking using a list. The warning in
be_work_del_vxlan_port() looked suspicious - like the driver expected
ports to be removed in order of addition.

be2net unregisters ports when going down and re-registers them (for
skyhawk) when coming up, but it never checks if the device is up
in the add_port / del_port callbacks. Make it use
UDP_TUNNEL_NIC_INFO_OPEN_ONLY. Sadly this driver calls its own
open/close functions directly so the udp_tunnel_nic_reset_ntf()
workaround is needed.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_main.c