diff options
author | Ira Weiny <ira.weiny@intel.com> | 2015-06-06 14:38:33 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-06-12 14:49:17 -0400 |
commit | 548ead17442f13bdaa679e222ee2fd186e32301d (patch) | |
tree | 87d897e6c158bc60d49e84912a25d676100430b5 /include/rdma | |
parent | 65995fee842fd9f1427b62be24053846d9c32102 (diff) |
IB/mad: Add partial Intel OPA MAD support
This patch is the first of 3 which adds processing of OPA MADs
1) Add Intel Omni-Path Architecture defines
2) Increase max management version to accommodate OPA
3) update ib_create_send_mad
If the device supports OPA MADs and the MAD being sent is the OPA base
version alter the MAD size and sg lengths as appropriate
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/ib_mad.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h index 349880696abc..eaa8c5dc472b 100644 --- a/include/rdma/ib_mad.h +++ b/include/rdma/ib_mad.h | |||
@@ -42,8 +42,11 @@ | |||
42 | #include <rdma/ib_verbs.h> | 42 | #include <rdma/ib_verbs.h> |
43 | #include <uapi/rdma/ib_user_mad.h> | 43 | #include <uapi/rdma/ib_user_mad.h> |
44 | 44 | ||
45 | /* Management base version */ | 45 | /* Management base versions */ |
46 | #define IB_MGMT_BASE_VERSION 1 | 46 | #define IB_MGMT_BASE_VERSION 1 |
47 | #define OPA_MGMT_BASE_VERSION 0x80 | ||
48 | |||
49 | #define OPA_SMP_CLASS_VERSION 0x80 | ||
47 | 50 | ||
48 | /* Management classes */ | 51 | /* Management classes */ |
49 | #define IB_MGMT_CLASS_SUBN_LID_ROUTED 0x01 | 52 | #define IB_MGMT_CLASS_SUBN_LID_ROUTED 0x01 |
@@ -136,6 +139,9 @@ enum { | |||
136 | IB_MGMT_DEVICE_HDR = 64, | 139 | IB_MGMT_DEVICE_HDR = 64, |
137 | IB_MGMT_DEVICE_DATA = 192, | 140 | IB_MGMT_DEVICE_DATA = 192, |
138 | IB_MGMT_MAD_SIZE = IB_MGMT_MAD_HDR + IB_MGMT_MAD_DATA, | 141 | IB_MGMT_MAD_SIZE = IB_MGMT_MAD_HDR + IB_MGMT_MAD_DATA, |
142 | OPA_MGMT_MAD_DATA = 2024, | ||
143 | OPA_MGMT_RMPP_DATA = 2012, | ||
144 | OPA_MGMT_MAD_SIZE = IB_MGMT_MAD_HDR + OPA_MGMT_MAD_DATA, | ||
139 | }; | 145 | }; |
140 | 146 | ||
141 | struct ib_mad_hdr { | 147 | struct ib_mad_hdr { |
@@ -182,6 +188,11 @@ struct ib_mad { | |||
182 | u8 data[IB_MGMT_MAD_DATA]; | 188 | u8 data[IB_MGMT_MAD_DATA]; |
183 | }; | 189 | }; |
184 | 190 | ||
191 | struct opa_mad { | ||
192 | struct ib_mad_hdr mad_hdr; | ||
193 | u8 data[OPA_MGMT_MAD_DATA]; | ||
194 | }; | ||
195 | |||
185 | struct ib_rmpp_mad { | 196 | struct ib_rmpp_mad { |
186 | struct ib_mad_hdr mad_hdr; | 197 | struct ib_mad_hdr mad_hdr; |
187 | struct ib_rmpp_hdr rmpp_hdr; | 198 | struct ib_rmpp_hdr rmpp_hdr; |
@@ -236,7 +247,10 @@ struct ib_class_port_info { | |||
236 | * includes the common MAD, RMPP, and class specific headers. | 247 | * includes the common MAD, RMPP, and class specific headers. |
237 | * @data_len: Indicates the total size of user-transferred data. | 248 | * @data_len: Indicates the total size of user-transferred data. |
238 | * @seg_count: The number of RMPP segments allocated for this send. | 249 | * @seg_count: The number of RMPP segments allocated for this send. |
239 | * @seg_size: Size of each RMPP segment. | 250 | * @seg_size: Size of the data in each RMPP segment. This does not include |
251 | * class specific headers. | ||
252 | * @seg_rmpp_size: Size of each RMPP segment including the class specific | ||
253 | * headers. | ||
240 | * @timeout_ms: Time to wait for a response. | 254 | * @timeout_ms: Time to wait for a response. |
241 | * @retries: Number of times to retry a request for a response. For MADs | 255 | * @retries: Number of times to retry a request for a response. For MADs |
242 | * using RMPP, this applies per window. On completion, returns the number | 256 | * using RMPP, this applies per window. On completion, returns the number |
@@ -256,6 +270,7 @@ struct ib_mad_send_buf { | |||
256 | int data_len; | 270 | int data_len; |
257 | int seg_count; | 271 | int seg_count; |
258 | int seg_size; | 272 | int seg_size; |
273 | int seg_rmpp_size; | ||
259 | int timeout_ms; | 274 | int timeout_ms; |
260 | int retries; | 275 | int retries; |
261 | }; | 276 | }; |
@@ -402,7 +417,10 @@ struct ib_mad_send_wc { | |||
402 | struct ib_mad_recv_buf { | 417 | struct ib_mad_recv_buf { |
403 | struct list_head list; | 418 | struct list_head list; |
404 | struct ib_grh *grh; | 419 | struct ib_grh *grh; |
405 | struct ib_mad *mad; | 420 | union { |
421 | struct ib_mad *mad; | ||
422 | struct opa_mad *opa_mad; | ||
423 | }; | ||
406 | }; | 424 | }; |
407 | 425 | ||
408 | /** | 426 | /** |