diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2012-02-28 11:49:50 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-03-05 12:25:16 -0500 |
commit | 2e96691c31ecf749f48aa94ea837b95dd656f5c2 (patch) | |
tree | 5e2bfaf522d66bc23c1ec0490fb3364c09aad4f2 /include/rdma/ib_verbs.h | |
parent | e9319b0cb00d4d68792fdae37e81e316cb632cb9 (diff) |
IB: Use central enum for speed instead of hard-coded values
The kernel IB stack uses one enumeration for IB speed, which wasn't
explicitly specified in the verbs header file. Add that enum, and use
it all over the code.
The IB speed/width notation is also used by iWARP and IBoE HW drivers,
which use the convention of rate = speed * width to advertise their
port link rate.
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r-- | include/rdma/ib_verbs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index bf5daafe8ecc..ff22a73e0937 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -239,6 +239,15 @@ static inline int ib_width_enum_to_int(enum ib_port_width width) | |||
239 | } | 239 | } |
240 | } | 240 | } |
241 | 241 | ||
242 | enum ib_port_speed { | ||
243 | IB_SPEED_SDR = 1, | ||
244 | IB_SPEED_DDR = 2, | ||
245 | IB_SPEED_QDR = 4, | ||
246 | IB_SPEED_FDR10 = 8, | ||
247 | IB_SPEED_FDR = 16, | ||
248 | IB_SPEED_EDR = 32 | ||
249 | }; | ||
250 | |||
242 | struct ib_protocol_stats { | 251 | struct ib_protocol_stats { |
243 | /* TBD... */ | 252 | /* TBD... */ |
244 | }; | 253 | }; |