1221167Sgnn/*- 2221167Sgnn * Copyright(c) 2002-2011 Exar Corp. 3221167Sgnn * All rights reserved. 4221167Sgnn * 5221167Sgnn * Redistribution and use in source and binary forms, with or without 6221167Sgnn * modification are permitted provided the following conditions are met: 7221167Sgnn * 8221167Sgnn * 1. Redistributions of source code must retain the above copyright notice, 9221167Sgnn * this list of conditions and the following disclaimer. 10221167Sgnn * 11221167Sgnn * 2. Redistributions in binary form must reproduce the above copyright 12221167Sgnn * notice, this list of conditions and the following disclaimer in the 13221167Sgnn * documentation and/or other materials provided with the distribution. 14221167Sgnn * 15221167Sgnn * 3. Neither the name of the Exar Corporation nor the names of its 16221167Sgnn * contributors may be used to endorse or promote products derived from 17221167Sgnn * this software without specific prior written permission. 18221167Sgnn * 19221167Sgnn * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20221167Sgnn * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21221167Sgnn * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22221167Sgnn * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 23221167Sgnn * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24221167Sgnn * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25221167Sgnn * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26221167Sgnn * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27221167Sgnn * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28221167Sgnn * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29221167Sgnn * POSSIBILITY OF SUCH DAMAGE. 30221167Sgnn */ 31221167Sgnn/*$FreeBSD$*/ 32221167Sgnn 33221167Sgnn#ifndef VXGE_HAL_TYPES_H 34221167Sgnn#define VXGE_HAL_TYPES_H 35221167Sgnn 36221167Sgnn__EXTERN_BEGIN_DECLS 37221167Sgnn 38221167Sgnn/* 39221167Sgnn * enum vxge_hal_reopen_e - Open, close, or reopen option. 40221167Sgnn * @VXGE_HAL_RESET_ONLY: Do not (de)allocate 41221167Sgnn * @VXGE_HAL_OPEN_NORMAL: Do (de)allocate 42221167Sgnn * 43221167Sgnn * Enumerates options used with ring, fifo, sq, srq, cqrq, dmq and umq 44221167Sgnn * open and close operations. The @VXGE_HAL_RESET_ONLY can be used when 45221167Sgnn * resetting the device; in this case there is actually no need to free 46221167Sgnn * and then again malloc the memory (including DMA-able memory). 47221167Sgnn */ 48221167Sgnntypedef enum vxge_hal_reopen_e { 49221167Sgnn VXGE_HAL_RESET_ONLY = 1, 50221167Sgnn VXGE_HAL_OPEN_NORMAL = 2 51221167Sgnn} vxge_hal_reopen_e; 52221167Sgnn 53221167Sgnn/* 54221167Sgnn * struct vxge_hal_version_t - HAL version info 55221167Sgnn * @version_major: Major version 56221167Sgnn * @version_minor: Minor version 57221167Sgnn * @version_fix: version fix 58221167Sgnn * @version_build: Version Build 59221167Sgnn * 60221167Sgnn * Structure to store version info 61221167Sgnn */ 62221167Sgnntypedef struct vxge_hal_version_t { 63221167Sgnn u32 version_major; 64221167Sgnn u32 version_minor; 65221167Sgnn u32 version_fix; 66221167Sgnn u32 version_build; 67221167Sgnn} vxge_hal_version_t; 68221167Sgnn 69221167Sgnn/* 70221167Sgnn * VXGE_HAL_ETH_ALEN 71221167Sgnn */ 72221167Sgnn#define VXGE_HAL_ETH_ALEN 6 73221167Sgnn 74221167Sgnn/* 75221167Sgnn * typedef macaddr_t - Ethernet address type 76221167Sgnn */ 77221167Sgnntypedef u8 macaddr_t[VXGE_HAL_ETH_ALEN]; 78221167Sgnn 79221167Sgnn/* 80221167Sgnn * struct vxge_hal_ipv4 - IP version 4 address type 81221167Sgnn * @addr: IP address 82221167Sgnn */ 83221167Sgnntypedef struct vxge_hal_ipv4 { 84221167Sgnn u32 addr; 85221167Sgnn} vxge_hal_ipv4; 86221167Sgnn 87221167Sgnn/* 88221167Sgnn * struct vxge_hal_ipv6 - IP version 6 address type 89221167Sgnn * @addr: IP address 90221167Sgnn */ 91221167Sgnntypedef struct vxge_hal_ipv6 { 92221167Sgnn u64 addr[2]; 93221167Sgnn} vxge_hal_ipv6; 94221167Sgnn 95221167Sgnn/* 96221167Sgnn * union vxge_hal_ipaddr_t - IP address type 97221167Sgnn * @ipv4: IP V4 address 98221167Sgnn * @ipv6: IP V6 address 99221167Sgnn */ 100221167Sgnntypedef union vxge_hal_ipaddr_t { 101221167Sgnn vxge_hal_ipv4 ipv4; 102221167Sgnn vxge_hal_ipv6 ipv6; 103221167Sgnn} vxge_hal_ipaddr_t; 104221167Sgnn 105221167Sgnn/* 106221167Sgnn * typedef vxge_hal_obj_id_t - Object Id type used for Session, 107221167Sgnn * SRQ, CQRQ, STAG, LRO, SPDM etc objects 108221167Sgnn */ 109221167Sgnntypedef u64 vxge_hal_obj_id_t; 110221167Sgnn 111221167Sgnn/* basic handles */ 112221167Sgnn 113221167Sgnn/* 114221167Sgnn * typedef vxge_hal_device_h - Handle to the adapter object 115221167Sgnn */ 116221167Sgnntypedef void *vxge_hal_device_h; 117221167Sgnn 118221167Sgnn/* 119221167Sgnn * typedef vxge_hal_vpath_h - Handle to the virtual path object returned to LL 120221167Sgnn */ 121221167Sgnntypedef void *vxge_hal_vpath_h; 122221167Sgnn 123221167Sgnn/* 124221167Sgnn * typedef vxge_hal_client_h - Handle passed by client for client's private data 125221167Sgnn */ 126221167Sgnntypedef void *vxge_hal_client_h; 127221167Sgnn 128221167Sgnn/* 129221167Sgnn * typedef vxge_hal_ring_h - Handle to the ring object used for non offload 130221167Sgnn * receive 131221167Sgnn */ 132221167Sgnntypedef void *vxge_hal_ring_h; 133221167Sgnn 134221167Sgnn/* 135221167Sgnn * typedef vxge_hal_fifo_h - Handle to the fifo object used for non offload send 136221167Sgnn */ 137221167Sgnntypedef void *vxge_hal_fifo_h; 138221167Sgnn 139221167Sgnn 140221167Sgnn/* 141221167Sgnn * typedef vxge_hal_txdl_h - Handle to the transmit desriptor list object used 142221167Sgnn * for nonoffload send 143221167Sgnn */ 144221167Sgnntypedef void *vxge_hal_txdl_h; 145221167Sgnn 146221167Sgnn/* 147221167Sgnn * typedef vxge_hal_rxd_h - Handle to the receive desriptor object used for 148221167Sgnn * nonoffload receive 149221167Sgnn */ 150221167Sgnntypedef void *vxge_hal_rxd_h; 151221167Sgnn 152221167Sgnn/* 153221167Sgnn * typedef vxge_hal_up_msg_h - Handle to the up message queue 154221167Sgnn */ 155221167Sgnntypedef void *vxge_hal_up_msg_h; 156221167Sgnn 157221167Sgnn/* 158221167Sgnn * typedef vxge_hal_down_msg_h - Handle to the down message queue 159221167Sgnn */ 160221167Sgnntypedef void *vxge_hal_down_msg_h; 161221167Sgnn 162221167Sgnn 163221167Sgnn/* 164221167Sgnn * typedef vxge_hal_callback_h - Handle to callback function 165221167Sgnn */ 166221167Sgnntypedef void *vxge_hal_callback_h; 167221167Sgnn 168221167Sgnn/* 169221167Sgnn * enum vxge_hal_message_type_e - Enumerated message types. 170221167Sgnn * 171221167Sgnn * @VXGE_HAL_MSG_TYPE_NCE_CREATE_REQ: The NCE Create Request 172221167Sgnn * message is used by the host to create an NCE on the adapter. 173221167Sgnn * @VXGE_HAL_MSG_TYPE_NCE_CREATE_RESP:The NCE Create Response 174221167Sgnn * message is sent in response to the NCE Create Request 175221167Sgnn * message from the host to indicate the status of the operation 176221167Sgnn * and return the NCE ID. 177221167Sgnn * @VXGE_HAL_MSG_TYPE_NCE_DELETE_REQ:The NCE Delete Request 178221167Sgnn * messag is sent by the host to delete an NCE after it is no 179221167Sgnn * longer required. 180221167Sgnn * @VXGE_HAL_MSG_TYPE_NCE_DELETE_RESP:The NCE Delete Response 181221167Sgnn * message is sent in response to the NCE Delete Request 182221167Sgnn * message from the host to indicate the status of the operation. 183221167Sgnn * @VXGE_HAL_MSG_TYPE_NCE_UPDATE_MAC_REQ:The NCE Update MAC Request 184221167Sgnn * message is used by the host to modify the MAC address for 185221167Sgnn * an NCE on the adapter. 186221167Sgnn * @VXGE_HAL_MSG_TYPE_NCE_UPDATE_MAC_RESP:The NCE Update MAC Response 187221167Sgnn * message is sent in response to the NCE Update MAC Request 188221167Sgnn * message from the host to indicate the status of the 189221167Sgnn * operation. 190221167Sgnn * @VXGE_HAL_MSG_TYPE_NCE_UPDATE_RCH_TIME_REQ:The NCE Update Rch Time 191221167Sgnn * Request message is used by the host to update the 192221167Sgnn * Reachability time for an NCE on the adapter. 193221167Sgnn * @VXGE_HAL_MSG_TYPE_NCE_UPDATE_RCH_TIME_RESP:The NCE Update 194221167Sgnn * Rch Time Response message is sent in response to the NCE 195221167Sgnn * Update Rch Time Request message from the host to indicate 196221167Sgnn * the status of updating the reachability time for the NCE. 197221167Sgnn * @VXGE_HAL_MSG_TYPE_NCE_QUERY_REQ:The NCE Query Request message 198221167Sgnn * is used by the host to query an NCE on the adapter. 199221167Sgnn * @VXGE_HAL_MSG_TYPE_NCE_QUERY_RESP:The NCE Query Response 200221167Sgnn * message is sent in response to the NCE Query Request message 201221167Sgnn * from the host to indicate the status of the operation. 202221167Sgnn * @VXGE_HAL_MSG_TYPE_NCE_RCH_TIME_EXCEEDED:This is an unsolicited message 203221167Sgnn * sent to the host by the adapter when the NCE Reach Time has 204221167Sgnn * been exceeded. 205221167Sgnn * @VXGE_HAL_MSG_TYPE_CQRQ_CREATE_REQ:The CQRQ Create Request 206221167Sgnn * message is used by the host to create a CQRQ on the adapter. 207221167Sgnn * @VXGE_HAL_MSG_TYPE_CQRQ_CREATE_RESP:The CQRQ Create Response 208221167Sgnn * message is sent in response to the CQRQ Create Request 209221167Sgnn * message from the host to indicate the status of the operation. 210221167Sgnn * @VXGE_HAL_MSG_TYPE_CQRQ_DELETE_REQ:The CQRQ Delete Request 211221167Sgnn * message is used by the host to destroy a CQRQ on the adapter. 212221167Sgnn * @VXGE_HAL_MSG_TYPE_CQRQ_DELETE_RESP:The CQRQ Delete Response 213221167Sgnn * message is sent in response to the CQRQ Delete Request 214221167Sgnn * message from the host to indicate the status of the operation. 215221167Sgnn * @VXGE_HAL_MSG_TYPE_CQRQ_MODIFY_REQ:The CQRQ Modify Request 216221167Sgnn * message is used by the host to modify fields for an 217221167Sgnn * CQRQ on the adapter. The adapter will make the following 218221167Sgnn * checks 219221167Sgnn * - The CQRQ ID is valid 220221167Sgnn * All other checks must be performed by the host software. 221221167Sgnn * @VXGE_HAL_MSG_TYPE_CQRQ_MODIFY_RESP:The CQRQ Modify Response 222221167Sgnn * message is sent in response to the CQRQ Modify Request 223221167Sgnn * message from the host to indicate the status of the operation. 224221167Sgnn * @VXGE_HAL_MSG_TYPE_CQRQ_QUERY_REQ:The CQRQ Query Request 225221167Sgnn * message is used by the host to query the properties of a CQRQ 226221167Sgnn * on the adapter 227221167Sgnn * @VXGE_HAL_MSG_TYPE_CQRQ_QUERY_RESP:The CQRQ Query Response 228221167Sgnn * message is sent in response to the CQRQ Query Request 229221167Sgnn * message from the host to indicate the status of the operation 230221167Sgnn * and return any CQRQ properties to the host. 231221167Sgnn * @VXGE_HAL_MSG_TYPE_CQRQ_ARM_REQ:The CQRQ Arm Request message 232221167Sgnn * is used by the host to change the armed state of a CQRQ on the 233221167Sgnn * adapter. The armed state determines how the adapter will 234221167Sgnn * interrupt the host when RDMA messages arrive. 235221167Sgnn * @VXGE_HAL_MSG_TYPE_CQRQ_ARM_RESP:The CQRQ Arm Response message 236221167Sgnn * is sent in response to the CQRQ Arm Request message from the 237221167Sgnn * host to indicate the status of arming the CQRQ 238221167Sgnn * @VXGE_HAL_MSG_TYPE_CQRQ_EVENT_NOTIF:The CQRQ Event Notification 239221167Sgnn * message is sent to host when the adapter encounters a 240221167Sgnn * problem when DMAing CQEs from host memory. There are three 241221167Sgnn * conditions, EOL, Low Threshold, Drained 242221167Sgnn * @VXGE_HAL_MSG_TYPE_CQRQ_FIRST_CQE_BW_NOTIF_REQ:The CQRQ 243221167Sgnn * First CQE BW Notification Request message is used by the 244221167Sgnn * host to notify the adapter after it has configured the first 245221167Sgnn * CQE block wrapper(s). It is required to pass the host address 246221167Sgnn * and number of bytes of the first CQE block wrapper in host 247221167Sgnn * memory. 248221167Sgnn * @VXGE_HAL_MSG_TYPE_CQRQ_FIRST_CQE_BW_NOTIF_RESP:The CQRQ 249221167Sgnn * First CQE BW Notification Response message is sent in 250221167Sgnn * response to the CQRQ First CQE BW Notification Request 251221167Sgnn * message from the host to acknowledge the notification from 252221167Sgnn * host and return the status of updating the CQRQ record with 253221167Sgnn * the address and bytes of the first CQE block wrapper. 254221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_CREATE_REQ:The SRQ Create Request 255221167Sgnn * message is used by the host to create an SRQ on the adapter. 256221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_CREATE_RESP:The SRQ Create Response 257221167Sgnn * message is sent in response to the SRQ Create Request 258221167Sgnn * message from the host to indicate the status of the operation 259221167Sgnn * and return the SRQ ID to the host. 260221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_DELETE_REQ:The SRQ Delete Request 261221167Sgnn * message is used by the host to delete an SRQ on the adapter. 262221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_DELETE_RESP:The SRQ Delete Response 263221167Sgnn * message is sent in response to the SRQ Delete Request 264221167Sgnn * message from the host to indicate the status of the operation. 265221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_MODIFY_REQ:The SRQ Modify Request 266221167Sgnn * message is used by the host to modify an SRQ on the adapter. 267221167Sgnn * The host must send down all the fields to modify. To simplify 268221167Sgnn * the adapter firmware there will be no mask to modify individual 269221167Sgnn * fields. 270221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_MODIFY_RESP:The SRQ Modify Response 271221167Sgnn * message is sent in response to the SRQ Modify Request 272221167Sgnn * message from the host to indicate the status of the operation. 273221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_QUERY_REQ:The SRQ Query Request message 274221167Sgnn * is used by the host to query the properties of an SRQ on the 275221167Sgnn * adapter. 276221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_QUERY_RESP:The SRQ Query Response 277221167Sgnn * message is sent in response to the SRQ Query Request message 278221167Sgnn * from the host to indicate the status of the operation and 279221167Sgnn * return any SRQ properties to the host 280221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_ARM_REQ:The SRQ Arm Request message is 281221167Sgnn * sent to the adapter to arm or re-arm the SRQ limit. 282221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_ARM_RESP:The SRQ Arm Response is sent 283221167Sgnn * to the host to acknowledge the SRQ Arm Request and indicate 284221167Sgnn * the status of arming or re-arming the SRQ limit. 285221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_EVENT_NOTIF:The SRQ Event Notification 286221167Sgnn * iMSG is used to alert the host that the adapter has encountered 287221167Sgnn * one of the following conditions when DMAing WQEs from host 288221167Sgnn * memory - EOL (End of list of WQEs in host memory),Low Threshold 289221167Sgnn * (The adapter is running low on available WQEs),Drained (Adapter 290221167Sgnn * out of WQEs because of EOL condition or adapter use faster than 291221167Sgnn * DMA), SRQ Limit (The number of available WQEs on adapter + host 292221167Sgnn * less than SRQ limit and the SRQ limit is armed). 293221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_FIRST_WQE_BW_NOTIF_REQ:The SRQ First 294221167Sgnn * WQE BW Notification Request is used to alert the adapter of 295221167Sgnn * the location of the first WQE block wrapper after initially 296221167Sgnn * creating the SRQ. It is required because the host cannot 297221167Sgnn * pre-post WQEs when creating the SRQ. 298221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_FIRST_WQE_BW_NOTIF_RESP:The SRQ First 299221167Sgnn * WQE BW Notification Response message is sent in response to 300221167Sgnn * the SRQ First WQE BW Notification Request message from the 301221167Sgnn * host to indicate the status of the operation. 302221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_WQE_BLOCKS_ADDED_NOTIF_REQ:The SRQ 303221167Sgnn * WQE Blocks Added Notification Request is used to alert the 304221167Sgnn * adapter that new WQEs have been posted in host memory. This is 305221167Sgnn * required in order for the adapter to support the concept of SRQ 306221167Sgnn * limit. 307221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_WQE_BLOCKS_ADDED_NOTIF_RESP:The SRQ 308221167Sgnn * WQE Blocks Added Notification Response is sent by the adapter 309221167Sgnn * in response to the SRQ WQE Blocks Added Notification Request 310221167Sgnn * to acknowledge the notification from the host and to return any 311221167Sgnn * status in the event a problem occurred. 312221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_RETURN_UNUSED_WQES_REQ:The SRQ Return WQEs 313221167Sgnn * Request message may be sent by the host to reclaim unused 314221167Sgnn * WQEs from the head of the WQE block wrapper list. Its purpose 315221167Sgnn * is to reclaim over-provisioned WQEs for an SRQ. The host may 316221167Sgnn * choose to reclaim WQEs from an SRQ at any time. 317221167Sgnn * @VXGE_HAL_MSG_TYPE_SRQ_RETURN_UNUSED_WQES_RESP:The SRQ Return WQEs 318221167Sgnn * is sent in reply to the SRQ Return WQEs Request message 319221167Sgnn * to reclaim unused WQEs from an over-provisioned SRQ. 320221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_ALLOCATE_NSMR_REQ:This downward message 321221167Sgnn * commands the adapter to create a new non-shared memory region 322221167Sgnn * (NSMR) in the invalid state. This message is used to implement 323221167Sgnn * the Allocate Non-Shared Memory Region memory management verb. 324221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_ALLOCATE_NSMR_RESP:This upward message 325221167Sgnn * communicates to the host the success or failure of the 326221167Sgnn * corresponding STAG Allocate NSMR Request message 327221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_ALLOCATE_MW_REQ:This downward message 328221167Sgnn * commands the adapter to allocate a new memory window (MW). 329221167Sgnn * This message is used to implement the Allocate Memory Window 330221167Sgnn * memory management verb. 331221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_ALLOCATE_MW_RESP:This upward message 332221167Sgnn * communicates to the host the success or failure of the 333221167Sgnn * corresponding STAG Allocate MW Request message. 334221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_DE_ALLOCATE_REQ:This downward message 335221167Sgnn * commands the adapter to deallocate the specified STag, freeing 336221167Sgnn * up any on-adapter resources 337221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_DE_ALLOCATE_RESP:This upward message 338221167Sgnn * communicates to the host the success or failure of the 339221167Sgnn * corresponding STAG De-allocate Request message. 340221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_REGISTER_NSMR_REQ:This downward message 341221167Sgnn * commands the adapter to register a non-shared memory region. 342221167Sgnn * This message is used to implement Register NSMR memory 343221167Sgnn * management verb Fast registration cannot be performed with 344221167Sgnn * this . It can only be done via the PostSQ TOWI. 345221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_REGISTER_NSMR_RESP:This upward message 346221167Sgnn * communicates to the host the success or failure of the 347221167Sgnn * corresponding STAG Register NSMR Request message. 348221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_RE_REGISTER_NSMR_REQ:This downward 349221167Sgnn * message commands the adapter to change the memory registration 350221167Sgnn * of an existing NSMR to create a new NSMR in the valid state. 351221167Sgnn * This message is used to implement the Reregister Non-Shared 352221167Sgnn * Memory Region memory management verb. 353221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_RE_REGISTER_NSMR_RESP:This upward message 354221167Sgnn * communicates to the host the success or failure of the 355221167Sgnn * corresponding STAG Re-register NSMR Request message 356221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_REGISTER_SMR_REQ:This downward message 357221167Sgnn * commands the adapter to create a shared memory region (SMR) 358221167Sgnn * based on an existing memory region, either shared(SMR) or 359221167Sgnn * non-shared(NSMR). This message is used to implement the 360221167Sgnn * Register Shared Memory Region verb. 361221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_REGISTER_SMR_RESP:This upward message 362221167Sgnn * communicates to the host the success or failure of the 363221167Sgnn * corresponding STAG Re-register NSMR Request message. 364221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_QUERY_REQ:This downward message commands 365221167Sgnn * the adapter to return the specifics of the specified STag. 366221167Sgnn * This message is used to implement the Query Memory Region 367221167Sgnn * memory management verb and the Query Memory Window memory 368221167Sgnn * management verb. Memory region and memory window querying 369221167Sgnn * could be handled entirely by the host software without any 370221167Sgnn * adapter involvement. The STAG Query Request and STAG 371221167Sgnn * Query Response messages allow the host to implement 372221167Sgnn * adapter-based STag querying. 373221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_QUERY_RESP:This upward message 374221167Sgnn * communicates to the host the specifics of the queried STag. 375221167Sgnn * The response message does not return the underlying the PBL. 376221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_VALID_LOCAL_TAG_REQ:This message 377221167Sgnn * commands the adapter to transition an invalid STag to the 378221167Sgnn * valid state without changing any of its other attributes. 379221167Sgnn * The Validate-STag-/Validate-STag-Response- messages 380221167Sgnn * allow a Neterion-proprietary ability to revalidate an invalid 381221167Sgnn * STag without changing any of its attributes or its PBL. This 382221167Sgnn * is expected to be useful in situations where an STag is 383221167Sgnn * invalidated and then revalidated with the same attributes 384221167Sgnn * including PBL. Using this message, rather than the more 385221167Sgnn * general Reregister NSMR, saves the overhead of transferring 386221167Sgnn * the PBL to the adapter. 387221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_VALID_LOCAL_TAG_RESP:This upward message 388221167Sgnn * communicates to the host the success of failure of the 389221167Sgnn * corresponding STAG Validate Local Tag Request message. 390221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_INVALID_LOCAL_TAG_REQ: The STAG 391221167Sgnn * Invalidate Local Tag Request message is used by the host to 392221167Sgnn * invalidate a local STAG. This message provides an alternative 393221167Sgnn * route for the normal TOWI based STAG Invalidation. It allows a 394221167Sgnn * kernel mode process to invalidate an STAG without writing 395221167Sgnn * a TOWI. 396221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_INVALID_LOCAL_TAG_RESP: This upward 397221167Sgnn * message communicates to the host the success or failure of the 398221167Sgnn * corresponding STAG Invalidate Local Tag Request message. 399221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_BIND_MW_REQ: This downward message commands 400221167Sgnn * the adapter to bind an existing (invalid) MW to an existing 401221167Sgnn * (valid) MR. This message provides an alternative to the TOWI 402221167Sgnn * based implementation allowing the path be used for MW binding 403221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_BIND_MW_RESP: This upward message 404221167Sgnn * communicates to the host the success or failure of the 405221167Sgnn * corresponding STAG Bind MW Request message. 406221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_FAST_REGISTER_NSMR_REQ: The STAG Fast 407221167Sgnn * Register NSMR Request provides an alternative way to fast 408221167Sgnn * register an NSMR instead of going to the TOWI path. 409221167Sgnn * @VXGE_HAL_MSG_TYPE_STAG_FAST_REGISTER_NSMR_RESP: The STag Fast 410221167Sgnn * Register NSMR Response message is sent to the host from 411221167Sgnn * the adapter in response to the original message. It 412221167Sgnn * indicates the status of fast registering the NSMR. 413221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_OPEN_REQ:The TCP Open Request message 414221167Sgnn * is sent by the host to open a TCP connection on the adapter. 415221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_OPEN_RESP:The TCP Open Response message 416221167Sgnn * is sent in response to a TCP Open Request message to indicate 417221167Sgnn * that the TCP session has been opened 418221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_PROMOTE_TO_IWARP_REQ:The TCP Promote to 419221167Sgnn * iWARP Request message is sent from the host to the adapter 420221167Sgnn * in order to migrate an existing bytestream session to iWARP 421221167Sgnn * mode. 422221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_PROMOTE_TO_IWARP_RESP:The TCP Promote to 423221167Sgnn * iWARP Response message is sent to the host to indicate the 424221167Sgnn * status of promoting an existing bytestream session to iWARP 425221167Sgnn * mode. 426221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_MODIFY_REQ:The TCP Modify Request message 427221167Sgnn * is sent by the host to modify the attributes associated with a 428221167Sgnn * bytestream or iWARP session. 429221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_MODIFY_RESP:The TCP Modify Response message 430221167Sgnn * is sent to the host in response to a TCP Modify Request message 431221167Sgnn * to indicate the status of changing the attributes associated 432221167Sgnn * with the bytestream or iWARP session. 433221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_DELETE_REQ:The TCP Delete Request 434221167Sgnn * message is sent by the host to delete a bytestream TCP session 435221167Sgnn * on the adapter. 436221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_DELETE_RESP:The TCP Delete Response 437221167Sgnn * message is sent in response to a TCP Delete Request message 438221167Sgnn * to indicate that the TCP session has been deleted. 439221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_ABORT_REQ: The TCP Abort Request message 440221167Sgnn * is used to abort a bytestream or iWARP session. 441221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_ABORT_RESP: The TCP Abort Response 442221167Sgnn * message is sent to the host from the adapter after aborting the 443221167Sgnn * bytestream or iWARP session. 444221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_ESTABLISHED: The TCP Established message is 445221167Sgnn * an un-solicited event sent from the adapter to the host when 446221167Sgnn * the SYN+ACK segment arrives (active opener) or the ACK segment 447221167Sgnn * (passive opener) arrives at the adapter. 448221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_FIN_RECEIVED: The TCP FIN Received message 449221167Sgnn * is an un-solicited event sent from the adapter to the host on 450221167Sgnn * session teardown. It indicates that the FIN segment has been 451221167Sgnn * received from the remote end and the session is now in TIME 452221167Sgnn * WAIT state. 453221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_TIME_WAIT_DONE: The TCP Time Wait Done message 454221167Sgnn * is sent from the adapter to the host to indicate when the TCP 455221167Sgnn * session leaves the TIME WAIT state. 456221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_UPDATE_RXWIN: This message is used for receive 457221167Sgnn * window updates, both for rx window flow control updates(updates 458221167Sgnn * to rcv_buf as data is consumed by the application on the host) 459221167Sgnn * and for maximum receive window size updates (when the receive 460221167Sgnn * buffer size changes on the host) 461221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_UPDATE_MSS: This is sent by the host to the 462221167Sgnn * adapter to update the MSS for the session. 463221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_UPDATE_IP_HEADER: The TCP Update IP Header 464221167Sgnn * is used to update the IP TOS and IP flow label in the IP header 465221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_UPDATE_KEEPALIVE: The TCP Update Keepalive 466221167Sgnn * message is sent from the host to the adapter to update the 467221167Sgnn * keep-alive timer for the session. 468221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_UPDATE_FAILURE: The TCP Update Failure 469221167Sgnn * message is sent to the host from the adapter in the event that 470221167Sgnn * one of the TCP update messages failed for the session. Normally 471221167Sgnn * these messages do not require a reply and therefore there is no 472221167Sgnn * response from the adapter. The TCP Update messages include: 473221167Sgnn * VXGE_HAL_MSG_TYPE_TCP_UPDATE_RXWIN 474221167Sgnn * VXGE_HAL_MSG_TYPE_TCP_UPDATE_MSS 475221167Sgnn * VXGE_HAL_MSG_TYPE_TCP_UPDATE_IP_HEADER 476221167Sgnn * VXGE_HAL_MSG_TYPE_TCP_UPDATE_KEEPALIVE 477221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_FIN_ACK_RECEIVED:The TCP FIN ACK Received 478221167Sgnn * message is an unsolicited message sent to the host from the 479221167Sgnn * adapter on received of the ACK segment acknowledging that the 480221167Sgnn * remote end has received the FIN. It is required for Sun's KPI 481221167Sgnn * interface. 482221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_RELINK_TO_NCE_REQ:The TCP Relink to NCE 483221167Sgnn * Request would be used to change the NCE entry associated 484221167Sgnn * with a particular bytestream or iWARP session. This message 485221167Sgnn * could be used to change the NCE of a group of sessions if a 486221167Sgnn * particular path went down and need to be replaced by a new path 487221167Sgnn * The host is responsible for tracking the mapping of sessions to 488221167Sgnn * NCEs so that when de-allocating an NCE it does not de-allocate 489221167Sgnn * on that is still in use by a particular session. 490221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_RELINK_TO_NCE_RESP:This message is sent in 491221167Sgnn * response to the TCP Relink to NCE Request to indicate the 492221167Sgnn * status of re-linking the TCP session to a particular NCE. 493221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_QP_LIMIT_EXCEEDED:The TCP QP Limit Exceeded 494221167Sgnn * Notification message is sent to the host when an iWARP 495221167Sgnn * session has reached its QP Limit and the QP limit was armed. 496221167Sgnn * @VXGE_HAL_MSG_TYPE_TCP_RDMA_TERMINATE_RECEIVED:The TCP RDMA Terminate 497221167Sgnn * Received message is an un-solicited event sent from the 498221167Sgnn * adapter to the host when an RDMA terminate message has been 499221167Sgnn * received from the remote end. 500221167Sgnn * @VXGE_HAL_MSG_TYPE_LRO_OPEN_REQ:The LRO Open Request message 501221167Sgnn * is sent by the host to open an LRO connection on the adapter. 502221167Sgnn * There is no PE context for an LRO session. The PE is involved 503221167Sgnn * for timer purposes and transferring messages to the RPE but it 504221167Sgnn * contains no session context. 505221167Sgnn * @VXGE_HAL_MSG_TYPE_LRO_OPEN_RESP:The LRO Open Response message 506221167Sgnn * is sent in response to a LRO Open Request message to 507221167Sgnn * indicate that the LRO session has been opened. 508221167Sgnn * @VXGE_HAL_MSG_TYPE_LRO_END_CLASSIF_REQ:The LRO End 509221167Sgnn * Classification Request is sent by the host before the LRO 510221167Sgnn * Delete Request to tell the adapter to stop steering Rx 511221167Sgnn * frames from that session into the LRO path. The host would 512221167Sgnn * later call LRO Delete Request . Separating these two calls 513221167Sgnn * allows enough time to pass so that frames already in the FB can 514221167Sgnn * be drained out, thereby avoiding the need for frame reversion. 515221167Sgnn * @VXGE_HAL_MSG_TYPE_LRO_END_CLASSIF_RESP:The LRO End 516221167Sgnn * Classification Response message is sent in response to a 517221167Sgnn * LRO End Classification Request message to indicate that 518221167Sgnn * classification has been stopped for the LRO session and the 519221167Sgnn * host can proceed with deleting the LRO session. 520221167Sgnn * @VXGE_HAL_MSG_TYPE_LRO_DELETE_REQ:The LRO Delete Request 521221167Sgnn * message is sent by the host to delete a LRO session on the 522221167Sgnn * adapter.It might be possible in the future to replace this 523221167Sgnn * message and the TCP Delete Request with a single common 524221167Sgnn * message since there doesn't seem to be any difference between 525221167Sgnn * the two anymore. 526221167Sgnn * @VXGE_HAL_MSG_TYPE_LRO_DELETE_RESP:The LRO Delete Response 527221167Sgnn * message is sent in response to a LRO Delete Request message 528221167Sgnn * to indicate that the LRO session has been deleted. 529221167Sgnn * @VXGE_HAL_MSG_TYPE_LRO_SESSION_CANDIDATE_NOTIF:This msg 530221167Sgnn * indicates to the host that the adapter's autoLRO feature has 531221167Sgnn * identified a candidate LRO session. No response from the host 532221167Sgnn * is required. (If the host did decide to act on this information 533221167Sgnn * from the adapter, the host would use the usual LRO Open Request 534221167Sgnn * ). 535221167Sgnn * @VXGE_HAL_MSG_TYPE_SPDM_OPEN_REQ:The SPDM Open Request message 536221167Sgnn * is sent by the host to open an SPDM connection on the adapter. 537221167Sgnn * There is no RPE or PE context for an SPDM session. The ONE is 538221167Sgnn * not involved in this type of classification. 539221167Sgnn * @VXGE_HAL_MSG_TYPE_SPDM_OPEN_RESP:The SPDM Open Response 540221167Sgnn * message is sent in response to a SPDM Open Request message 541221167Sgnn * to indicate the status of creating the SPDM session. 542221167Sgnn * @VXGE_HAL_MSG_TYPE_SPDM_DELETE_REQ:The SPDM Delete Request 543221167Sgnn * message is sent by the host to delete an SPDM session on the 544221167Sgnn * adapter. It might be possible in the future to replace this 545221167Sgnn * message and the LRO/TCP Delete Request with a single common 546221167Sgnn * message since there doesn't seem to be any difference between 547221167Sgnn * the two anymore. 548221167Sgnn * @VXGE_HAL_MSG_TYPE_SPDM_DELETE_RESP:The SPDM Delete Response 549221167Sgnn * message is sent in response to a SPDM Delete Request message 550221167Sgnn * to indicate that the SPDM session has been deleted. 551221167Sgnn * @VXGE_HAL_MSG_TYPE_SESSION_EVENT_NOTIF:The Session Event 552221167Sgnn * Notification message is an unsolicited message from the 553221167Sgnn * adapter used to inform the host about an unexpected condition 554221167Sgnn * on a bytestream or iWARP session. 555221167Sgnn * @VXGE_HAL_MSG_TYPE_SESSION_QUERY_REQ:The Session Query Request 556221167Sgnn * message is sent by the host to query the attributes of an 557221167Sgnn * existing offloaded session. This message may be used to query 558221167Sgnn * the attributes of an SPDM, LRO, bytestream or iWARP session. 559221167Sgnn * Initially this will be a single message used for all purposes. 560221167Sgnn * In the future this may be split up into multiple messages 561221167Sgnn * allowing the user to query the pecific context for an SPDM, 562221167Sgnn * LRO, iWARP, or bytestream session. 563221167Sgnn * @VXGE_HAL_MSG_TYPE_SESSION_QUERY_RESP:The Session Query Response 564221167Sgnn * message is sent in response to a Session Query Request 565221167Sgnn * message to return the attributes associated with the specified 566221167Sgnn * session 567221167Sgnn * @VXGE_HAL_MSG_TYPE_SESSION_RETURN_IN_PROG_WQES: This message is 568221167Sgnn * generated by the adapter during deletion of a session to return 569221167Sgnn * any WQEs that may be in the in-progress list for the session.If 570221167Sgnn * a WQE is in the in-progress list it is owned by the session and 571221167Sgnn * cannot be returned to the head of WQE list for an SRQ because 572221167Sgnn * of ordering issues. Therefore, it must be returned to the host 573221167Sgnn * at which point the host may choose to destroy the resource or 574221167Sgnn * simply re-post the WQE for re-use. 575221167Sgnn * @VXGE_HAL_MSG_TYPE_SESSION_FRAME_WRITE:The Frame Write message is 576221167Sgnn * generated by the adapter in order to send certain frames to the 577221167Sgnn * host via the path instead of the normal path. Frames will be 578221167Sgnn * sent to the host under the following conditions: 579221167Sgnn * 1) mis-aligned frames that the adapter cannot place 580221167Sgnn * 2) during debugging to look at the contents of the frame 581221167Sgnn * In addition to this,a RDMA terminate message will also be sent 582221167Sgnn * via a message but in this case it will be sent in a TCP RDMA 583221167Sgnn * Terminate Received message. Frames arriving in the will 584221167Sgnn * not have markers stripped. Instead the host will be responsible 585221167Sgnn * for stripping markers and taking appropriate action on the 586221167Sgnn * received frame. 587221167Sgnn * @VXGE_HAL_MSG_TYPE_SQ_CREATE_REQ: This is HAL private message for. 588221167Sgnn * SQ create. Never used. 589221167Sgnn * @VXGE_HAL_MSG_TYPE_SQ_CREATE_RESP: This is HAL private message 590221167Sgnn * for SQ create response. This is reported to clients by HAL. 591221167Sgnn * @VXGE_HAL_MSG_TYPE_SQ_DELETE_REQ: This is HAL private message for. 592221167Sgnn * SQ delete. Never used. 593221167Sgnn * @VXGE_HAL_MSG_TYPE_SQ_DELETE_RESP:This is HAL private message 594221167Sgnn * for SQ delete response. This is reported to clients by HAL. 595221167Sgnn * 596221167Sgnn * Message types supported by the adapter and HAL Private messages. 597221167Sgnn */ 598221167Sgnntypedef enum vxge_hal_message_type_e { 599221167Sgnn VXGE_HAL_MSG_TYPE_NCE_CREATE_REQ = 1, 600221167Sgnn VXGE_HAL_MSG_TYPE_NCE_CREATE_RESP = 2, 601221167Sgnn VXGE_HAL_MSG_TYPE_NCE_DELETE_REQ = 3, 602221167Sgnn VXGE_HAL_MSG_TYPE_NCE_DELETE_RESP = 4, 603221167Sgnn VXGE_HAL_MSG_TYPE_NCE_UPDATE_MAC_REQ = 5, 604221167Sgnn VXGE_HAL_MSG_TYPE_NCE_UPDATE_MAC_RESP = 6, 605221167Sgnn VXGE_HAL_MSG_TYPE_NCE_UPDATE_RCH_TIME_REQ = 7, 606221167Sgnn VXGE_HAL_MSG_TYPE_NCE_UPDATE_RCH_TIME_RESP = 8, 607221167Sgnn VXGE_HAL_MSG_TYPE_NCE_QUERY_REQ = 9, 608221167Sgnn VXGE_HAL_MSG_TYPE_NCE_QUERY_RESP = 10, 609221167Sgnn VXGE_HAL_MSG_TYPE_NCE_RCH_TIME_EXCEEDED = 86, 610221167Sgnn VXGE_HAL_MSG_TYPE_CQRQ_CREATE_REQ = 11, 611221167Sgnn VXGE_HAL_MSG_TYPE_CQRQ_CREATE_RESP = 12, 612221167Sgnn VXGE_HAL_MSG_TYPE_CQRQ_DELETE_REQ = 13, 613221167Sgnn VXGE_HAL_MSG_TYPE_CQRQ_DELETE_RESP = 14, 614221167Sgnn VXGE_HAL_MSG_TYPE_CQRQ_MODIFY_REQ = 16, 615221167Sgnn VXGE_HAL_MSG_TYPE_CQRQ_MODIFY_RESP = 17, 616221167Sgnn VXGE_HAL_MSG_TYPE_CQRQ_QUERY_REQ = 18, 617221167Sgnn VXGE_HAL_MSG_TYPE_CQRQ_QUERY_RESP = 19, 618221167Sgnn VXGE_HAL_MSG_TYPE_CQRQ_ARM_REQ = 20, 619221167Sgnn VXGE_HAL_MSG_TYPE_CQRQ_ARM_RESP = 21, 620221167Sgnn VXGE_HAL_MSG_TYPE_CQRQ_EVENT_NOTIF = 22, 621221167Sgnn VXGE_HAL_MSG_TYPE_CQRQ_FIRST_CQE_BW_NOTIF_REQ = 23, 622221167Sgnn VXGE_HAL_MSG_TYPE_CQRQ_FIRST_CQE_BW_NOTIF_RESP = 24, 623221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_CREATE_REQ = 27, 624221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_CREATE_RESP = 28, 625221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_DELETE_REQ = 29, 626221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_DELETE_RESP = 30, 627221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_MODIFY_REQ = 31, 628221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_MODIFY_RESP = 32, 629221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_QUERY_REQ = 33, 630221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_QUERY_RESP = 34, 631221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_ARM_REQ = 35, 632221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_ARM_RESP = 36, 633221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_EVENT_NOTIF = 37, 634221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_FIRST_WQE_BW_NOTIF_REQ = 38, 635221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_FIRST_WQE_BW_NOTIF_RESP = 39, 636221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_WQE_BLOCKS_ADDED_NOTIF_REQ = 40, 637221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_WQE_BLOCKS_ADDED_NOTIF_RESP = 41, 638221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_RETURN_UNUSED_WQES_REQ = 96, 639221167Sgnn VXGE_HAL_MSG_TYPE_SRQ_RETURN_UNUSED_WQES_RESP = 42, 640221167Sgnn VXGE_HAL_MSG_TYPE_STAG_ALLOCATE_NSMR_REQ = 43, 641221167Sgnn VXGE_HAL_MSG_TYPE_STAG_ALLOCATE_NSMR_RESP = 44, 642221167Sgnn VXGE_HAL_MSG_TYPE_STAG_ALLOCATE_MW_REQ = 45, 643221167Sgnn VXGE_HAL_MSG_TYPE_STAG_ALLOCATE_MW_RESP = 46, 644221167Sgnn VXGE_HAL_MSG_TYPE_STAG_DE_ALLOCATE_REQ = 47, 645221167Sgnn VXGE_HAL_MSG_TYPE_STAG_DE_ALLOCATE_RESP = 48, 646221167Sgnn VXGE_HAL_MSG_TYPE_STAG_REGISTER_NSMR_REQ = 49, 647221167Sgnn VXGE_HAL_MSG_TYPE_STAG_REGISTER_NSMR_RESP = 50, 648221167Sgnn VXGE_HAL_MSG_TYPE_STAG_RE_REGISTER_NSMR_REQ = 51, 649221167Sgnn VXGE_HAL_MSG_TYPE_STAG_RE_REGISTER_NSMR_RESP = 52, 650221167Sgnn VXGE_HAL_MSG_TYPE_STAG_REGISTER_SMR_REQ = 53, 651221167Sgnn VXGE_HAL_MSG_TYPE_STAG_REGISTER_SMR_RESP = 54, 652221167Sgnn VXGE_HAL_MSG_TYPE_STAG_QUERY_REQ = 55, 653221167Sgnn VXGE_HAL_MSG_TYPE_STAG_QUERY_RESP = 56, 654221167Sgnn VXGE_HAL_MSG_TYPE_STAG_VALID_LOCAL_TAG_REQ = 57, 655221167Sgnn VXGE_HAL_MSG_TYPE_STAG_VALID_LOCAL_TAG_RESP = 58, 656221167Sgnn VXGE_HAL_MSG_TYPE_STAG_INVALID_LOCAL_TAG_REQ = 87, 657221167Sgnn VXGE_HAL_MSG_TYPE_STAG_INVALID_LOCAL_TAG_RESP = 88, 658221167Sgnn VXGE_HAL_MSG_TYPE_STAG_BIND_MW_REQ = 89, 659221167Sgnn VXGE_HAL_MSG_TYPE_STAG_BIND_MW_RESP = 90, 660221167Sgnn VXGE_HAL_MSG_TYPE_STAG_FAST_REGISTER_NSMR_REQ = 91, 661221167Sgnn VXGE_HAL_MSG_TYPE_STAG_FAST_REGISTER_NSMR_RESP = 92, 662221167Sgnn VXGE_HAL_MSG_TYPE_TCP_OPEN_REQ = 59, 663221167Sgnn VXGE_HAL_MSG_TYPE_TCP_OPEN_RESP = 60, 664221167Sgnn VXGE_HAL_MSG_TYPE_TCP_PROMOTE_TO_IWARP_REQ = 61, 665221167Sgnn VXGE_HAL_MSG_TYPE_TCP_PROMOTE_TO_IWARP_RESP = 62, 666221167Sgnn VXGE_HAL_MSG_TYPE_TCP_MODIFY_REQ = 98, 667221167Sgnn VXGE_HAL_MSG_TYPE_TCP_MODIFY_RESP = 99, 668221167Sgnn VXGE_HAL_MSG_TYPE_TCP_DELETE_REQ = 63, 669221167Sgnn VXGE_HAL_MSG_TYPE_TCP_DELETE_RESP = 64, 670221167Sgnn VXGE_HAL_MSG_TYPE_TCP_ABORT_REQ = 65, 671221167Sgnn VXGE_HAL_MSG_TYPE_TCP_ABORT_RESP = 66, 672221167Sgnn VXGE_HAL_MSG_TYPE_TCP_ESTABLISHED = 78, 673221167Sgnn VXGE_HAL_MSG_TYPE_TCP_FIN_RECEIVED = 79, 674221167Sgnn VXGE_HAL_MSG_TYPE_TCP_TIME_WAIT_DONE = 80, 675221167Sgnn VXGE_HAL_MSG_TYPE_TCP_UPDATE_RXWIN = 81, 676221167Sgnn VXGE_HAL_MSG_TYPE_TCP_UPDATE_MSS = 82, 677221167Sgnn VXGE_HAL_MSG_TYPE_TCP_UPDATE_IP_HEADER = 83, 678221167Sgnn VXGE_HAL_MSG_TYPE_TCP_UPDATE_KEEPALIVE = 84, 679221167Sgnn VXGE_HAL_MSG_TYPE_TCP_UPDATE_FAILURE = 85, 680221167Sgnn VXGE_HAL_MSG_TYPE_TCP_FIN_ACK_RECEIVED = 87, 681221167Sgnn VXGE_HAL_MSG_TYPE_TCP_RELINK_TO_NCE_REQ = 88, 682221167Sgnn VXGE_HAL_MSG_TYPE_TCP_RELINK_TO_NCE_RESP = 89, 683221167Sgnn VXGE_HAL_MSG_TYPE_TCP_QP_LIMIT_EXCEEDED = 100, 684221167Sgnn VXGE_HAL_MSG_TYPE_TCP_RDMA_TERMINATE_RECEIVED = 101, 685221167Sgnn VXGE_HAL_MSG_TYPE_LRO_OPEN_REQ = 67, 686221167Sgnn VXGE_HAL_MSG_TYPE_LRO_OPEN_RESP = 68, 687221167Sgnn VXGE_HAL_MSG_TYPE_LRO_END_CLASSIF_REQ = 69, 688221167Sgnn VXGE_HAL_MSG_TYPE_LRO_END_CLASSIF_RESP = 70, 689221167Sgnn VXGE_HAL_MSG_TYPE_LRO_DELETE_REQ = 71, 690221167Sgnn VXGE_HAL_MSG_TYPE_LRO_DELETE_RESP = 72, 691221167Sgnn VXGE_HAL_MSG_TYPE_LRO_SESSION_CANDIDATE_NOTIF = 73, 692221167Sgnn VXGE_HAL_MSG_TYPE_SPDM_OPEN_REQ = 74, 693221167Sgnn VXGE_HAL_MSG_TYPE_SPDM_OPEN_RESP = 75, 694221167Sgnn VXGE_HAL_MSG_TYPE_SPDM_DELETE_REQ = 76, 695221167Sgnn VXGE_HAL_MSG_TYPE_SPDM_DELETE_RESP = 77, 696221167Sgnn VXGE_HAL_MSG_TYPE_SESSION_EVENT_NOTIF = 102, 697221167Sgnn VXGE_HAL_MSG_TYPE_SESSION_QUERY_REQ = 103, 698221167Sgnn VXGE_HAL_MSG_TYPE_SESSION_QUERY_RESP = 104, 699221167Sgnn VXGE_HAL_MSG_TYPE_SESSION_RETURN_IN_PROG_WQES = 97, 700221167Sgnn VXGE_HAL_MSG_TYPE_SESSION_FRAME_WRITE = 105, 701221167Sgnn /* The following are private for HAL */ 702221167Sgnn VXGE_HAL_MSG_TYPE_SQ_CREATE_REQ = 65537, 703221167Sgnn VXGE_HAL_MSG_TYPE_SQ_CREATE_RESP = 65538, 704221167Sgnn VXGE_HAL_MSG_TYPE_SQ_DELETE_REQ = 65539, 705221167Sgnn VXGE_HAL_MSG_TYPE_SQ_DELETE_RESP = 65540 706221167Sgnn} vxge_hal_message_type_e; 707221167Sgnn 708221167Sgnn 709221167Sgnn/* 710221167Sgnn * struct vxge_hal_opaque_handle_t - Opaque handle used by the hal and clients 711221167Sgnn * to save their contexts 712221167Sgnn * @vpath_handle: Virtual path handle 713221167Sgnn * @hal_priv: Private data which HAL assigns 714221167Sgnn * @client_priv: Client assigned private data 715221167Sgnn * 716221167Sgnn * This structure is used to store the client and hal data and pass as 717221167Sgnn * opaque handle in the messages. 718221167Sgnn */ 719221167Sgnntypedef struct vxge_hal_opaque_handle_t { 720221167Sgnn vxge_hal_vpath_h vpath_handle; 721221167Sgnn#define VXGE_HAL_OPAQUE_HANDLE_GET_VPATH_HANDLE(op) ((op)->vpath_handle) 722221167Sgnn#define VXGE_HAL_OPAQUE_HANDLE_VPATH_HANDLE(op, vrh) (op)->vpath_handle = vrh 723221167Sgnn 724221167Sgnn u64 hal_priv; 725221167Sgnn#define VXGE_HAL_OPAQUE_HANDLE_GET_HAL_PRIV(op) ((op)->hal_priv) 726221167Sgnn#define VXGE_HAL_OPAQUE_HANDLE_HAL_PRIV(op, priv) (op)->hal_priv = (u64)priv 727221167Sgnn 728221167Sgnn u64 client_priv; 729221167Sgnn#define VXGE_HAL_OPAQUE_HANDLE_GET_CLIENT_PRIV(op) ((op)->client_priv) 730221167Sgnn#define VXGE_HAL_OPAQUE_HANDLE_CLIENT_PRIV(op, priv) \ 731221167Sgnn (op)->client_priv = (u64)priv 732221167Sgnn 733221167Sgnn} vxge_hal_opaque_handle_t; 734221167Sgnn 735221167Sgnn/* 736221167Sgnn * vxge_hal_vpath_callback_f - Callback to receive up messages. 737221167Sgnn * @client_handle: handle passed by client in attach or open function 738221167Sgnn * @msgh: Message handle. 739221167Sgnn * @msg_type: Type of message 740221167Sgnn * @obj_id: Object Id of object to which message belongs 741221167Sgnn * @result: Result code 742221167Sgnn * @opaque_handle: Opaque handle passed when the request was made. 743221167Sgnn * 744221167Sgnn * Callback function registered when opening vpath to receive the messages 745221167Sgnn * This callback function passed to vxge_hal_vpath_open and 746221167Sgnn * vxge_hal_vpath_attach routine to get replys to all asynchronous functions. 747221167Sgnn * The format of the reply is a message along with the parameters that are 748221167Sgnn * common fro all replys. The message handle passed to this callback is 749221167Sgnn * opaque for the iWARP/RDMA module and the information from the message can 750221167Sgnn * be got by calling appropriate get function depending on the message type 751221167Sgnn * passed as one of the parameter to the callback. The message types that 752221167Sgnn * are to be passed to the callback are the ones that are responses and 753221167Sgnn * notifications 754221167Sgnn */ 755221167Sgnntypedef vxge_hal_status_e(*vxge_hal_vpath_callback_f) ( 756221167Sgnn vxge_hal_client_h client_handle, 757221167Sgnn vxge_hal_up_msg_h msgh, 758221167Sgnn vxge_hal_message_type_e msg_type, 759221167Sgnn vxge_hal_obj_id_t obj_id, 760221167Sgnn vxge_hal_status_e result, 761221167Sgnn vxge_hal_opaque_handle_t *opaque_handle); 762221167Sgnn 763221167Sgnn 764221167Sgnn__EXTERN_END_DECLS 765221167Sgnn 766221167Sgnn#endif /* VXGE_HAL_TYPES_H */ 767