mlx4/en_netdev: allow offloading VXLAN over VLAN
authorDavide Caratti <dcaratti@redhat.com>
Fri, 26 Jul 2019 18:18:12 +0000 (20:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Jul 2019 21:22:32 +0000 (14:22 -0700)
commit91c6bfb8315b05d0c3aa8c2cfc172888d05e31d5
tree7e3a5937d035e22e1cfd28a4e92ee8aec4985e63
parent85d2c5cde158ce00fe965561cfc57404fbefb0a7
mlx4/en_netdev: allow offloading VXLAN over VLAN

ConnectX-3 Pro can offload transmission of VLAN packets with VXLAN inside:
enable tunnel offloads in dev->vlan_features, like it's done with other
NIC drivers (e.g. be2net and ixgbe).

It's no more necessary to change dev->hw_enc_features when VXLAN are added
or removed, since .ndo_features_check() already checks for VXLAN packet
where the UDP destination port matches the configured value. Just set
dev->hw_enc_features when the NIC is initialized, so that overlying VLAN
can correctly inherit the tunnel offload capabilities.

Changes since v1:
- avoid flipping hw_enc_features, instead of calling netdev notifiers,
  thanks to Saeed Mahameed
- squash two patches into a single one

CC: Paolo Abeni <pabeni@redhat.com>
CC: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c