diff options
author | Eli Cohen <eli@mellanox.co.il> | 2010-09-27 20:51:10 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-09-27 20:51:10 -0400 |
commit | a3f5adaf491490089215f863a61b9422fae902f8 (patch) | |
tree | ab4bd1d3875a220cf752bd1a9fd233a1c14bd86e /include/rdma/ib_verbs.h | |
parent | 252a52aa4fa22a668f019e55b3aac3ff71ec1c29 (diff) |
IB/core: Add link layer property to ports
This patch allows ports to have different link layers:
IB_LINK_LAYER_INFINIBAND or IB_LINK_LAYER_ETHERNET. This is required
for adding IBoE (InfiniBand-over-Ethernet, aka RoCE) support. For
devices that do not provide an implementation for querying the link
layer property of a port, we return a default value based on the
transport: RMA_TRANSPORT_IB nodes will return IB_LINK_LAYER_INFINIBAND
and RDMA_TRANSPORT_IWARP nodes will return IB_LINK_LAYER_ETHERNET.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r-- | include/rdma/ib_verbs.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 857b3b9cf120..e04c4888d1fd 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -75,6 +75,12 @@ enum rdma_transport_type { | |||
75 | enum rdma_transport_type | 75 | enum rdma_transport_type |
76 | rdma_node_get_transport(enum rdma_node_type node_type) __attribute_const__; | 76 | rdma_node_get_transport(enum rdma_node_type node_type) __attribute_const__; |
77 | 77 | ||
78 | enum rdma_link_layer { | ||
79 | IB_LINK_LAYER_UNSPECIFIED, | ||
80 | IB_LINK_LAYER_INFINIBAND, | ||
81 | IB_LINK_LAYER_ETHERNET, | ||
82 | }; | ||
83 | |||
78 | enum ib_device_cap_flags { | 84 | enum ib_device_cap_flags { |
79 | IB_DEVICE_RESIZE_MAX_WR = 1, | 85 | IB_DEVICE_RESIZE_MAX_WR = 1, |
80 | IB_DEVICE_BAD_PKEY_CNTR = (1<<1), | 86 | IB_DEVICE_BAD_PKEY_CNTR = (1<<1), |
@@ -1010,6 +1016,8 @@ struct ib_device { | |||
1010 | int (*query_port)(struct ib_device *device, | 1016 | int (*query_port)(struct ib_device *device, |
1011 | u8 port_num, | 1017 | u8 port_num, |
1012 | struct ib_port_attr *port_attr); | 1018 | struct ib_port_attr *port_attr); |
1019 | enum rdma_link_layer (*get_link_layer)(struct ib_device *device, | ||
1020 | u8 port_num); | ||
1013 | int (*query_gid)(struct ib_device *device, | 1021 | int (*query_gid)(struct ib_device *device, |
1014 | u8 port_num, int index, | 1022 | u8 port_num, int index, |
1015 | union ib_gid *gid); | 1023 | union ib_gid *gid); |
@@ -1222,6 +1230,9 @@ int ib_query_device(struct ib_device *device, | |||
1222 | int ib_query_port(struct ib_device *device, | 1230 | int ib_query_port(struct ib_device *device, |
1223 | u8 port_num, struct ib_port_attr *port_attr); | 1231 | u8 port_num, struct ib_port_attr *port_attr); |
1224 | 1232 | ||
1233 | enum rdma_link_layer rdma_port_get_link_layer(struct ib_device *device, | ||
1234 | u8 port_num); | ||
1235 | |||
1225 | int ib_query_gid(struct ib_device *device, | 1236 | int ib_query_gid(struct ib_device *device, |
1226 | u8 port_num, int index, union ib_gid *gid); | 1237 | u8 port_num, int index, union ib_gid *gid); |
1227 | 1238 | ||