[OPENSM] adjust OPENSM to changed types of the stack.
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 3 Aug 2008 08:44:29 +0000 (08:44 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 3 Aug 2008 08:44:29 +0000 (08:44 +0000)
To recall, OPENSM uses it's own pair of files ib_types.h/ib_types_extended.h instead of the stack's ib_types.h.
So all the changes of 'trunk\inc\iba\ib_types.h' should be repeated in the OPENSM's files.

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1458 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/opensm/user/include/iba/ib_types.h
ulp/opensm/user/include/iba/ib_types_extended.h

index a2570ae..756c10e 100644 (file)
@@ -6332,7 +6332,7 @@ typedef struct _ib_vl_arb_table_record
 typedef struct _ib_grh\r
 {\r
        ib_net32_t              ver_class_flow;\r
-       ib_net16_t              resv1;\r
+       uint16_t                resv1;\r
        uint8_t                 resv2;\r
        uint8_t                 hop_limit;\r
        ib_gid_t                src_gid;\r
index 464ba95..2e600ff 100644 (file)
@@ -231,6 +231,7 @@ typedef enum _ib_async_event_t
        IB_AE_PORT_DOWN,\r
        IB_AE_CLIENT_REREGISTER,\r
        IB_AE_SRQ_LIMIT_REACHED,\r
+       IB_AE_SRQ_CATAS_ERROR,\r
        IB_AE_SRQ_QP_LAST_WQE_REACHED,\r
        IB_AE_UNKNOWN           /* ALWAYS LAST ENUM VALUE */\r
 \r
@@ -324,6 +325,9 @@ typedef enum _ib_async_event_t
 *      IB_AE_CLIENT_REREGISTER\r
 *              The SM idicate to client to reregister its SA records.\r
 *\r
+*      IB_AE_SRQ_LIMIT_REACHED\r
+*              Reached SRQ low watermark\r
+*\r
 *      IB_AE_SRQ_CATAS_ERROR\r
 *              An error occurred while processing or accessing the SRQ that prevents\r
 *              dequeuing a WQE from the SRQ and reporting of receive completions.\r
@@ -386,48 +390,12 @@ ib_get_async_event_str(
 */\r
 typedef struct _ib_event_rec\r
 {\r
-       TO_LONG_PTR(void* ,                     context) ;\r
+       TO_LONG_PTR(void*,              context);\r
        ib_async_event_t                type;\r
 \r
        /* HCA vendor specific event information. */\r
        uint64_t                                vendor_specific;\r
-\r
-       /* The following structures are valid only for trap types. */\r
-       union _trap\r
-       {\r
-               struct\r
-               {\r
-                       uint16_t                        lid;\r
-                       ib_net64_t                      port_guid;\r
-                       uint8_t                         port_num;\r
-\r
-                       /*\r
-                        * The following structure is valid only for\r
-                        * P_KEY, Q_KEY, and M_KEY violation traps.\r
-                        */\r
-                       struct\r
-                       {\r
-                               uint8_t                 sl;\r
-                               uint16_t                src_lid;\r
-                               uint16_t                dest_lid;\r
-                               union _key\r
-                               {\r
-                                       uint16_t        pkey;\r
-                                       uint32_t        qkey;\r
-                                       uint64_t        mkey;\r
-                               } key;\r
-                               uint32_t                src_qp;\r
-                               uint32_t                dest_qp;\r
-                               ib_gid_t                src_gid;\r
-                               ib_gid_t                dest_gid;\r
-\r
-                       }       violation;\r
-\r
-               } info;\r
-\r
-               ib_net64_t      sysimg_guid;\r
-\r
-       }       trap;\r
+       uint8_t                                 port_number;\r
 \r
 }      ib_event_rec_t;\r
 /*******/\r
@@ -593,6 +561,8 @@ typedef struct _ib_port_attr
         * timeout = 4.096 microseconds * 2^subnet_timeout\r
         */\r
        uint8_t                                 subnet_timeout;\r
+       uint8_t                                 active_speed;\r
+       uint8_t                                 phys_state;\r
 \r
        ib_port_cap_t                   cap;\r
        uint16_t                                pkey_ctr;\r
@@ -604,8 +574,8 @@ typedef struct _ib_port_attr
         * Pointers at the end of the structure to allow doing a simple\r
         * memory comparison of contents up to the first pointer.\r
         */\r
-       TO_LONG_PTR(ib_gid_t* ,         p_gid_table) ;\r
-       TO_LONG_PTR(ib_net16_t* ,               p_pkey_table) ;\r
+       TO_LONG_PTR(ib_gid_t*,  p_gid_table);\r
+       TO_LONG_PTR(ib_net16_t*,p_pkey_table);\r
 \r
 }      ib_port_attr_t;\r
 /*\r
@@ -698,13 +668,14 @@ typedef struct _ib_ca_attr
        boolean_t                               system_image_guid_support;\r
        boolean_t                               hw_agents;\r
        boolean_t                               ipoib_csum;\r
+       \r
        ib_net64_t                              system_image_guid;\r
 \r
        uint32_t                                num_page_sizes;\r
        uint8_t                                 num_ports;\r
 \r
-       TO_LONG_PTR(uint32_t* ,         p_page_size) ;\r
-       TO_LONG_PTR(ib_port_attr_t* ,   p_port_attr) ;\r
+       TO_LONG_PTR(uint32_t*,  p_page_size);\r
+       TO_LONG_PTR(ib_port_attr_t*, p_port_attr);\r
 \r
 }      ib_ca_attr_t;\r
 /*\r
@@ -721,7 +692,7 @@ typedef struct _ib_ca_attr
 *      revision\r
 *              Revision ID of this adapter\r
 *\r
-*      Fw_ver\r
+*      fw_ver\r
 *              Device Firmware version.\r
 *\r
 *      size\r
@@ -935,7 +906,8 @@ typedef enum _ib_pd_type
 {\r
        IB_PDT_NORMAL,\r
        IB_PDT_ALIAS,\r
-       IB_PDT_SQP\r
+       IB_PDT_SQP,\r
+       IB_PDT_UD\r
 \r
 }      ib_pd_type_t;\r
 /*\r
@@ -948,6 +920,9 @@ typedef enum _ib_pd_type
 *\r
 *      IB_PDT_SQP\r
 *              Protection domain for special queue pair usage.\r
+*\r
+*      IB_PDT_UD\r
+*              Protection domain for UD queue pair usage.\r
 *****/\r
 \r
 \r
@@ -1001,15 +976,16 @@ typedef enum _ib_qp_type
 {\r
        IB_QPT_RELIABLE_CONN    = 0,            /* Matches CM REQ transport type */\r
        IB_QPT_UNRELIABLE_CONN  = 1,            /* Matches CM REQ transport type */\r
-       IB_QPT_UNRELIABLE_DGRM  = 3,            /* Purposefully skip RDD type. */\r
+       IB_QPT_RELIABLE_DGRM    = 2,    /* Matches CM REQ transport type */\r
+       IB_QPT_UNRELIABLE_DGRM,\r
        IB_QPT_QP0,\r
        IB_QPT_QP1,\r
        IB_QPT_RAW_IPV6,\r
        IB_QPT_RAW_ETHER,\r
        IB_QPT_MAD,                                                             /* InfiniBand Access Layer */\r
        IB_QPT_QP0_ALIAS,                                               /* InfiniBand Access Layer */\r
-       IB_QPT_QP1_ALIAS                                                /* InfiniBand Access Layer */\r
-\r
+       IB_QPT_QP1_ALIAS,                                               /* InfiniBand Access Layer */\r
+       IB_QPT_UNKNOWN\r
 }      ib_qp_type_t;\r
 /*\r
 * VALUES\r
@@ -1019,6 +995,9 @@ typedef enum _ib_qp_type
 *      IB_QPT_UNRELIABLE_CONN\r
 *              Unreliable, connected queue pair.\r
 *\r
+*      IB_QPT_RELIABLE_DGRM\r
+*              Reliable, datagram queue pair.\r
+*\r
 *      IB_QPT_UNRELIABLE_DGRM\r
 *              Unreliable, datagram queue pair.\r
 *\r
@@ -1051,6 +1030,34 @@ typedef enum _ib_qp_type
 *****/\r
 \r
 \r
+/****f* IBA Base: Types/ib_get_qp_type_str\r
+* NAME\r
+*      ib_get_qp_type_str\r
+*\r
+* DESCRIPTION\r
+*      Returns a string for the specified QP type\r
+*\r
+* SYNOPSIS\r
+*/\r
+AL_EXPORT const char* AL_API\r
+ib_get_qp_type_str(\r
+       IN                              uint8_t                                         qp_type );\r
+\r
+/*\r
+* PARAMETERS\r
+*      qp_type\r
+*              [in] Encoded QP type as defined in the\r
+QP attribute.\r
+\r
+* RETURN VALUES\r
+*      Pointer to the QP type string.\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+* ib_qp_type_t\r
+*********/\r
+\r
 /****d* Access Layer/ib_access_t\r
 * NAME\r
 *      ib_access_t\r
@@ -1178,14 +1185,15 @@ typedef struct _ib_qp_create
 {\r
        ib_qp_type_t                    qp_type;\r
 \r
+       uint32_t                                sq_max_inline;\r
        uint32_t                                sq_depth;\r
        uint32_t                                rq_depth;\r
        uint32_t                                sq_sge;\r
        uint32_t                                rq_sge;\r
 \r
-TO_LONG_PTR(   struct _ib_cq* ,                        h_sq_cq) ; \r
-TO_LONG_PTR(   struct _ib_cq* ,                        h_rq_cq) ; \r
-TO_LONG_PTR(   struct _ib_srq* ,                       h_srq) ; \r
+       TO_LONG_PTR(ib_cq_handle_t, h_sq_cq);\r
+       TO_LONG_PTR(ib_cq_handle_t, h_rq_cq);\r
+       TO_LONG_PTR(ib_srq_handle_t, h_srq);\r
 \r
        boolean_t                               sq_signaled;\r
 \r
@@ -1195,6 +1203,10 @@ TO_LONG_PTR(     struct _ib_srq* ,                       h_srq) ;
 *      type\r
 *              Specifies the type of queue pair to create.\r
 *\r
+*      sq_max_inline\r
+*              Maximum payload that can be inlined directly in a WQE, eliminating\r
+*              protection checks and additional DMA operations.\r
+*\r
 *      sq_depth\r
 *              Indicates the requested maximum number of work requests that may be\r
 *              outstanding on the queue pair's send queue.  This value must be less\r
@@ -1257,7 +1269,7 @@ TO_LONG_PTR(      struct _ib_srq* ,                       h_srq) ;
 */\r
 typedef struct _ib_qp_attr\r
 {\r
-TO_LONG_PTR(   struct _ib_pd* ,                        h_pd) ; \r
+       TO_LONG_PTR(ib_pd_handle_t, h_pd);\r
        ib_qp_type_t                    qp_type;\r
        ib_access_t                             access_ctrl;\r
        uint16_t                                pkey_index;\r
@@ -1270,9 +1282,9 @@ TO_LONG_PTR(      struct _ib_pd* ,                        h_pd) ;
        uint8_t                                 init_depth;\r
        uint8_t                                 resp_res;\r
 \r
-TO_LONG_PTR(   struct ib_cq* ,                 h_sq_cq) ; \r
-TO_LONG_PTR(   struct ib_cq* ,                 h_rq_cq) ; \r
-TO_LONG_PTR(   struct ib_srq* ,                        h_srq) ; \r
+       TO_LONG_PTR(ib_cq_handle_t, h_sq_cq);\r
+       TO_LONG_PTR(ib_cq_handle_t, h_rq_cq);\r
+       TO_LONG_PTR(ib_srq_handle_t,h_srq);\r
 \r
        boolean_t                               sq_signaled;\r
 \r
@@ -1359,7 +1371,6 @@ typedef struct _ib_qp_mod
        {\r
                struct _qp_init\r
                {\r
-                       ib_qp_opts_t            opts;\r
                        uint8_t                         primary_port;\r
                        ib_net32_t                      qkey;\r
                        uint16_t                        pkey_index;\r
@@ -1438,16 +1449,46 @@ typedef struct _ib_qp_mod
 */\r
 typedef enum _ib_wr_type_t\r
 {\r
-       WR_SEND = 1,\r
+       WR_SEND,\r
        WR_RDMA_WRITE,\r
        WR_RDMA_READ,\r
        WR_COMPARE_SWAP,\r
-       WR_FETCH_ADD\r
+       WR_FETCH_ADD,\r
+       WR_UNKNOWN\r
 \r
 }      ib_wr_type_t;\r
 /*****/\r
 \r
 \r
+/****f* IBA Base: Types/ib_get_wr_type_str\r
+* NAME\r
+*      ib_get_wr_type_str\r
+*\r
+* DESCRIPTION\r
+*      Returns a string for the specified work request type\r
+*\r
+* SYNOPSIS\r
+*/\r
+AL_EXPORT const char* AL_API\r
+ib_get_wr_type_str(\r
+       IN                              uint8_t                                         wr_type );\r
+\r
+/*\r
+* PARAMETERS\r
+*      wr_type\r
+*              [in] Encoded work request type as defined in the\r
+work request attribute.\r
+\r
+* RETURN VALUES\r
+*      Pointer to the work request type string.\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+* ib_wr_type_t\r
+*********/\r
+\r
+\r
 /****s* Access Layer/ib_local_ds_t\r
 * NAME\r
 *      ib_local_ds_t\r
@@ -1486,6 +1527,9 @@ typedef uint32_t                                  ib_send_opt_t;
 #define IB_SEND_OPT_SOLICITED          0x00000008\r
 #define IB_SEND_OPT_INLINE                     0x00000010\r
 #define IB_SEND_OPT_LOCAL                      0x00000020\r
+#define IB_SEND_OPT_TX_IP_CSUM         0x00000040\r
+#define IB_SEND_OPT_TX_TCP_UDP_CSUM    0x00000080\r
+\r
 #define IB_SEND_OPT_VEND_MASK          0xFFFF0000\r
 /*\r
 * VALUES\r
@@ -1496,8 +1540,8 @@ typedef uint32_t                                  ib_send_opt_t;
 *              Send immediate data with the given request.\r
 *\r
 *      IB_SEND_OPT_FENCE\r
-*              The operation is fenced.  Complete all pending send operations before\r
-*              processing this request.\r
+*              The operation is fenced.  Complete all pending send operations\r
+*              before processing this request.\r
 *\r
 *      IB_SEND_OPT_SIGNALED\r
 *              If the queue pair is configured for signaled completion, then\r
@@ -1514,11 +1558,13 @@ typedef uint32_t                                        ib_send_opt_t;
 *              vendor specific restrictions on the size of send operation that may\r
 *              be performed as inline.\r
 *\r
+*\r
 *      IB_SEND_OPT_LOCAL\r
 *              Indicates that a sent MAD request should be given to the local VPD for\r
 *              processing.  MADs sent using this option are not placed on the wire.\r
 *              This send option is only valid for MAD send operations.\r
 *\r
+*\r
 *      IB_SEND_OPT_VEND_MASK\r
 *              This mask indicates bits reserved in the send options that may be used\r
 *              by the verbs provider to indicate vendor specific options.  Bits set\r
@@ -1540,57 +1586,67 @@ typedef uint32_t                                        ib_send_opt_t;
 */\r
 typedef struct _ib_send_wr\r
 {\r
-       TO_LONG_PTR(struct _ib_send_wr* ,       p_next) ;\r
        uint64_t                                        wr_id;\r
+       struct _ib_send_wr*                     p_next;\r
+       ib_local_ds_t*                          ds_array;\r
+       uint32_t                                        num_ds;\r
        ib_wr_type_t                            wr_type;\r
        ib_send_opt_t                           send_opt;\r
-       uint32_t                                        num_ds;\r
-       TO_LONG_PTR(ib_local_ds_t* ,            ds_array) ;\r
        ib_net32_t                                      immediate_data;\r
 \r
-       union _send_dgrm\r
+       union\r
        {\r
-               struct _send_ud\r
+               union _send_dgrm\r
                {\r
-                       ib_net32_t              remote_qp;\r
-                       ib_net32_t              remote_qkey;\r
-TO_LONG_PTR(                   struct _ib_av* ,        h_av) ; \r
-                       uint16_t                pkey_index;\r
-                       TO_LONG_PTR(void* ,     rsvd) ;\r
-\r
-               }       ud;\r
-\r
-               struct _send_raw_ether\r
-               {\r
-                       ib_net16_t              dest_lid;\r
-                       uint8_t                 path_bits;\r
-                       uint8_t                 sl;\r
-                       uint8_t                 max_static_rate;\r
-                       ib_net16_t              ether_type;\r
-\r
-               }       raw_ether;\r
+                       struct _send_ud\r
+                       {\r
+                               ib_av_handle_t  h_av; \r
+                               ib_net32_t              remote_qp;\r
+                               ib_net32_t              remote_qkey;\r
+                               void*                   rsvd;\r
+                               uint16_t                pkey_index;\r
 \r
-               struct _send_raw_ipv6\r
-               {\r
-                       ib_net16_t              dest_lid;\r
-                       uint8_t                 path_bits;\r
-                       uint8_t                 sl;\r
-                       uint8_t                 max_static_rate;\r
+                       }       ud;\r
 \r
-               }       raw_ipv6;\r
+                       struct _send_rd\r
+                       {\r
+                               ib_net32_t              remote_qp;\r
+                               ib_net32_t              remote_qkey;\r
+                               ib_net32_t              eecn;\r
 \r
-       }       dgrm;\r
+                       }       rd;\r
 \r
-       struct _send_remote_ops\r
-       {\r
-               uint64_t                        vaddr;\r
-               net32_t                         rkey;\r
+                       struct _send_raw_ether\r
+                       {\r
+                               ib_net16_t              dest_lid;\r
+                               uint8_t                 path_bits;\r
+                               uint8_t                 sl;\r
+                               uint8_t                 max_static_rate;\r
+                               ib_net16_t              ether_type;\r
+       \r
+                       }       raw_ether;\r
 \r
-               ib_net64_t                      atomic1;\r
-               ib_net64_t                      atomic2;\r
+                       struct _send_raw_ipv6\r
+                       {\r
+                               ib_net16_t              dest_lid;\r
+                               uint8_t                 path_bits;\r
+                               uint8_t                 sl;\r
+                               uint8_t                 max_static_rate;\r
+       \r
+                       }       raw_ipv6;\r
+       \r
+               }       dgrm;\r
 \r
-       }       remote_ops;\r
+               struct _send_remote_ops\r
+               {\r
+                       uint64_t                        vaddr;\r
+                       net32_t                         rkey;\r
 \r
+                       ib_net64_t                      atomic1;\r
+                       ib_net64_t                      atomic2;\r
+       \r
+               }       remote_ops;\r
+       };\r
 }      ib_send_wr_t;\r
 /*\r
 * FIELDS\r
@@ -1707,10 +1763,10 @@ TO_LONG_PTR(                    struct _ib_av* ,        h_av) ;
 */\r
 typedef struct _ib_recv_wr\r
 {\r
-       TO_LONG_PTR(struct _ib_recv_wr* ,       p_next) ;\r
+       TO_LONG_PTR(struct _ib_recv_wr*, p_next);\r
        uint64_t                                        wr_id;\r
        uint32_t                                        num_ds;\r
-       TO_LONG_PTR(ib_local_ds_t* ,            ds_array) ;\r
+       TO_LONG_PTR(ib_local_ds_t*,     ds_array);\r
 \r
 }      ib_recv_wr_t;\r
 /*\r
@@ -1751,7 +1807,7 @@ typedef struct _ib_bind_wr
        uint64_t                                wr_id;\r
        ib_send_opt_t                   send_opt;\r
 \r
-TO_LONG_PTR(   struct _ib_mr* ,                        h_mr) ; \r
+       TO_LONG_PTR(ib_mr_handle_t, h_mr);\r
        ib_access_t                             access_ctrl;\r
        net32_t                                 current_rkey;\r
 \r
@@ -1808,6 +1864,9 @@ typedef enum _ib_wc_status_t
        IB_WCS_RNR_RETRY_ERR,\r
        IB_WCS_TIMEOUT_RETRY_ERR,\r
        IB_WCS_REM_INVALID_REQ_ERR,\r
+       IB_WCS_BAD_RESP_ERR,\r
+       IB_WCS_LOCAL_ACCESS_ERR,\r
+       IB_WCS_GENERAL_ERR,\r
        IB_WCS_UNMATCHED_RESPONSE,                      /* InfiniBand Access Layer */\r
        IB_WCS_CANCELED,                                        /* InfiniBand Access Layer */\r
        IB_WCS_REM_ABORT_ERR,\r
@@ -1873,6 +1932,23 @@ typedef enum _ib_wc_status_t
 *                      - There was insufficient buffers to receive a new atomic operation.\r
 *                      - An RDMA request was larger than 2^31 bytes.\r
 *\r
+*      IB_WCS_BAD_RESP_ERR,\r
+*              An unexpected transport layer opcode was returned\r
+*              by the responder.\r
+*\r
+*      IB_WCS_LOCAL_ACCESS_ERR,\r
+*              A protection error occurred on a local data buffer\r
+*              during the processing of a RDMA Write with Immediate Data \r
+*              operation sent from the remote node.\r
+*\r
+*      IB_WCS_REM_ABORT_ERR,\r
+*              The operation was aborted (e.g., For UD QPs associated with an SRQ, \r
+*              the responder aborted the operation).\r
+*\r
+*      IB_WCS_REM_ABORT_ERR,\r
+*              The operation was aborted (e.g., For UD QPs associated with an SRQ, \r
+*              the responder aborted the operation).\r
+*\r
 *      IB_WCS_UNMATCHED_RESPONSE\r
 *              A response MAD was received for which there was no matching send.  The\r
 *              send operation may have been canceled by the user or may have timed\r
@@ -1880,12 +1956,10 @@ typedef enum _ib_wc_status_t
 *\r
 *      IB_WCS_CANCELED\r
 *              The completed work request was canceled by the user.\r
-*\r
-*      IB_WCS_REM_ABORT_ERR,\r
-*              The operation was aborted (e.g., For UD QPs associated with an SRQ, \r
-*              the responder aborted the operation).\r
-*\r
-\r
+ *\r
+ *     IB_WCS_GENERAL_ERR,\r
+ *             Any other error\r
+ *\r
 *****/\r
 \r
 \r
@@ -1929,13 +2003,14 @@ typedef enum _ib_wc_type_t
 {\r
        IB_WC_SEND,\r
        IB_WC_RDMA_WRITE,\r
-       IB_WC_RECV,\r
        IB_WC_RDMA_READ,\r
-       IB_WC_MW_BIND,\r
-       IB_WC_FETCH_ADD,\r
        IB_WC_COMPARE_SWAP,\r
+       IB_WC_FETCH_ADD,\r
+       IB_WC_MW_BIND,\r
+       IB_WC_UNKNOWN1,\r
+       IB_WC_RECV = (1 << 7),\r
        IB_WC_RECV_RDMA_WRITE,\r
-       IB_WC_UNKNOWN\r
+       IB_WC_UNKNOWN2\r
 \r
 }      ib_wc_type_t;\r
 /*****/\r
@@ -2012,18 +2087,18 @@ typedef uint32_t                                        ib_recv_opt_t;
 */\r
 typedef struct _ib_wc\r
 {\r
-       TO_LONG_PTR(struct _ib_wc* ,    p_next) ;\r
+       TO_LONG_PTR(struct _ib_wc*, p_next);\r
        uint64_t                                wr_id;\r
        ib_wc_type_t                    wc_type;\r
 \r
        uint32_t                                length;\r
-       ib_wc_status_t                  status;\r
        struct {\r
                uint8_t                         vendor_specific;\r
                uint8_t                         csum_ok;\r
                uint16_t                        vendor_specific2;\r
                uint32_t                        vendor_specific3;\r
        };\r
+       ib_wc_status_t                  status;\r
 \r
        union _wc_recv\r
        {\r
@@ -2046,6 +2121,16 @@ typedef struct _ib_wc
 \r
                }       ud;\r
 \r
+               struct _wc_rd\r
+               {\r
+                       ib_net32_t      remote_eecn;\r
+                       ib_net32_t      remote_qp;\r
+                       ib_net16_t      remote_lid;\r
+                       uint8_t         remote_sl;\r
+                       uint32_t        free_cnt;\r
+\r
+               }       rd;\r
+\r
                struct _wc_raw_ipv6\r
                {\r
                        ib_net16_t              remote_lid;\r
@@ -2081,6 +2166,7 @@ typedef struct _ib_wc
 *      wc_type\r
 *              Indicates the type of work completion.\r
 *\r
+*\r
 *      length\r
 *              The total length of the data sent or received with the work request.\r
 *\r
@@ -2112,8 +2198,8 @@ typedef struct _ib_wc
 *              Identifies the source queue pair of a received datagram.\r
 *\r
 *      recv.ud.pkey_index\r
-*              The pkey index of the source queue pair. This is valid only for\r
-*              IB_QPT_QP1 and IB_QPT_QP1_ALIAS QP types.\r
+*              The pkey index for the source queue pair. This is valid only for\r
+*              GSI type QP's.\r
 *\r
 *      recv.ud.remote_lid\r
 *              The source LID of the received datagram.\r
@@ -2124,6 +2210,23 @@ typedef struct _ib_wc
 *      recv.ud.path_bits\r
 *              path bits...\r
 *\r
+*      recv.rd.remote_eecn\r
+*              The remote end-to-end context number that sent the received message.\r
+*\r
+*      recv.rd.remote_qp\r
+*              Identifies the source queue pair of a received message.\r
+*\r
+*      recv.rd.remote_lid\r
+*              The source LID of the received message.\r
+*\r
+*      recv.rd.remote_sl\r
+*              The service level used by the source of the received message.\r
+*\r
+*      recv.rd.free_cnt\r
+*              The number of available entries in the completion queue.  Reliable\r
+*              datagrams may complete out of order, so this field may be used to\r
+*              determine the number of additional completions that may occur.\r
+*\r
 *      recv.raw_ipv6.remote_lid\r
 *              The source LID of the received message.\r
 *\r
@@ -2169,7 +2272,7 @@ typedef struct _ib_wc
 */\r
 typedef struct _ib_mr_create\r
 {\r
-       TO_LONG_PTR(void* ,                     vaddr) ;\r
+       TO_LONG_PTR(void*,              vaddr);\r
        uint64_t                                length;\r
        ib_access_t                             access_ctrl;\r
 \r
@@ -2189,6 +2292,88 @@ typedef struct _ib_mr_create
 *      ib_access_t\r
 *****/\r
 \r
+#ifdef CL_KERNEL\r
+\r
+/****s* Access Layer/mlnx_fmr_create_t\r
+* NAME\r
+*      mlnx_fmr_create_t\r
+*\r
+* DESCRIPTION\r
+*      Information required to create a Mellanox fast memory region.\r
+*\r
+* SYNOPSIS\r
+*/\r
+typedef struct _mlnx_fmr_create\r
+{\r
+       int                                     max_pages;\r
+       int                                     max_maps;\r
+       uint8_t                         page_size;\r
+       ib_access_t                     access_ctrl;\r
+\r
+}      mlnx_fmr_create_t;\r
+/*\r
+* FIELDS\r
+*      max_pages\r
+*              max pages in the region.\r
+*\r
+*      max_maps\r
+*              max times, the region can be mapped before remapping.\r
+*\r
+*      page_size\r
+*              log2 of the page size (e.g. 12 for 4KB).\r
+*\r
+*      access_ctrl\r
+*              Access rights of the registered region.\r
+*\r
+* NOTES\r
+*      This is a Mellanox specific extension to verbs.\r
+*\r
+* SEE ALSO\r
+*      ib_access_t\r
+*****/\r
+\r
+\r
+/****s* Access Layer/mlnx_fmr_pool_create_t\r
+* NAME\r
+*      mlnx_fmr_pool_create_t\r
+*\r
+* DESCRIPTION\r
+*      Information required to create a Mellanox fast memory region pool.\r
+*\r
+* SYNOPSIS\r
+*/\r
+typedef struct _mlnx_fmr_pool_create\r
+{\r
+       int                             max_pages_per_fmr;\r
+       uint8_t                 page_size;      /* really - page_shift, log2 of page_size */\r
+       enum ib_access_flags    access_ctrl;\r
+       int                             pool_size;\r
+       int                             dirty_watermark;\r
+       void                    (*flush_function)(mlnx_fmr_pool_handle_t h_pool, void *arg);\r
+       void                            *flush_arg;\r
+       boolean_t                       cache;\r
+}      mlnx_fmr_pool_create_t;\r
+/*\r
+* FIELDS\r
+*      max_pages\r
+*              max pages in the region.\r
+*\r
+*      max_maps\r
+*              max times, the region can be mapped before remapping.\r
+*\r
+*      page_size\r
+*              log2 of the page size (e.g. 12 for 4KB).\r
+*\r
+*      access_ctrl\r
+*              Access rights of the registered region.\r
+*\r
+* NOTES\r
+*      This is a Mellanox specific extension to verbs.\r
+*\r
+* SEE ALSO\r
+*      ib_access_t\r
+*****/\r
+#endif\r
 \r
 /****s* Access Layer/ib_phys_range_t\r
 * NAME\r
@@ -2234,7 +2419,7 @@ typedef struct _ib_phys_create
 {\r
        uint64_t                                        length;\r
        uint32_t                                        num_ranges;\r
-       TO_LONG_PTR(ib_phys_range_t* ,  range_array) ;\r
+       ib_phys_range_t*                        range_array;\r
        uint32_t                                        buf_offset;\r
        uint32_t                                        hca_page_size;\r
        ib_access_t                                     access_ctrl;\r
@@ -2278,7 +2463,7 @@ typedef struct _ib_phys_create
 */\r
 typedef struct _ib_mr_attr\r
 {\r
-TO_LONG_PTR(   struct ib_pd* ,                 h_pd) ; \r
+       TO_LONG_PTR(ib_pd_handle_t, h_pd);\r
        uint64_t                                local_lb;\r
        uint64_t                                local_ub;\r
        uint64_t                                remote_lb;\r
@@ -2364,6 +2549,8 @@ typedef uint32_t                                                  ib_ca_mod_t;
 #define IB_CA_MOD_SHUTDOWN_PORT                                0x00100000\r
 #define IB_CA_MOD_INIT_TYPE_VALUE                      0x00200000\r
 #define IB_CA_MOD_SYSTEM_IMAGE_GUID                    0x00400000\r
+#define IB_CA_MOD_IS_CLIENT_REREGISTER_SUPPORTED       0x00800000\r
+#define IB_CA_MOD_RESERVED_MASK                                0xFF000000\r
 /*\r
 * VALUES\r
 *      IB_CA_MOD_IS_CM_SUPPORTED\r
@@ -2374,26 +2561,28 @@ typedef uint32_t                                                        ib_ca_mod_t;
 *              Indicates if there is an SNMP agent accessible through the port.\r
 *\r
 *      IB_CA_MOD_IS_DEV_MGMT_SUPPORTED\r
-*              Indicates if there is a device management agent accessible through\r
-*              the port.\r
+*              Indicates if there is a device management agent accessible\r
+*              through the port.\r
 *\r
 *      IB_CA_MOD_IS_VEND_SUPPORTED\r
-*              Indicates if there is a vendor supported agent accessible through\r
-*              the port.\r
+*              Indicates if there is a vendor supported agent accessible\r
+*              through the port.\r
 *\r
 *      IB_CA_MOD_IS_SM\r
 *              Indicates if there is a subnet manager accessible through\r
 *              the port.\r
 *\r
 *      IB_CA_MOD_IS_SM_DISABLED\r
-*              Indicates if the port has been disabled for configuration by the subnet\r
-*              manager.\r
+*              Indicates if the port has been disabled for configuration by the\r
+*              subnet manager.\r
 *\r
 *      IB_CA_MOD_QKEY_CTR\r
-*              Used to reset the qkey violation counter associated with the port.\r
+*              Used to reset the qkey violation counter associated with the\r
+*              port.\r
 *\r
 *      IB_CA_MOD_PKEY_CTR\r
-*              Used to reset the pkey violation counter associated with the port.\r
+*              Used to reset the pkey violation counter associated with the\r
+*              port.\r
 *\r
 *      IB_CA_MOD_IS_NOTICE_SUPPORTED\r
 *              Indicates that this CA supports ability to generate Notices for\r
@@ -2404,7 +2593,8 @@ typedef uint32_t                                                  ib_ca_mod_t;
 *              trap messages. (only applicable to switches)\r
 *\r
 *      IB_CA_MOD_IS_APM_SUPPORTED\r
-*              Indicates that this port is capable of performing Automatic Migration.\r
+*              Indicates that this port is capable of performing Automatic\r
+*              Path Migration.\r
 *\r
 *      IB_CA_MOD_IS_SLMAP_SUPPORTED\r
 *              Indicates this port supports SLMAP capability.\r
@@ -2442,6 +2632,13 @@ typedef uint32_t                                                 ib_ca_mod_t;
 *\r
 *      IB_CA_MOD_SYSTEM_IMAGE_GUID\r
 *              Used to modify the system image GUID for the port.\r
+*\r
+*      IB_CA_MOD_IS_CLIENT_REREGISTER_SUPPORTED\r
+*              Used to modify the system image GUID for the port.\r
+*\r
+*      IB_CA_MOD_RESERVED_MASK\r
+*              Mask of all the reserved bits.  If any of these bits are set\r
+*              ib_modify_ca will return IB_INVALID_PARAMETER.\r
 *****/\r
 \r
 \r
@@ -2559,7 +2756,7 @@ typedef struct _ib_ci_op
        IN                              uint32_t                                        buf_size;\r
        IN                              uint32_t                                        buf_info;\r
        IN      OUT                     int32_t                                         status;\r
-    IN OUT                     TO_LONG_PTR(void*,p_buf) OPTIONAL; // Do not put it last in the structure, because of memory alignment\r
+       IN      OUT                     TO_LONG_PTR(void*,                      p_buf) OPTIONAL; // Do not put it last in the structure, because of memory alignment\r
                OUT                     uint32_t                                        num_bytes_ret;\r
        \r
 \r