Commit c3d71b69 authored by Jason Gunthorpe's avatar Jason Gunthorpe

IB/core: Provide rdma_ versions of the gid cache API

These versions are functionally similar but all return gid_attrs and
related information via reference instead of via copy.

The old API is preserved, implemented as wrappers around the new, until
all callers can be converted.
Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent ddb457c6
This diff is collapsed.
......@@ -54,6 +54,8 @@ int ib_get_cached_gid(struct ib_device *device,
int index,
union ib_gid *gid,
struct ib_gid_attr *attr);
int rdma_query_gid(struct ib_device *device, u8 port_num, int index,
union ib_gid *gid);
int ib_find_cached_gid(struct ib_device *device,
const union ib_gid *gid,
......@@ -61,6 +63,10 @@ int ib_find_cached_gid(struct ib_device *device,
struct net_device *ndev,
u8 *port_num,
u16 *index);
const struct ib_gid_attr *rdma_find_gid(struct ib_device *device,
const union ib_gid *gid,
enum ib_gid_type gid_type,
struct net_device *ndev);
int ib_find_cached_gid_by_port(struct ib_device *device,
const union ib_gid *gid,
......@@ -68,6 +74,11 @@ int ib_find_cached_gid_by_port(struct ib_device *device,
u8 port_num,
struct net_device *ndev,
u16 *index);
const struct ib_gid_attr *rdma_find_gid_by_port(struct ib_device *ib_dev,
const union ib_gid *gid,
enum ib_gid_type gid_type,
u8 port,
struct net_device *ndev);
int ib_find_gid_by_filter(struct ib_device *device,
const union ib_gid *gid,
......@@ -76,6 +87,12 @@ int ib_find_gid_by_filter(struct ib_device *device,
const struct ib_gid_attr *,
void *),
void *context, u16 *index);
const struct ib_gid_attr *rdma_find_gid_by_filter(
struct ib_device *device, const union ib_gid *gid, u8 port_num,
bool (*filter)(const union ib_gid *gid, const struct ib_gid_attr *,
void *),
void *context);
/**
* ib_get_cached_pkey - Returns a cached PKey table entry
* @device: The device to query.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment