mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
856c256f88
commit
6fb9cdbf2c
3 changed files with 43 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue