aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/alias_GUID.c
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2012-08-03 04:40:51 -0400
committerRoland Dreier <roland@purestorage.com>2012-09-30 23:33:39 -0400
commitc1e7e466120b80ce49e91af0c9da1ce6dee4844a (patch)
treefc67dbaf01fff7e0f411315ee3b5a6923cf22354 /drivers/infiniband/hw/mlx4/alias_GUID.c
parent2a4fae148cf4b60e73faf0a427302697917409d9 (diff)
IB/mlx4: Add iov directory in sysfs under the ib device
This directory is added only for the master -- slaves do not have it. The sysfs iov directory is used to manage and examine the port P_Key and guid paravirtualization. Under iov/ports, the administrator may examine the gid and P_Key tables as they are present in the device (and as are seen in the "network view" presented to the SM). Under the iov/<pci slot number> directories, the admin may map the index numbers in the physical tables (as under iov/ports) to the paravirtualized index numbers that guests see. For example, if the administrator, for port 1 on guest 2 maps physical pkey index 10 to virtual index 1, then that guest, whenever it uses its pkey index 1, will actually be using the real pkey index 10. Based on patch from Erez Shitrit <erezsh@mellanox.com> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/alias_GUID.c')
-rw-r--r--drivers/infiniband/hw/mlx4/alias_GUID.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mlx4/alias_GUID.c b/drivers/infiniband/hw/mlx4/alias_GUID.c
index ef6d356927c3..0fcd5cd6f3ee 100644
--- a/drivers/infiniband/hw/mlx4/alias_GUID.c
+++ b/drivers/infiniband/hw/mlx4/alias_GUID.c
@@ -113,7 +113,7 @@ static __be64 get_cached_alias_guid(struct mlx4_ib_dev *dev, int port, int index
113} 113}
114 114
115 115
116static ib_sa_comp_mask get_aguid_comp_mask_from_ix(int index) 116ib_sa_comp_mask mlx4_ib_get_aguid_comp_mask_from_ix(int index)
117{ 117{
118 return IB_SA_COMP_MASK(4 + index); 118 return IB_SA_COMP_MASK(4 + index);
119} 119}
@@ -259,7 +259,7 @@ static void aliasguid_query_handler(int status,
259 /* Mark the record as not assigned, and let it 259 /* Mark the record as not assigned, and let it
260 * be sent again in the next work sched.*/ 260 * be sent again in the next work sched.*/
261 rec->status = MLX4_GUID_INFO_STATUS_IDLE; 261 rec->status = MLX4_GUID_INFO_STATUS_IDLE;
262 rec->guid_indexes |= get_aguid_comp_mask_from_ix(i); 262 rec->guid_indexes |= mlx4_ib_get_aguid_comp_mask_from_ix(i);
263 } 263 }
264 } else { 264 } else {
265 /* properly assigned record. */ 265 /* properly assigned record. */
@@ -337,7 +337,7 @@ static void invalidate_guid_record(struct mlx4_ib_dev *dev, u8 port, int index)
337 MLX4_GUID_NONE_ASSIGN == dev->sriov.alias_guid. 337 MLX4_GUID_NONE_ASSIGN == dev->sriov.alias_guid.
338 ports_guid[port - 1].all_rec_per_port[index].ownership) 338 ports_guid[port - 1].all_rec_per_port[index].ownership)
339 continue; 339 continue;
340 comp_mask |= get_aguid_comp_mask_from_ix(i); 340 comp_mask |= mlx4_ib_get_aguid_comp_mask_from_ix(i);
341 } 341 }
342 dev->sriov.alias_guid.ports_guid[port - 1]. 342 dev->sriov.alias_guid.ports_guid[port - 1].
343 all_rec_per_port[index].guid_indexes = comp_mask; 343 all_rec_per_port[index].guid_indexes = comp_mask;