diff options
Diffstat (limited to 'include/rdma/ib_cache.h')
-rw-r--r-- | include/rdma/ib_cache.h | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/include/rdma/ib_cache.h b/include/rdma/ib_cache.h index bd92130f4ac5..269a27cf0a46 100644 --- a/include/rdma/ib_cache.h +++ b/include/rdma/ib_cache.h | |||
@@ -43,6 +43,8 @@ | |||
43 | * @port_num: The port number of the device to query. | 43 | * @port_num: The port number of the device to query. |
44 | * @index: The index into the cached GID table to query. | 44 | * @index: The index into the cached GID table to query. |
45 | * @gid: The GID value found at the specified index. | 45 | * @gid: The GID value found at the specified index. |
46 | * @attr: The GID attribute found at the specified index (only in RoCE). | ||
47 | * NULL means ignore (output parameter). | ||
46 | * | 48 | * |
47 | * ib_get_cached_gid() fetches the specified GID table entry stored in | 49 | * ib_get_cached_gid() fetches the specified GID table entry stored in |
48 | * the local software cache. | 50 | * the local software cache. |
@@ -50,13 +52,15 @@ | |||
50 | int ib_get_cached_gid(struct ib_device *device, | 52 | int ib_get_cached_gid(struct ib_device *device, |
51 | u8 port_num, | 53 | u8 port_num, |
52 | int index, | 54 | int index, |
53 | union ib_gid *gid); | 55 | union ib_gid *gid, |
56 | struct ib_gid_attr *attr); | ||
54 | 57 | ||
55 | /** | 58 | /** |
56 | * ib_find_cached_gid - Returns the port number and GID table index where | 59 | * ib_find_cached_gid - Returns the port number and GID table index where |
57 | * a specified GID value occurs. | 60 | * a specified GID value occurs. |
58 | * @device: The device to query. | 61 | * @device: The device to query. |
59 | * @gid: The GID value to search for. | 62 | * @gid: The GID value to search for. |
63 | * @ndev: In RoCE, the net device of the device. NULL means ignore. | ||
60 | * @port_num: The port number of the device where the GID value was found. | 64 | * @port_num: The port number of the device where the GID value was found. |
61 | * @index: The index into the cached GID table where the GID was found. This | 65 | * @index: The index into the cached GID table where the GID was found. This |
62 | * parameter may be NULL. | 66 | * parameter may be NULL. |
@@ -64,12 +68,40 @@ int ib_get_cached_gid(struct ib_device *device, | |||
64 | * ib_find_cached_gid() searches for the specified GID value in | 68 | * ib_find_cached_gid() searches for the specified GID value in |
65 | * the local software cache. | 69 | * the local software cache. |
66 | */ | 70 | */ |
67 | int ib_find_cached_gid(struct ib_device *device, | 71 | int ib_find_cached_gid(struct ib_device *device, |
68 | const union ib_gid *gid, | 72 | const union ib_gid *gid, |
69 | u8 *port_num, | 73 | struct net_device *ndev, |
70 | u16 *index); | 74 | u8 *port_num, |
75 | u16 *index); | ||
71 | 76 | ||
72 | /** | 77 | /** |
78 | * ib_find_cached_gid_by_port - Returns the GID table index where a specified | ||
79 | * GID value occurs | ||
80 | * @device: The device to query. | ||
81 | * @gid: The GID value to search for. | ||
82 | * @port_num: The port number of the device where the GID value sould be | ||
83 | * searched. | ||
84 | * @ndev: In RoCE, the net device of the device. Null means ignore. | ||
85 | * @index: The index into the cached GID table where the GID was found. This | ||
86 | * parameter may be NULL. | ||
87 | * | ||
88 | * ib_find_cached_gid() searches for the specified GID value in | ||
89 | * the local software cache. | ||
90 | */ | ||
91 | int ib_find_cached_gid_by_port(struct ib_device *device, | ||
92 | const union ib_gid *gid, | ||
93 | u8 port_num, | ||
94 | struct net_device *ndev, | ||
95 | u16 *index); | ||
96 | |||
97 | int ib_find_gid_by_filter(struct ib_device *device, | ||
98 | const union ib_gid *gid, | ||
99 | u8 port_num, | ||
100 | bool (*filter)(const union ib_gid *gid, | ||
101 | const struct ib_gid_attr *, | ||
102 | void *), | ||
103 | void *context, u16 *index); | ||
104 | /** | ||
73 | * ib_get_cached_pkey - Returns a cached PKey table entry | 105 | * ib_get_cached_pkey - Returns a cached PKey table entry |
74 | * @device: The device to query. | 106 | * @device: The device to query. |
75 | * @port_num: The port number of the device to query. | 107 | * @port_num: The port number of the device to query. |