17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 503494a98SBill Taylor * Common Development and Distribution License (the "License"). 603494a98SBill Taylor * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*17a2b317SBill Taylor * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 237c478bd9Sstevel@tonic-gate */ 247c478bd9Sstevel@tonic-gate 257c478bd9Sstevel@tonic-gate #ifndef _SYS_IB_IBTL_IBTL_CI_TYPES_H 267c478bd9Sstevel@tonic-gate #define _SYS_IB_IBTL_IBTL_CI_TYPES_H 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate /* 297c478bd9Sstevel@tonic-gate * ibtl_ci_types.h 307c478bd9Sstevel@tonic-gate * Definitions shared between the IBTL and CI interface. 317c478bd9Sstevel@tonic-gate */ 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate #ifdef __cplusplus 347c478bd9Sstevel@tonic-gate extern "C" { 357c478bd9Sstevel@tonic-gate #endif 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gate typedef struct ibc_cq_s *ibt_opaque1_t; 387c478bd9Sstevel@tonic-gate typedef struct ibc_srq_s *ibt_opaque2_t; 397c478bd9Sstevel@tonic-gate typedef struct ibc_rdd_s *ibt_rdd_hdl_t; /* ibt_alloc_eec() */ 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate /* 437c478bd9Sstevel@tonic-gate * Channel Modify flags - ibt_cep_modify_flags_t 447c478bd9Sstevel@tonic-gate * 457c478bd9Sstevel@tonic-gate * Note: 467c478bd9Sstevel@tonic-gate * That the IBT_CEP_SET_RESET_INIT, IBT_CEP_SET_INIT_RTR 477c478bd9Sstevel@tonic-gate * IBT_CEP_SET_RTR_RTS flags are mutually exclusive. However if one of the 487c478bd9Sstevel@tonic-gate * optional attributes associated with these flags is to be modified then 497c478bd9Sstevel@tonic-gate * the corresponding modify flag must also be specified. For example if 507c478bd9Sstevel@tonic-gate * a client wishes to transit from the INIT to RTR state but additionally 517c478bd9Sstevel@tonic-gate * they want to disable atomics, then the modify flags should be: 527c478bd9Sstevel@tonic-gate * 537c478bd9Sstevel@tonic-gate * (IBT_CEP_SET_INIT_RTR | IBT_CEP_SET_ATOMIC) 547c478bd9Sstevel@tonic-gate * 557c478bd9Sstevel@tonic-gate * And the following attributes specified: 567c478bd9Sstevel@tonic-gate * 577c478bd9Sstevel@tonic-gate * - Number of responder resources for RDMA read/atomic ops. 587c478bd9Sstevel@tonic-gate * - Primary Path Address Vector Information. 597c478bd9Sstevel@tonic-gate * - Destination QPN. 607c478bd9Sstevel@tonic-gate * - PSN for ReceiveQ. 617c478bd9Sstevel@tonic-gate * - Minimum RNR NAK Timer field value. 627c478bd9Sstevel@tonic-gate * - ibt_cep_flags_t set to IBT_CEP_ATOMIC 637c478bd9Sstevel@tonic-gate * 647c478bd9Sstevel@tonic-gate */ 657c478bd9Sstevel@tonic-gate #define IBT_CEP_SET_RESET_INIT IBT_CEP_SET_OPAQUE1 667c478bd9Sstevel@tonic-gate #define IBT_CEP_SET_INIT_RTR IBT_CEP_SET_OPAQUE2 677c478bd9Sstevel@tonic-gate #define IBT_CEP_SET_RTR_RTS IBT_CEP_SET_OPAQUE3 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gate #define IBT_CEP_SET_STATE IBT_CEP_SET_OPAQUE4 707c478bd9Sstevel@tonic-gate #define IBT_CEP_SET_MTU IBT_CEP_SET_OPAQUE5 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate #define IBT_CEP_SET_TIMEOUT IBT_CEP_SET_OPAQUE6 737c478bd9Sstevel@tonic-gate #define IBT_CEP_SET_PKEY_IX IBT_CEP_SET_OPAQUE7 747c478bd9Sstevel@tonic-gate #define IBT_CEP_SET_MIG IBT_CEP_SET_OPAQUE8 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate /* 777c478bd9Sstevel@tonic-gate * ibt_async_code_t 787c478bd9Sstevel@tonic-gate */ 797c478bd9Sstevel@tonic-gate #define IBT_EVENT_PATH_MIGRATED_QP IBT_EVENT_PATH_MIGRATED 807c478bd9Sstevel@tonic-gate #define IBT_EVENT_COM_EST_QP IBT_EVENT_COM_EST 817c478bd9Sstevel@tonic-gate #define IBT_EVENT_COM_EST_EEC IBT_ASYNC_OPAQUE2 827c478bd9Sstevel@tonic-gate #define IBT_ERROR_CATASTROPHIC_QP IBT_ERROR_CATASTROPHIC_CHAN 837c478bd9Sstevel@tonic-gate #define IBT_ERROR_INVALID_REQUEST_QP IBT_ERROR_INVALID_REQUEST_CHAN 847c478bd9Sstevel@tonic-gate #define IBT_ERROR_ACCESS_VIOLATION_QP IBT_ERROR_ACCESS_VIOLATION_CHAN 857c478bd9Sstevel@tonic-gate #define IBT_ERROR_PATH_MIGRATE_REQ_QP IBT_ERROR_PATH_MIGRATE_REQ 867c478bd9Sstevel@tonic-gate #define IBT_EVENT_EMPTY_QP IBT_EVENT_EMPTY_CHAN 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate /* 907c478bd9Sstevel@tonic-gate * ibt_adds_vect_t 917c478bd9Sstevel@tonic-gate */ 927c478bd9Sstevel@tonic-gate #define av_send_grh av_opaque1 /* flag to specify if GRH is there */ 937c478bd9Sstevel@tonic-gate #define av_dlid av_opaque2 /* destination LID, or router LID */ 947c478bd9Sstevel@tonic-gate #define av_src_path av_opaque3 /* Source path bits */ 957c478bd9Sstevel@tonic-gate #define av_sgid_ix av_opaque4 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gate /* 987c478bd9Sstevel@tonic-gate * ibt_wc_t 997c478bd9Sstevel@tonic-gate */ 1007c478bd9Sstevel@tonic-gate #define wc_slid wc_opaque1 /* source LID */ 1017c478bd9Sstevel@tonic-gate #define wc_pkey_ix wc_opaque2 /* The P_Key index, GSI only */ 1027c478bd9Sstevel@tonic-gate #define wc_path_bits wc_opaque4 /* DLID path bits, UD's, RawIPv6 & */ 1037c478bd9Sstevel@tonic-gate /* RawEthr only */ 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gate /* 1067c478bd9Sstevel@tonic-gate * ibt_mcg_attr_t 1077c478bd9Sstevel@tonic-gate */ 1087c478bd9Sstevel@tonic-gate #define mc_mlid mc_opaque1 /* Multicast LID */ 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate /* 1117c478bd9Sstevel@tonic-gate * ibt_mcg_info_t 1127c478bd9Sstevel@tonic-gate */ 1137c478bd9Sstevel@tonic-gate #define mc_pkt_lt mc_opaque2 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gate /* 1167c478bd9Sstevel@tonic-gate * ibt_hca_flags_t 1177c478bd9Sstevel@tonic-gate */ 1187c478bd9Sstevel@tonic-gate #define IBT_HCA_RESIZE_QP IBT_HCA_RESIZE_CHAN 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gate /* 1217c478bd9Sstevel@tonic-gate * ibt_object_type_t 1227c478bd9Sstevel@tonic-gate */ 1237c478bd9Sstevel@tonic-gate #define IBT_HDL_QP IBT_HDL_CHANNEL 1247c478bd9Sstevel@tonic-gate #define IBT_HDL_AH IBT_HDL_UD_DEST 1257c478bd9Sstevel@tonic-gate 1267c478bd9Sstevel@tonic-gate /* 1277c478bd9Sstevel@tonic-gate * ibt_hca_attr_t 1287c478bd9Sstevel@tonic-gate */ 1297c478bd9Sstevel@tonic-gate #define hca_max_ah hca_max_ud_dest /* Max address handles in HCA */ 1307c478bd9Sstevel@tonic-gate #define hca_ah_max_ci_priv_sz hca_ud_dest_max_ci_priv_sz 1317c478bd9Sstevel@tonic-gate #define hca_qp_max_ci_priv_sz hca_chan_max_ci_priv_sz 1327c478bd9Sstevel@tonic-gate #define hca_max_qp hca_max_chans /* Max Channels supported by the HCA */ 1337c478bd9Sstevel@tonic-gate #define hca_max_qp_sz hca_max_chan_sz /* Max outstanding WRs on any channel */ 1347c478bd9Sstevel@tonic-gate #define hca_max_rdma_out_qp hca_max_rdma_out_chan 1357c478bd9Sstevel@tonic-gate #define hca_max_rdma_in_qp hca_max_rdma_in_chan 1367c478bd9Sstevel@tonic-gate #define hca_max_mcg_qps hca_max_mcg_chans 1377c478bd9Sstevel@tonic-gate #define hca_max_qp_per_mcg hca_max_chan_per_mcg 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gate /* 1407c478bd9Sstevel@tonic-gate * ibt_hca_portinfo_t 1417c478bd9Sstevel@tonic-gate */ 1427c478bd9Sstevel@tonic-gate #define p_base_lid p_opaque1 /* Base LID of the port */ 1437c478bd9Sstevel@tonic-gate 1447c478bd9Sstevel@tonic-gate 1457c478bd9Sstevel@tonic-gate /* Mapping of Verbs defined return status to channel specific. */ 1467c478bd9Sstevel@tonic-gate #define IBT_QP_FULL IBT_CHAN_FULL 1477c478bd9Sstevel@tonic-gate #define IBT_QP_HDL_INVALID IBT_CHAN_HDL_INVALID 1487c478bd9Sstevel@tonic-gate #define IBT_QP_ATTR_RO IBT_CHAN_ATTR_RO 1497c478bd9Sstevel@tonic-gate #define IBT_QP_STATE_INVALID IBT_CHAN_STATE_INVALID 1507c478bd9Sstevel@tonic-gate #define IBT_QP_SRV_TYPE_INVALID IBT_CHAN_SRV_TYPE_INVALID 1517c478bd9Sstevel@tonic-gate #define IBT_QP_IN_USE IBT_CHAN_IN_USE 1527c478bd9Sstevel@tonic-gate #define IBT_QP_ATOMICS_NOT_SUPPORTED IBT_CHAN_ATOMICS_NOT_SUPPORTED 1537c478bd9Sstevel@tonic-gate #define IBT_QP_OP_TYPE_INVALID IBT_CHAN_OP_TYPE_INVALID 1547c478bd9Sstevel@tonic-gate #define IBT_QP_SGL_FORMAT_INVALID IBT_CHAN_SGL_FORMAT_INVALID 1557c478bd9Sstevel@tonic-gate #define IBT_QP_SGL_LEN_INVALID IBT_CHAN_SGL_LEN_INVALID 1567c478bd9Sstevel@tonic-gate #define IBT_QP_APM_STATE_INVALID IBT_CHAN_APM_STATE_INVALID 1577c478bd9Sstevel@tonic-gate #define IBT_QP_SZ_INSUFFICIENT IBT_CHAN_SZ_INSUFFICIENT 1587c478bd9Sstevel@tonic-gate #define IBT_QP_SPECIAL_TYPE_INVALID IBT_CHAN_SPECIAL_TYPE_INVALID 1597c478bd9Sstevel@tonic-gate #define IBT_WC_LOCAL_QP_OP_ERR IBT_WC_LOCAL_CHAN_OP_ERR 1607c478bd9Sstevel@tonic-gate #define IBT_AH_HDL_INVALID IBT_UD_DEST_HDL_INVALID 1617c478bd9Sstevel@tonic-gate #define IBT_HCA_MCG_QP_EXCEEDED IBT_HCA_MCG_CHAN_EXCEEDED 1627c478bd9Sstevel@tonic-gate #define IBT_MC_MLID_INVALID IBT_MC_OPAQUE 1637c478bd9Sstevel@tonic-gate #define IBT_QP_SRQ IBT_CHAN_SRQ 1647c478bd9Sstevel@tonic-gate #define IBT_QP_TYPE_2A_MW_BOUND IBT_CHAN_TYPE_2A_MW_BOUND 16503494a98SBill Taylor #define IBT_QP_WQE_SZ_INSUFF IBT_CHAN_WQE_SZ_INSUFF 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gate 1687c478bd9Sstevel@tonic-gate /* 1697c478bd9Sstevel@tonic-gate * ibt_cep_path_t 1707c478bd9Sstevel@tonic-gate */ 1717c478bd9Sstevel@tonic-gate #define cep_timeout cep_cm_opaque1 /* 6 bits of timeout exponent */ 1727c478bd9Sstevel@tonic-gate /* Local ACK timeout for RC */ 1737c478bd9Sstevel@tonic-gate 1747c478bd9Sstevel@tonic-gate /* 1757c478bd9Sstevel@tonic-gate * Define an ibt UD Destination struct. This holds all the information 1767c478bd9Sstevel@tonic-gate * needed to reach a UD destination. 1777c478bd9Sstevel@tonic-gate * 1787c478bd9Sstevel@tonic-gate * The ibt_ud_dest_s struct is known by the CI and IBTL. This structure is 1797c478bd9Sstevel@tonic-gate * referenced by the CI during UD work request processing. It is defined here 1807c478bd9Sstevel@tonic-gate * here so that IBTL does not need to do any data copying during ibt_post_send. 1817c478bd9Sstevel@tonic-gate */ 1827c478bd9Sstevel@tonic-gate typedef struct ibt_ud_dest_s { 1837c478bd9Sstevel@tonic-gate ibt_ah_hdl_t ud_ah; /* Address handle */ 1847c478bd9Sstevel@tonic-gate ib_qpn_t ud_dst_qpn; /* Destination QPN */ 1857c478bd9Sstevel@tonic-gate ib_qkey_t ud_qkey; /* Q_Key */ 1867c478bd9Sstevel@tonic-gate 1877c478bd9Sstevel@tonic-gate /* The following fields are IBTL-only, i.e., opaque to the CI */ 1887c478bd9Sstevel@tonic-gate struct ibtl_hca_s *ud_dest_opaque1; 1897c478bd9Sstevel@tonic-gate } ibt_ud_dest_t; 1907c478bd9Sstevel@tonic-gate 1917c478bd9Sstevel@tonic-gate /* 1927c478bd9Sstevel@tonic-gate * Reserved For Future Use 1937c478bd9Sstevel@tonic-gate * RD destination address info. 1947c478bd9Sstevel@tonic-gate */ 1957c478bd9Sstevel@tonic-gate typedef struct ibt_rd_dest_s { 1967c478bd9Sstevel@tonic-gate ibt_ah_hdl_t rd_ah; /* Address handle */ 1977c478bd9Sstevel@tonic-gate ib_eecn_t rd_eecn; /* Local EEC Number */ 1987c478bd9Sstevel@tonic-gate ib_qpn_t rd_dst_qpn; /* Destination QP Number */ 1997c478bd9Sstevel@tonic-gate ib_qkey_t rd_dst_qkey; /* The Q_Key for the destination QP */ 2007c478bd9Sstevel@tonic-gate } ibt_rd_dest_t; 2017c478bd9Sstevel@tonic-gate 2027c478bd9Sstevel@tonic-gate /* 2037c478bd9Sstevel@tonic-gate * QP Type. 2047c478bd9Sstevel@tonic-gate */ 2057c478bd9Sstevel@tonic-gate typedef enum ibt_qp_type_e { 2067c478bd9Sstevel@tonic-gate IBT_RC_RQP = 0, 2077c478bd9Sstevel@tonic-gate IBT_RD_RQP = 1, /* Reserved For Future Use */ 2087c478bd9Sstevel@tonic-gate IBT_UC_RQP = 2, /* Reserved For Future Use */ 2097c478bd9Sstevel@tonic-gate IBT_UD_RQP = 3 2107c478bd9Sstevel@tonic-gate } ibt_qp_type_t; 2117c478bd9Sstevel@tonic-gate 2127c478bd9Sstevel@tonic-gate /* 2137c478bd9Sstevel@tonic-gate * Special QP Type. 2147c478bd9Sstevel@tonic-gate */ 2157c478bd9Sstevel@tonic-gate typedef enum ibt_sqp_type_e { 2167c478bd9Sstevel@tonic-gate IBT_SMI_SQP = 0, 2177c478bd9Sstevel@tonic-gate IBT_GSI_SQP = 1, 2187c478bd9Sstevel@tonic-gate IBT_RAWIP_SQP = 2, /* Reserved For Future Use */ 2197c478bd9Sstevel@tonic-gate IBT_RAWETHER_SQP = 3 /* Reserved For Future Use */ 2207c478bd9Sstevel@tonic-gate } ibt_sqp_type_t; 2217c478bd9Sstevel@tonic-gate 2227c478bd9Sstevel@tonic-gate /* 2237c478bd9Sstevel@tonic-gate * QP alloc flags. 2247c478bd9Sstevel@tonic-gate */ 2257c478bd9Sstevel@tonic-gate typedef enum ibt_qp_alloc_flags_e { 2267c478bd9Sstevel@tonic-gate IBT_QP_NO_FLAGS = 0, 2277c478bd9Sstevel@tonic-gate IBT_QP_USER_MAP = (1 << 0), 2287c478bd9Sstevel@tonic-gate IBT_QP_DEFER_ALLOC = (1 << 1), 22903494a98SBill Taylor IBT_QP_USES_SRQ = (1 << 2), 230*17a2b317SBill Taylor IBT_QP_USES_RSS = (1 << 3), 231*17a2b317SBill Taylor 232*17a2b317SBill Taylor /* FC variants of UD */ 233*17a2b317SBill Taylor IBT_QP_USES_RFCI = (1 << 4), 234*17a2b317SBill Taylor IBT_QP_USES_FCMD = (1 << 5), 235*17a2b317SBill Taylor IBT_QP_USES_FEXCH = (1 << 6) 2367c478bd9Sstevel@tonic-gate } ibt_qp_alloc_flags_t; 2377c478bd9Sstevel@tonic-gate 2387c478bd9Sstevel@tonic-gate /* 2397c478bd9Sstevel@tonic-gate * QP Alloc Attributes definition. 2407c478bd9Sstevel@tonic-gate * 2417c478bd9Sstevel@tonic-gate * Contains the QP attributes that are required to create a QP. 2427c478bd9Sstevel@tonic-gate */ 2437c478bd9Sstevel@tonic-gate typedef struct ibt_qp_alloc_attr_s { 2447c478bd9Sstevel@tonic-gate ibt_qp_alloc_flags_t qp_alloc_flags; 2457c478bd9Sstevel@tonic-gate ibt_cq_hdl_t qp_scq_hdl; /* SQ CQ IBT Hdl */ 2467c478bd9Sstevel@tonic-gate ibt_cq_hdl_t qp_rcq_hdl; /* RQ CQ IBT Hdl */ 2477c478bd9Sstevel@tonic-gate ibt_rdd_hdl_t qp_rdd_hdl; /* Reserved */ 2487c478bd9Sstevel@tonic-gate ibt_pd_hdl_t qp_pd_hdl; /* PD handle. */ 2497c478bd9Sstevel@tonic-gate ibt_chan_sizes_t qp_sizes; /* Queue and SGL */ 2507c478bd9Sstevel@tonic-gate ibt_attr_flags_t qp_flags; /* SQ Signaling Type etc */ 2517c478bd9Sstevel@tonic-gate ibt_opaque1_t qp_opaque1; 2527c478bd9Sstevel@tonic-gate ibt_opaque1_t qp_opaque2; 2537c478bd9Sstevel@tonic-gate ibt_srq_hdl_t qp_srq_hdl; /* SRQ ibt hdl */ 2547c478bd9Sstevel@tonic-gate ibt_opaque2_t qp_opaque3; 255*17a2b317SBill Taylor ibt_fc_attr_t qp_fc; 2567c478bd9Sstevel@tonic-gate } ibt_qp_alloc_attr_t; 2577c478bd9Sstevel@tonic-gate 2587c478bd9Sstevel@tonic-gate 2597c478bd9Sstevel@tonic-gate /* 2607c478bd9Sstevel@tonic-gate * QP query info 2617c478bd9Sstevel@tonic-gate */ 2627c478bd9Sstevel@tonic-gate /* RC transport specific */ 2637c478bd9Sstevel@tonic-gate typedef struct ibt_qp_rc_attr_s { 2647c478bd9Sstevel@tonic-gate uint32_t rc_sq_psn:24; /* SQ PSN */ 2657c478bd9Sstevel@tonic-gate uint32_t rc_rq_psn:24; /* RQ PSN */ 2667c478bd9Sstevel@tonic-gate ib_qpn_t rc_dst_qpn; /* Destination QPN */ 2677c478bd9Sstevel@tonic-gate ibt_cep_cmstate_t rc_mig_state; /* Channel Migration State */ 2687c478bd9Sstevel@tonic-gate ibt_rnr_retry_cnt_t rc_rnr_retry_cnt; 2697c478bd9Sstevel@tonic-gate uint8_t rc_retry_cnt:3; 2707c478bd9Sstevel@tonic-gate uint8_t rc_rdma_ra_out; /* max RDMA-R/Atomic sent */ 2717c478bd9Sstevel@tonic-gate /* Number of RDMA RD's & */ 2727c478bd9Sstevel@tonic-gate /* Atomics outstanding */ 2737c478bd9Sstevel@tonic-gate uint8_t rc_rdma_ra_in; /* Incoming RDMA-R/Atomic */ 2747c478bd9Sstevel@tonic-gate /* Responder resources for */ 2757c478bd9Sstevel@tonic-gate /* handling incoming RDMA */ 2767c478bd9Sstevel@tonic-gate /* RD's & Atomics */ 2777c478bd9Sstevel@tonic-gate ibt_rnr_nak_time_t rc_min_rnr_nak; /* min RNR-NAK timer */ 2787c478bd9Sstevel@tonic-gate ib_mtu_t rc_path_mtu; 2797c478bd9Sstevel@tonic-gate ibt_cep_path_t rc_path; /* primary path */ 2807c478bd9Sstevel@tonic-gate ibt_cep_path_t rc_alt_path; /* alternate path */ 2817c478bd9Sstevel@tonic-gate } ibt_qp_rc_attr_t; 2827c478bd9Sstevel@tonic-gate 2837c478bd9Sstevel@tonic-gate /* 2847c478bd9Sstevel@tonic-gate * Reserved For Future Use. 2857c478bd9Sstevel@tonic-gate * UC transport specific 2867c478bd9Sstevel@tonic-gate */ 2877c478bd9Sstevel@tonic-gate typedef struct ibt_qp_uc_attr_s { 2887c478bd9Sstevel@tonic-gate uint32_t uc_sq_psn:24; /* SQ PSN */ 2897c478bd9Sstevel@tonic-gate uint32_t uc_rq_psn:24; /* RQ PSN */ 2907c478bd9Sstevel@tonic-gate ib_qpn_t uc_dst_qpn; /* destination QPN */ 2917c478bd9Sstevel@tonic-gate ibt_cep_cmstate_t uc_mig_state; /* Channel Migration State */ 2927c478bd9Sstevel@tonic-gate ib_mtu_t uc_path_mtu; 2937c478bd9Sstevel@tonic-gate ibt_cep_path_t uc_path; /* primary path */ 2947c478bd9Sstevel@tonic-gate ibt_cep_path_t uc_alt_path; /* alternate path */ 2957c478bd9Sstevel@tonic-gate } ibt_qp_uc_attr_t; 2967c478bd9Sstevel@tonic-gate 2977c478bd9Sstevel@tonic-gate /* 2987c478bd9Sstevel@tonic-gate * Reserved For Future Use. 2997c478bd9Sstevel@tonic-gate * RD transport specific 3007c478bd9Sstevel@tonic-gate */ 3017c478bd9Sstevel@tonic-gate typedef struct ibt_qp_rd_attr_s { 3027c478bd9Sstevel@tonic-gate ib_qkey_t rd_qkey; 3037c478bd9Sstevel@tonic-gate ibt_rnr_nak_time_t rd_min_rnr_nak; /* min RNR-NAK timer */ 3047c478bd9Sstevel@tonic-gate } ibt_qp_rd_attr_t; 3057c478bd9Sstevel@tonic-gate 3067c478bd9Sstevel@tonic-gate /* UD transport specific */ 3077c478bd9Sstevel@tonic-gate typedef struct ibt_qp_ud_attr_s { 3087c478bd9Sstevel@tonic-gate ib_qkey_t ud_qkey; /* Q_Key */ 3097c478bd9Sstevel@tonic-gate uint32_t ud_sq_psn:24; /* SQ PSN */ 3107c478bd9Sstevel@tonic-gate uint16_t ud_pkey_ix; /* P_Key Index */ 3117c478bd9Sstevel@tonic-gate uint8_t ud_port; /* port */ 31203494a98SBill Taylor ibt_rss_attr_t ud_rss; /* RSS stuff */ 313*17a2b317SBill Taylor ibt_fc_attr_t ud_fc; 3147c478bd9Sstevel@tonic-gate } ibt_qp_ud_attr_t; 3157c478bd9Sstevel@tonic-gate 3167c478bd9Sstevel@tonic-gate /* 3177c478bd9Sstevel@tonic-gate * Common QP Info 3187c478bd9Sstevel@tonic-gate */ 3197c478bd9Sstevel@tonic-gate typedef struct ibt_qp_info_s { 3207c478bd9Sstevel@tonic-gate uint_t qp_sq_sz; /* SQ WQEs */ 3217c478bd9Sstevel@tonic-gate uint_t qp_rq_sz; /* RQ WQEs */ 3227c478bd9Sstevel@tonic-gate ibt_cep_state_t qp_state; /* QP state */ 3237c478bd9Sstevel@tonic-gate ibt_cep_state_t qp_current_state; /* current state for */ 3247c478bd9Sstevel@tonic-gate /* modify_qp to RTS state */ 3257c478bd9Sstevel@tonic-gate ibt_cep_flags_t qp_flags; /* QP flags */ 3267c478bd9Sstevel@tonic-gate ibt_tran_srv_t qp_trans; /* transport service type */ 3277c478bd9Sstevel@tonic-gate union { /* transport specific */ 3287c478bd9Sstevel@tonic-gate ibt_qp_rc_attr_t rc; 3297c478bd9Sstevel@tonic-gate ibt_qp_rd_attr_t rd; /* Reserved For Future Use */ 3307c478bd9Sstevel@tonic-gate ibt_qp_uc_attr_t uc; /* Reserved For Future Use */ 3317c478bd9Sstevel@tonic-gate ibt_qp_ud_attr_t ud; 3327c478bd9Sstevel@tonic-gate } qp_transport; 3337c478bd9Sstevel@tonic-gate } ibt_qp_info_t; 3347c478bd9Sstevel@tonic-gate 3357c478bd9Sstevel@tonic-gate /* 3367c478bd9Sstevel@tonic-gate * QP Query Attributes definition. 3377c478bd9Sstevel@tonic-gate */ 3387c478bd9Sstevel@tonic-gate typedef struct ibt_qp_query_attr_s { 3397c478bd9Sstevel@tonic-gate ibt_cq_hdl_t qp_sq_cq; /* SQ CQ */ 3407c478bd9Sstevel@tonic-gate ibt_cq_hdl_t qp_rq_cq; /* RQ CQ */ 3417c478bd9Sstevel@tonic-gate ibt_rdd_hdl_t qp_rdd_hdl; /* Reserved */ 3427c478bd9Sstevel@tonic-gate ib_qpn_t qp_qpn; /* QPN */ 3437c478bd9Sstevel@tonic-gate uint_t qp_sq_sgl; /* max SQ SGL */ 3447c478bd9Sstevel@tonic-gate uint_t qp_rq_sgl; /* max RQ SGL */ 3457c478bd9Sstevel@tonic-gate ibt_qp_info_t qp_info; /* Modifiable attributes */ 3467c478bd9Sstevel@tonic-gate ibt_srq_hdl_t qp_srq; /* SRQ hdl or NULL */ 3477c478bd9Sstevel@tonic-gate ibt_attr_flags_t qp_flags; 348*17a2b317SBill Taylor ibt_fexch_query_attr_t qp_query_fexch; /* FEXCH query only set */ 3497c478bd9Sstevel@tonic-gate } ibt_qp_query_attr_t; 3507c478bd9Sstevel@tonic-gate 3517c478bd9Sstevel@tonic-gate 3527c478bd9Sstevel@tonic-gate /* 3537c478bd9Sstevel@tonic-gate * Reserved For Future Use. 3547c478bd9Sstevel@tonic-gate * EEC Info. 3557c478bd9Sstevel@tonic-gate */ 3567c478bd9Sstevel@tonic-gate typedef struct ibt_eec_info_s { 3577c478bd9Sstevel@tonic-gate uint32_t eec_sq_psn:24; /* SQ PSN */ 3587c478bd9Sstevel@tonic-gate uint32_t eec_rq_psn:24; /* RQ PSN */ 3597c478bd9Sstevel@tonic-gate ib_eecn_t eec_dst_eecn; /* destination EECN */ 3607c478bd9Sstevel@tonic-gate ibt_cep_state_t eec_state; /* EEC state */ 3617c478bd9Sstevel@tonic-gate ibt_cep_cmstate_t eec_mig; /* channel migration state */ 3627c478bd9Sstevel@tonic-gate uint8_t eec_rdma_ra_out; /* RDMA-R/Atomics out */ 3637c478bd9Sstevel@tonic-gate uint8_t eec_rdma_ra_in; /* RDMA-R/Atomics in */ 3647c478bd9Sstevel@tonic-gate uint8_t eec_retry_cnt:3; 3657c478bd9Sstevel@tonic-gate ibt_rnr_retry_cnt_t eec_rnr_retry_cnt; 3667c478bd9Sstevel@tonic-gate ib_mtu_t eec_path_mtu; 3677c478bd9Sstevel@tonic-gate ibt_cep_path_t eec_prim_path; /* primary path */ 3687c478bd9Sstevel@tonic-gate ibt_cep_path_t eec_alt_path; /* alternate path */ 3697c478bd9Sstevel@tonic-gate } ibt_eec_info_t; 3707c478bd9Sstevel@tonic-gate 3717c478bd9Sstevel@tonic-gate /* 3727c478bd9Sstevel@tonic-gate * Reserved For Future Use. 3737c478bd9Sstevel@tonic-gate * EEC Query Attributes definition. 3747c478bd9Sstevel@tonic-gate */ 3757c478bd9Sstevel@tonic-gate typedef struct ibt_eec_query_attr_s { 3767c478bd9Sstevel@tonic-gate ib_eecn_t eec_eecn; /* The EEC Number */ 3777c478bd9Sstevel@tonic-gate ibt_rdd_hdl_t eec_rdd_hdl; 3787c478bd9Sstevel@tonic-gate ibt_eec_info_t eec_info; /* Modifiable attributes */ 3797c478bd9Sstevel@tonic-gate } ibt_eec_query_attr_t; 3807c478bd9Sstevel@tonic-gate 3817c478bd9Sstevel@tonic-gate 3827c478bd9Sstevel@tonic-gate #define ibt_ah_flags_t ibt_ud_dest_flags_t 3837c478bd9Sstevel@tonic-gate #define IBT_AH_NO_FLAGS IBT_UD_DEST_NO_FLAGS 3847c478bd9Sstevel@tonic-gate #define IBT_AH_USER_MAP IBT_UD_DEST_USER_MAP 3857c478bd9Sstevel@tonic-gate #define IBT_AH_DEFER_ALLOC IBT_UD_DEST_DEFER_ALLOC 3867c478bd9Sstevel@tonic-gate 387c7facc54SBill Taylor 388c7facc54SBill Taylor /* 389c7facc54SBill Taylor * ibt_hca_attr_t 390c7facc54SBill Taylor */ 391c7facc54SBill Taylor #define hca_max_rdd hca_opaque2 /* Max RDDs in HCA */ 392c7facc54SBill Taylor #define hca_max_eec hca_opaque3 /* Max EEContexts in HCA */ 393c7facc54SBill Taylor #define hca_max_rd_sgl hca_opaque4 /* Max SGL entries per RD WR */ 394c7facc54SBill Taylor #define hca_max_rdma_in_ee hca_opaque5 /* Max RDMA Reads/Atomics in */ 395c7facc54SBill Taylor /* per EEC with HCA as target */ 396c7facc54SBill Taylor #define hca_max_rdma_out_ee hca_opaque6 /* Max RDMA Reads/Atomics out */ 397c7facc54SBill Taylor /* per EE by this HCA */ 398c7facc54SBill Taylor #define hca_max_ipv6_qp hca_max_ipv6_chan 399c7facc54SBill Taylor #define hca_max_ether_qp hca_max_ether_chan 400c7facc54SBill Taylor #define hca_eec_max_ci_priv_sz hca_opaque7 401c7facc54SBill Taylor #define hca_rdd_max_ci_priv_sz hca_opaque8 402c7facc54SBill Taylor #define hca_max_map_per_fmr hca_opaque9 403c7facc54SBill Taylor 4047c478bd9Sstevel@tonic-gate #ifdef __cplusplus 4057c478bd9Sstevel@tonic-gate } 4067c478bd9Sstevel@tonic-gate #endif 4077c478bd9Sstevel@tonic-gate 4087c478bd9Sstevel@tonic-gate #endif /* _SYS_IB_IBTL_IBTL_CI_TYPES_H */ 409