diff options
author | Jack Morgenstein <jackm@mellanox.co.il> | 2006-06-18 07:37:34 +0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-06-18 07:37:34 +0400 |
commit | 6fb9cdbf2cdb2ea187e57ec2e16cc59df2adf86a (patch) | |
tree | 329eb272835bd3105696ddbc60cdaea971aa2a6e /include/rdma/ib_cache.h | |
parent | 856c256f883f027a14b546164294b4a86fea81a4 (diff) | |
download | linux-6fb9cdbf2cdb2ea187e57ec2e16cc59df2adf86a.tar.xz |
IB: Add caching of ports' LMC
Add an LMC cache to struct ib_device, and add a function
ib_get_cached_lmc() to query the cache.
Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include/rdma/ib_cache.h')
-rw-r--r-- | include/rdma/ib_cache.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/rdma/ib_cache.h b/include/rdma/ib_cache.h index 5bf9834f7dca..f179d233ffc3 100644 --- a/include/rdma/ib_cache.h +++ b/include/rdma/ib_cache.h @@ -102,4 +102,17 @@ int ib_find_cached_pkey(struct ib_device *device, u16 pkey, u16 *index); +/** + * ib_get_cached_lmc - Returns a cached lmc table entry + * @device: The device to query. + * @port_num: The port number of the device to query. + * @lmc: The lmc value for the specified port for that device. + * + * ib_get_cached_lmc() fetches the specified lmc table entry stored in + * the local software cache. + */ +int ib_get_cached_lmc(struct ib_device *device, + u8 port_num, + u8 *lmc); + #endif /* _IB_CACHE_H */ |