IB/core: Add netdev and gid attributes paramteres to cache
[linux-2.6-block.git] / include / rdma / ib_cache.h
index bd92130f4ac5803a60e0c058bc19d26faca9f948..dcc9bed9b69aa800897fa2b6ce742c69f24ccc66 100644 (file)
@@ -43,6 +43,8 @@
  * @port_num: The port number of the device to query.
  * @index: The index into the cached GID table to query.
  * @gid: The GID value found at the specified index.
+ * @attr: The GID attribute found at the specified index (only in RoCE).
+ *   NULL means ignore (output parameter).
  *
  * ib_get_cached_gid() fetches the specified GID table entry stored in
  * the local software cache.
 int ib_get_cached_gid(struct ib_device    *device,
                      u8                   port_num,
                      int                  index,
-                     union ib_gid        *gid);
+                     union ib_gid        *gid,
+                     struct ib_gid_attr  *attr);
 
 /**
  * ib_find_cached_gid - Returns the port number and GID table index where
  *   a specified GID value occurs.
  * @device: The device to query.
  * @gid: The GID value to search for.
+ * @ndev: In RoCE, the net device of the device. NULL means ignore.
  * @port_num: The port number of the device where the GID value was found.
  * @index: The index into the cached GID table where the GID was found.  This
  *   parameter may be NULL.
@@ -64,10 +68,11 @@ int ib_get_cached_gid(struct ib_device    *device,
  * ib_find_cached_gid() searches for the specified GID value in
  * the local software cache.
  */
-int ib_find_cached_gid(struct ib_device   *device,
+int ib_find_cached_gid(struct ib_device *device,
                       const union ib_gid *gid,
-                      u8                 *port_num,
-                      u16                *index);
+                      struct net_device *ndev,
+                      u8               *port_num,
+                      u16              *index);
 
 /**
  * ib_get_cached_pkey - Returns a cached PKey table entry