diff options
author | Avihai Horon <avihaih@nvidia.com> | 2020-09-23 18:50:14 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-10-02 02:20:11 +0200 |
commit | c4b4d548fabc15b9c5db9f61204dd0c608414d2d (patch) | |
tree | 3ed74d1c5e8f0a37da88fbad9d0febdbfb157ac3 /include/uapi/rdma | |
parent | RDMA/core: Modify enum ib_gid_type and enum rdma_network_type (diff) | |
download | linux-c4b4d548fabc15b9c5db9f61204dd0c608414d2d.tar.xz linux-c4b4d548fabc15b9c5db9f61204dd0c608414d2d.zip |
RDMA/core: Introduce new GID table query API
Introduce rdma_query_gid_table which enables querying all the GID tables
of a given device and copying the attributes of all valid GID entries to a
provided buffer.
This API provides a faster way to query a GID table using single call and
will be used in libibverbs to improve current approach that requires
multiple calls to open, close and read multiple sysfs files for a single
GID table entry.
Link: https://lore.kernel.org/r/20200923165015.2491894-4-leon@kernel.org
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/uapi/rdma')
-rw-r--r-- | include/uapi/rdma/ib_user_ioctl_verbs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/uapi/rdma/ib_user_ioctl_verbs.h b/include/uapi/rdma/ib_user_ioctl_verbs.h index fb8cdb38198b..14820082de5e 100644 --- a/include/uapi/rdma/ib_user_ioctl_verbs.h +++ b/include/uapi/rdma/ib_user_ioctl_verbs.h @@ -251,4 +251,12 @@ enum rdma_driver_id { RDMA_DRIVER_SIW, }; +struct ib_uverbs_gid_entry { + __aligned_u64 gid[2]; + __u32 gid_index; + __u32 port_num; + __u32 gid_type; + __u32 netdev_ifindex; /* It is 0 if there is no netdev associated with it */ +}; + #endif |