]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net/mlx5e: Avoid supporting udp tunnel port ndo for VF reps
authorPaul Blakey <paulb@mellanox.com>
Tue, 21 Mar 2017 13:59:16 +0000 (15:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Mar 2017 19:11:13 +0000 (12:11 -0700)
commit1ad9a00ae0efc2e9337148d6c382fad3d27bf99a
tree91bc7469adb72c238305d31b9fc5e0353bd57b42
parent09c91ddf2cd33489c2c14edfef43ae38d412888e
net/mlx5e: Avoid supporting udp tunnel port ndo for VF reps

This was added to allow the TC offloading code to identify offloading
encap/decap vxlan rules.

The VF reps are effectively related to the same mlx5 PCI device as the
PF. Since the kernel invokes the (say) delete ndo for each netdev, the
FW erred on multiple vxlan dst port deletes when the port was deleted
from the system.

We fix that by keeping the registration to be carried out only by the
PF. Since the PF serves as the uplink device, the VF reps will look
up a port there and realize if they are ok to offload that.

Tested:
 <SETUP VFS>
 <SETUP switchdev mode to have representors>
 ip link add vxlan1 type vxlan id 44 dev ens5f0 dstport 9999
 ip link set vxlan1 up
 ip link del dev vxlan1

Fixes: 4a25730eb202 ('net/mlx5e: Add ndo_udp_tunnel_add to VF representors')
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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/en_tc.c