aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2012-08-03 04:40:39 -0400
committerRoland Dreier <roland@purestorage.com>2012-09-30 23:33:30 -0400
commit73aaa7418f8069103ca56fc620b3cd16c5a37d6e (patch)
tree0110a685c949f7ce92e804ddff1cf6f34482d152 /include/rdma
parentff7166c447df23a61e4f51bf748319dc6728dc74 (diff)
IB/core: Add ib_find_exact_cached_pkey()
When P_Key tables potentially contain both full and partial membership copies for the same P_Key, we need a function to find the index for an exact (16-bit) P_Key. This is necessary when the master forwards QP1 MADs sent by guests. If the guest has sent the MAD with a limited membership P_Key, we need to to forward the MAD using the same limited membership P_Key. Since the master may have both the limited and the full member P_Keys in its table, we must make sure to retrieve the limited membership P_Key in this case. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_cache.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/rdma/ib_cache.h b/include/rdma/ib_cache.h
index 00a2b8ec327f..ad9a3c280944 100644
--- a/include/rdma/ib_cache.h
+++ b/include/rdma/ib_cache.h
@@ -101,6 +101,22 @@ int ib_find_cached_pkey(struct ib_device *device,
101 u16 *index); 101 u16 *index);
102 102
103/** 103/**
104 * ib_find_exact_cached_pkey - Returns the PKey table index where a specified
105 * PKey value occurs. Comparison uses the FULL 16 bits (incl membership bit)
106 * @device: The device to query.
107 * @port_num: The port number of the device to search for the PKey.
108 * @pkey: The PKey value to search for.
109 * @index: The index into the cached PKey table where the PKey was found.
110 *
111 * ib_find_exact_cached_pkey() searches the specified PKey table in
112 * the local software cache.
113 */
114int ib_find_exact_cached_pkey(struct ib_device *device,
115 u8 port_num,
116 u16 pkey,
117 u16 *index);
118
119/**
104 * ib_get_cached_lmc - Returns a cached lmc table entry 120 * ib_get_cached_lmc - Returns a cached lmc table entry
105 * @device: The device to query. 121 * @device: The device to query.
106 * @port_num: The port number of the device to query. 122 * @port_num: The port number of the device to query.