net/mlx4_core: Support mirroring VF DMFS rules on both ports
authorMoni Shoua <monis@mellanox.com>
Sun, 6 Dec 2015 16:07:40 +0000 (18:07 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Dec 2015 03:40:44 +0000 (22:40 -0500)
commit78efed275117b189f06f8937798eab5cba53ed18
tree5e3162206e881d360631c5cf1673f7b9199cbac2
parent8d80d04a521d4acf949a449403040c38ec648f57
net/mlx4_core: Support mirroring VF DMFS rules on both ports

Under HA mode, steering rules set by VFs should be mirrored on both
ports of the device so packets will be accepted no matter on which
port they arrived.

Since getting into HA mode is done dynamically when the user bonds mlx4
Ethernet netdevs, we keep hold of the VF DMFS rule mbox with the port
value flipped (1->2,2->1) and execute the mirroring when getting into
HA mode. Later, when going out of HA mode, we unset the mirrored rules.
In that context note that mirrored rules cannot be removed explicitly.

Signed-off-by: Moni Shoua <monis@mellanox.com>
Reviewed-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/mlx4.h
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c