diff options
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/ib_mad.h | 18 | ||||
-rw-r--r-- | include/rdma/ib_verbs.h | 10 |
2 files changed, 26 insertions, 2 deletions
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h index 3d81b90cc315..9bb99e983f58 100644 --- a/include/rdma/ib_mad.h +++ b/include/rdma/ib_mad.h | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/list.h> | 40 | #include <linux/list.h> |
41 | 41 | ||
42 | #include <rdma/ib_verbs.h> | 42 | #include <rdma/ib_verbs.h> |
43 | #include <uapi/rdma/ib_user_mad.h> | ||
43 | 44 | ||
44 | /* Management base version */ | 45 | /* Management base version */ |
45 | #define IB_MGMT_BASE_VERSION 1 | 46 | #define IB_MGMT_BASE_VERSION 1 |
@@ -355,9 +356,13 @@ typedef void (*ib_mad_recv_handler)(struct ib_mad_agent *mad_agent, | |||
355 | * @hi_tid: Access layer assigned transaction ID for this client. | 356 | * @hi_tid: Access layer assigned transaction ID for this client. |
356 | * Unsolicited MADs sent by this client will have the upper 32-bits | 357 | * Unsolicited MADs sent by this client will have the upper 32-bits |
357 | * of their TID set to this value. | 358 | * of their TID set to this value. |
359 | * @flags: registration flags | ||
358 | * @port_num: Port number on which QP is registered | 360 | * @port_num: Port number on which QP is registered |
359 | * @rmpp_version: If set, indicates the RMPP version used by this agent. | 361 | * @rmpp_version: If set, indicates the RMPP version used by this agent. |
360 | */ | 362 | */ |
363 | enum { | ||
364 | IB_MAD_USER_RMPP = IB_USER_MAD_USER_RMPP, | ||
365 | }; | ||
361 | struct ib_mad_agent { | 366 | struct ib_mad_agent { |
362 | struct ib_device *device; | 367 | struct ib_device *device; |
363 | struct ib_qp *qp; | 368 | struct ib_qp *qp; |
@@ -367,6 +372,7 @@ struct ib_mad_agent { | |||
367 | ib_mad_snoop_handler snoop_handler; | 372 | ib_mad_snoop_handler snoop_handler; |
368 | void *context; | 373 | void *context; |
369 | u32 hi_tid; | 374 | u32 hi_tid; |
375 | u32 flags; | ||
370 | u8 port_num; | 376 | u8 port_num; |
371 | u8 rmpp_version; | 377 | u8 rmpp_version; |
372 | }; | 378 | }; |
@@ -426,6 +432,7 @@ struct ib_mad_recv_wc { | |||
426 | * in the range from 0x30 to 0x4f. Otherwise not used. | 432 | * in the range from 0x30 to 0x4f. Otherwise not used. |
427 | * @method_mask: The caller will receive unsolicited MADs for any method | 433 | * @method_mask: The caller will receive unsolicited MADs for any method |
428 | * where @method_mask = 1. | 434 | * where @method_mask = 1. |
435 | * | ||
429 | */ | 436 | */ |
430 | struct ib_mad_reg_req { | 437 | struct ib_mad_reg_req { |
431 | u8 mgmt_class; | 438 | u8 mgmt_class; |
@@ -451,6 +458,7 @@ struct ib_mad_reg_req { | |||
451 | * @recv_handler: The completion callback routine invoked for a received | 458 | * @recv_handler: The completion callback routine invoked for a received |
452 | * MAD. | 459 | * MAD. |
453 | * @context: User specified context associated with the registration. | 460 | * @context: User specified context associated with the registration. |
461 | * @registration_flags: Registration flags to set for this agent | ||
454 | */ | 462 | */ |
455 | struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, | 463 | struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, |
456 | u8 port_num, | 464 | u8 port_num, |
@@ -459,7 +467,8 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, | |||
459 | u8 rmpp_version, | 467 | u8 rmpp_version, |
460 | ib_mad_send_handler send_handler, | 468 | ib_mad_send_handler send_handler, |
461 | ib_mad_recv_handler recv_handler, | 469 | ib_mad_recv_handler recv_handler, |
462 | void *context); | 470 | void *context, |
471 | u32 registration_flags); | ||
463 | 472 | ||
464 | enum ib_mad_snoop_flags { | 473 | enum ib_mad_snoop_flags { |
465 | /*IB_MAD_SNOOP_POSTED_SENDS = 1,*/ | 474 | /*IB_MAD_SNOOP_POSTED_SENDS = 1,*/ |
@@ -661,4 +670,11 @@ void *ib_get_rmpp_segment(struct ib_mad_send_buf *send_buf, int seg_num); | |||
661 | */ | 670 | */ |
662 | void ib_free_send_mad(struct ib_mad_send_buf *send_buf); | 671 | void ib_free_send_mad(struct ib_mad_send_buf *send_buf); |
663 | 672 | ||
673 | /** | ||
674 | * ib_mad_kernel_rmpp_agent - Returns if the agent is performing RMPP. | ||
675 | * @agent: the agent in question | ||
676 | * @return: true if agent is performing rmpp, false otherwise. | ||
677 | */ | ||
678 | int ib_mad_kernel_rmpp_agent(struct ib_mad_agent *agent); | ||
679 | |||
664 | #endif /* IB_MAD_H */ | 680 | #endif /* IB_MAD_H */ |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 7ccef342f724..ed44cc07a7b3 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -1097,7 +1097,8 @@ struct ib_mr_attr { | |||
1097 | enum ib_mr_rereg_flags { | 1097 | enum ib_mr_rereg_flags { |
1098 | IB_MR_REREG_TRANS = 1, | 1098 | IB_MR_REREG_TRANS = 1, |
1099 | IB_MR_REREG_PD = (1<<1), | 1099 | IB_MR_REREG_PD = (1<<1), |
1100 | IB_MR_REREG_ACCESS = (1<<2) | 1100 | IB_MR_REREG_ACCESS = (1<<2), |
1101 | IB_MR_REREG_SUPPORTED = ((IB_MR_REREG_ACCESS << 1) - 1) | ||
1101 | }; | 1102 | }; |
1102 | 1103 | ||
1103 | /** | 1104 | /** |
@@ -1547,6 +1548,13 @@ struct ib_device { | |||
1547 | u64 virt_addr, | 1548 | u64 virt_addr, |
1548 | int mr_access_flags, | 1549 | int mr_access_flags, |
1549 | struct ib_udata *udata); | 1550 | struct ib_udata *udata); |
1551 | int (*rereg_user_mr)(struct ib_mr *mr, | ||
1552 | int flags, | ||
1553 | u64 start, u64 length, | ||
1554 | u64 virt_addr, | ||
1555 | int mr_access_flags, | ||
1556 | struct ib_pd *pd, | ||
1557 | struct ib_udata *udata); | ||
1550 | int (*query_mr)(struct ib_mr *mr, | 1558 | int (*query_mr)(struct ib_mr *mr, |
1551 | struct ib_mr_attr *mr_attr); | 1559 | struct ib_mr_attr *mr_attr); |
1552 | int (*dereg_mr)(struct ib_mr *mr); | 1560 | int (*dereg_mr)(struct ib_mr *mr); |