2 * Copyright (c) 2004 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Intel Corporation. All rights reserved.
4 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
6 * This software is available to you under a choice of one of two
7 * licenses. You may choose to be licensed under the terms of the GNU
8 * General Public License (GPL) Version 2, available from the file
9 * COPYING in the main directory of this source tree, or the
10 * OpenIB.org BSD license below:
12 * Redistribution and use in source and binary forms, with or
13 * without modification, are permitted provided that the following
16 * - Redistributions of source code must retain the above
17 * copyright notice, this list of conditions and the following
20 * - Redistributions in binary form must reproduce the above
21 * copyright notice, this list of conditions and the following
22 * disclaimer in the documentation and/or other materials
23 * provided with the distribution.
25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
29 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
30 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
34 * $Id: ib_cache.h 1349 2004-12-16 21:09:43Z roland $
40 #include <rdma/ib_verbs.h>
43 * ib_get_cached_gid - Returns a cached GID table entry
44 * @device: The device to query.
45 * @port_num: The port number of the device to query.
46 * @index: The index into the cached GID table to query.
47 * @gid: The GID value found at the specified index.
49 * ib_get_cached_gid() fetches the specified GID table entry stored in
50 * the local software cache.
52 int ib_get_cached_gid(struct ib_device
*device
,
58 * ib_find_cached_gid - Returns the port number and GID table index where
59 * a specified GID value occurs.
60 * @device: The device to query.
61 * @gid: The GID value to search for.
62 * @port_num: The port number of the device where the GID value was found.
63 * @index: The index into the cached GID table where the GID was found. This
64 * parameter may be NULL.
66 * ib_find_cached_gid() searches for the specified GID value in
67 * the local software cache.
69 int ib_find_cached_gid(struct ib_device
*device
,
75 * ib_get_cached_pkey - Returns a cached PKey table entry
76 * @device: The device to query.
77 * @port_num: The port number of the device to query.
78 * @index: The index into the cached PKey table to query.
79 * @pkey: The PKey value found at the specified index.
81 * ib_get_cached_pkey() fetches the specified PKey table entry stored in
82 * the local software cache.
84 int ib_get_cached_pkey(struct ib_device
*device_handle
,
90 * ib_find_cached_pkey - Returns the PKey table index where a specified
92 * @device: The device to query.
93 * @port_num: The port number of the device to search for the PKey.
94 * @pkey: The PKey value to search for.
95 * @index: The index into the cached PKey table where the PKey was found.
97 * ib_find_cached_pkey() searches the specified PKey table in
98 * the local software cache.
100 int ib_find_cached_pkey(struct ib_device
*device
,
105 #endif /* _IB_CACHE_H */