summaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorMoni Shoua <monis@mellanox.com>2015-12-06 18:07:41 +0200
committerDavid S. Miller <davem@davemloft.net>2015-12-06 22:40:45 -0500
commit5f61385d2ebc2bd62bc389c7da0d8d2f263be1eb (patch)
tree2a39c035a40b1064b45ec09453226182b956640e /include/linux/mlx4
parent78efed275117b189f06f8937798eab5cba53ed18 (diff)
downloadop-kernel-dev-5f61385d2ebc2bd62bc389c7da0d8d2f263be1eb.zip
op-kernel-dev-5f61385d2ebc2bd62bc389c7da0d8d2f263be1eb.tar.gz
net/mlx4_core: Keep VLAN/MAC tables mirrored in multifunc HA mode
Due to HW limitations, indexes to MAC and VLAN tables are always taken from the table of the actual port. So, if a resource holds an index to a table, it may refer to different values during the lifetime of the resource, unless the tables are mirrored. Also, even when driver is not in HA mode the policy of allocating an index to these tables is such to make sure, as much as possible, that when the time comes the mirroring will be successful. This means that in multifunction mode the allocation of a free index in a port's table tries to make sure that the same index in the other's port table is also free. 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>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/driver.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h
index 5a06d96..2e8af00 100644
--- a/include/linux/mlx4/driver.h
+++ b/include/linux/mlx4/driver.h
@@ -75,6 +75,11 @@ static inline int mlx4_is_bonded(struct mlx4_dev *dev)
return !!(dev->flags & MLX4_FLAG_BONDED);
}
+static inline int mlx4_is_mf_bonded(struct mlx4_dev *dev)
+{
+ return (mlx4_is_bonded(dev) && mlx4_is_mfunc(dev));
+}
+
struct mlx4_port_map {
u8 port1;
u8 port2;
OpenPOWER on IntegriCloud