summaryrefslogtreecommitdiff
path: root/include/rdma/ib_verbs.h
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2015-12-23 14:56:47 +0200
committerDoug Ledford <dledford@redhat.com>2015-12-23 10:35:10 -0500
commitb39ffa1df505378336a85064ad9ec403765bbb0b (patch)
treead9fe1990542eb07f8358386fcae6097c2b3a478 /include/rdma/ib_verbs.h
parentcee3c4d0c56876f46f4584385603adb30a7cacf7 (diff)
downloadlwn-b39ffa1df505378336a85064ad9ec403765bbb0b.tar.gz
lwn-b39ffa1df505378336a85064ad9ec403765bbb0b.zip
IB/core: Add gid_type to gid attribute
In order to support multiple GID types, we need to store the gid_type with each GID. This is also aligned with the RoCE v2 annex "RoCEv2 PORT GID table entries shall have a "GID type" attribute that denotes the L3 Address type". The currently supported GID is IB_GID_TYPE_IB which is also RoCE v1 GID type. This implies that gid_type should be added to roce_gid_table meta-data. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r--include/rdma/ib_verbs.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index b14feaba39f1..00d2006ad816 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -69,7 +69,15 @@ union ib_gid {
extern union ib_gid zgid;
+enum ib_gid_type {
+ /* If link layer is Ethernet, this is RoCE V1 */
+ IB_GID_TYPE_IB = 0,
+ IB_GID_TYPE_ROCE = 0,
+ IB_GID_TYPE_SIZE
+};
+
struct ib_gid_attr {
+ enum ib_gid_type gid_type;
struct net_device *ndev;
};
@@ -2245,7 +2253,8 @@ int ib_modify_port(struct ib_device *device,
struct ib_port_modify *port_modify);
int ib_find_gid(struct ib_device *device, union ib_gid *gid,
- struct net_device *ndev, u8 *port_num, u16 *index);
+ enum ib_gid_type gid_type, struct net_device *ndev,
+ u8 *port_num, u16 *index);
int ib_find_pkey(struct ib_device *device,
u8 port_num, u16 pkey, u16 *index);