mlxsw: Add support for VxLAN with IPv6 underlay
authorAmit Cohen <amcohen@nvidia.com>
Tue, 14 Dec 2021 14:25:50 +0000 (16:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Dec 2021 15:05:44 +0000 (15:05 +0000)
commit06c08f869c0eda8a466288b8ec32bc217d22a8fb
tree3fbddf11c18dab14255972b672b791735a91de2e
parent0860c764163448d4c64c1c6869d79f6e175df77a
mlxsw: Add support for VxLAN with IPv6 underlay

Currently, mlxsw driver supports VxLAN with IPv4 underlay only.
Add support for IPv6 underlay.

The main differences are:

* Learning is not supported for IPv6 FDB entries, use static entries and
  do not allow 'learning' flag for IPv6 VxLAN.

* IPv6 addresses for FDB entries should be saved as part of KVDL.
  Use the new API to allocate and release entries for IPv6 addresses.

* Spectrum ASICs do not fill UDP checksum, while in software IPv6 UDP
  packets with checksum zero are dropped.
  Force the relevant flags which allow the VxLAN device to generate UDP
  packets with zero checksum and also receive them.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c