|
Packit |
857059 |
/* BEGIN_ICS_COPYRIGHT2 ****************************************
|
|
Packit |
857059 |
|
|
Packit |
857059 |
Copyright (c) 2015-2017, Intel Corporation
|
|
Packit |
857059 |
|
|
Packit |
857059 |
Redistribution and use in source and binary forms, with or without
|
|
Packit |
857059 |
modification, are permitted provided that the following conditions are met:
|
|
Packit |
857059 |
|
|
Packit |
857059 |
* Redistributions of source code must retain the above copyright notice,
|
|
Packit |
857059 |
this list of conditions and the following disclaimer.
|
|
Packit |
857059 |
* Redistributions in binary form must reproduce the above copyright
|
|
Packit |
857059 |
notice, this list of conditions and the following disclaimer in the
|
|
Packit |
857059 |
documentation and/or other materials provided with the distribution.
|
|
Packit |
857059 |
* Neither the name of Intel Corporation nor the names of its contributors
|
|
Packit |
857059 |
may be used to endorse or promote products derived from this software
|
|
Packit |
857059 |
without specific prior written permission.
|
|
Packit |
857059 |
|
|
Packit |
857059 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
Packit |
857059 |
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Packit |
857059 |
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
Packit |
857059 |
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
Packit |
857059 |
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
Packit |
857059 |
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
Packit |
857059 |
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
Packit |
857059 |
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
Packit |
857059 |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Packit |
857059 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit |
857059 |
|
|
Packit |
857059 |
** END_ICS_COPYRIGHT2 ****************************************/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* [ICS VERSION STRING: unknown] */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#ifndef _IBA_UMADT_H_
|
|
Packit |
857059 |
#define _IBA_UMADT_H_
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#include <iba/public/datatypes.h>
|
|
Packit |
857059 |
#include <iba/stl_types.h>
|
|
Packit |
857059 |
#include <iba/stl_mad_priv.h>
|
|
Packit |
857059 |
#include <iba/stl_sa_priv.h>
|
|
Packit |
857059 |
#include <iba/vpi.h>
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#if defined (__cplusplus)
|
|
Packit |
857059 |
extern "C" {
|
|
Packit |
857059 |
#endif
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#define SEND_COMPLETION 1
|
|
Packit |
857059 |
#define RECV_COMPLETION 2
|
|
Packit |
857059 |
#define EVENT_COMPLETION 4
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* Typedefs */
|
|
Packit |
857059 |
typedef void* MADT_HANDLE;
|
|
Packit |
857059 |
/*DataStructures */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* ClassId is used to select between SMI and GSI as well as selecting
|
|
Packit |
857059 |
* which unsolicited inbound packets the consumer desires.
|
|
Packit |
857059 |
* For SMI, ClassId can be MCLASS_SM_LID_ROUTED or MCLASS_SM_DIRECTED_ROUTE
|
|
Packit |
857059 |
* either can receive SMI packets regardless of actual ClassId of packet
|
|
Packit |
857059 |
* This helps to reduce complexity in SM's using this interface
|
|
Packit |
857059 |
* Any other ClassId will register for the GSI interface
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* The ClassId only affects inbound packets. The registration can be used
|
|
Packit |
857059 |
* to send any request packet in any class and corresponding responses
|
|
Packit |
857059 |
* (with same transaction id) will be returned to the sender.
|
|
Packit |
857059 |
* If registered for an SMI ClassId, all sends will be via QP0, if
|
|
Packit |
857059 |
* registered for a GSI ClassId all sends will be via the GSI QP.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Unsolicited packets will be delivered based on their Method and R bit fields
|
|
Packit |
857059 |
* and the "is" flags below will select which packets a given consumer desires.
|
|
Packit |
857059 |
* A given unsolicited packet can be delivered to more than 1 consumer.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* A given registration is for a single local port, all sends and receives
|
|
Packit |
857059 |
* will be directed to that port.
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
typedef struct RegisterClassStruct_ {
|
|
Packit |
857059 |
EUI64 PortGuid; /* PortGuid of local port */
|
|
Packit |
857059 |
/* controls for unsolicited inbound packets */
|
|
Packit |
857059 |
uint8 ClassId; /* Mgmt Class ID */
|
|
Packit |
857059 |
uint8 ClassVersion; /* Mgmt Class version */
|
|
Packit |
857059 |
boolean isResponder; /* True if this is a GSI Agent */
|
|
Packit |
857059 |
boolean isTrapProcessor; /* True if GSI Trap msgs are handled */
|
|
Packit |
857059 |
boolean isReportProcessor; /* True if GSI Report msgs are handled */
|
|
Packit |
857059 |
/* queue sizing and management */
|
|
Packit |
857059 |
uint32 SendQueueSize; /* SendQueueSize */
|
|
Packit |
857059 |
uint32 RecvQueueSize; /* Receive Queue Size */
|
|
Packit |
857059 |
boolean NotifySendCompletion; /* Notification for send completion */
|
|
Packit |
857059 |
} RegisterClassStruct, *PRegisterClassStruct;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef struct MadtStruct_ {
|
|
Packit |
857059 |
struct MadtStruct_ *FLink; /* Forward link */
|
|
Packit |
857059 |
struct MadtStruct_ *BLink; /* Backward link */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* Consumer context pointer (undefined on Receives) */
|
|
Packit |
857059 |
uint64 Context;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
IB_GRH Grh; /* GRH */
|
|
Packit |
857059 |
MAD IBMad; /* Management Data Gram */
|
|
Packit |
857059 |
uint32 MadByteCount; /* Used size of IBMad in bytes */
|
|
Packit |
857059 |
/* When zero indicates MAD_BLOCK_SIZE */
|
|
Packit |
857059 |
} MadtStruct;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef struct MadAddrStruct_ {
|
|
Packit |
857059 |
STL_LID DestLid; /* DLID */
|
|
Packit |
857059 |
IB_PATHBITS PathBits; /* PathBits */
|
|
Packit |
857059 |
uint8 StaticRate; /* The maximum static rate supported */
|
|
Packit |
857059 |
/* enum IB_STATIC_RATE */
|
|
Packit |
857059 |
union AddrType_ {
|
|
Packit |
857059 |
struct Smi_ {
|
|
Packit |
857059 |
STL_LID SourceLid; /* SLID */
|
|
Packit |
857059 |
uint8 PortNumber; /* Incomming PortNumber */
|
|
Packit |
857059 |
/* Returned on RecvCompletion */
|
|
Packit |
857059 |
/* not required for Sends */
|
|
Packit |
857059 |
}Smi;
|
|
Packit |
857059 |
struct Gsi_ {
|
|
Packit |
857059 |
uint32 RemoteQpNumber; /* RemoteQpNumber */
|
|
Packit |
857059 |
uint32 RemoteQkey; /* RemoteQkey */
|
|
Packit |
857059 |
IB_P_KEY PKey; /* Pkey for Send WQE */
|
|
Packit |
857059 |
/* and Recv CQE */
|
|
Packit |
857059 |
IB_SL ServiceLevel;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* Global routing information. */
|
|
Packit |
857059 |
/* If GlobalRoute==true, GlobalRouteInfo structure is valid. */
|
|
Packit |
857059 |
boolean GlobalRoute;
|
|
Packit |
857059 |
IB_GLOBAL_ROUTE_INFO GRHInfo;
|
|
Packit |
857059 |
}Gsi;
|
|
Packit |
857059 |
}AddrType;
|
|
Packit |
857059 |
}MadAddrStruct;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef struct MadWorkCompletion_ {
|
|
Packit |
857059 |
|
|
Packit |
857059 |
MadAddrStruct AddressInfo;
|
|
Packit |
857059 |
/* Completion Information */
|
|
Packit |
857059 |
uint32 RecvByteCount; /* Received Byte count */
|
|
Packit |
857059 |
FSTATUS Status; /*Status of this packet */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
} MadWorkCompletion;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef struct MadtEventRecordStruct_ {
|
|
Packit |
857059 |
uint32 ResourceType;
|
|
Packit |
857059 |
uint32 EventOrError;
|
|
Packit |
857059 |
}MadtEventRecordStruct;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* Function prototypes */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* Register
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* DESCRIPTION :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This routine registers an agent or a manager with the associated QP. The
|
|
Packit |
857059 |
* returned MADT_HANDLE is later used to send and receive MAD's.
|
|
Packit |
857059 |
* This routine may be expected to perform a kernel mode context switch
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* PARAMETERS :
|
|
Packit |
857059 |
* INPUTS :
|
|
Packit |
857059 |
* registerStruct : Data related to agent or manager being registered
|
|
Packit |
857059 |
* data pointed to only used during duration of call
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* serviceHandle : The handle to the newly registered Agent
|
|
Packit |
857059 |
* or Manager
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FSUCCESS : Operation was successful
|
|
Packit |
857059 |
* FINVALID_PARAMETER : Invalid argumetns
|
|
Packit |
857059 |
* FINSUFFICIENT_RESOURCES : Insufficient resource
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Environment : User Mode
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NOTES:
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS (UMADT_REGISTER)(
|
|
Packit |
857059 |
IN struct RegisterClassStruct_ *registerStruct,
|
|
Packit |
857059 |
OUT MADT_HANDLE *serviceHandle
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API UMADT_REGISTER iba_umadt_register;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* GetSendMad
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* DESCRIPTION :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This routine gets a MAD from the global MAD Pool which is a shared
|
|
Packit |
857059 |
* memory between provider and the proxy driver. The returned MAD is
|
|
Packit |
857059 |
* filled with data and is used in PostSend call.
|
|
Packit |
857059 |
* This routine will not perform a kernel mode context switch.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* PARAMETERS :
|
|
Packit |
857059 |
* INPUTS :
|
|
Packit |
857059 |
* serviceHandle : The handle got in Register Call
|
|
Packit |
857059 |
* madCount : Count of number of mads to return
|
|
Packit |
857059 |
* data pointed to only used during duration of call
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* madCount : Count of number of mads returned
|
|
Packit |
857059 |
* mad : Returns pointer to MadtStruct
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FSUCCESS : Operation was successful
|
|
Packit |
857059 |
* FINVALID_PARAMETER : Invalid argumetns
|
|
Packit |
857059 |
* FUNAVAILABLE : SendMad unavailable
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Environment : User Mode
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NOTES:
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS (UMADT_GETSENDMAD)(
|
|
Packit |
857059 |
IN MADT_HANDLE serviceHandle,
|
|
Packit |
857059 |
IN OUT uint32 *madCount,
|
|
Packit |
857059 |
OUT MadtStruct ** mad
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API UMADT_GETSENDMAD iba_umadt_get_sendmad;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* ReleaseSendMad
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* DESCRIPTION :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This routine puts back mads to the global mad pool.
|
|
Packit |
857059 |
* This routine will not perform a kernel mode context switch.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* PARAMETERS :
|
|
Packit |
857059 |
* INPUTS :
|
|
Packit |
857059 |
* serviceHandle : The handle got in Register Call
|
|
Packit |
857059 |
* mad : Pointer to MadtStruct
|
|
Packit |
857059 |
* data pointed to only used during duration of call
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* None
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FSUCCESS : Operation was successful
|
|
Packit |
857059 |
* FINVALID_PARAMETER : Invalid argumetns
|
|
Packit |
857059 |
* Environment : User Mode
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NOTES:
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS (UMADT_RELEASESENDMAD)(
|
|
Packit |
857059 |
IN MADT_HANDLE serviceHandle,
|
|
Packit |
857059 |
IN MadtStruct *mad
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API UMADT_RELEASESENDMAD iba_umadt_release_sendmad;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* ReleaseRecvMad
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* DESCRIPTION :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This routine puts back mads to the global receive mad pool.
|
|
Packit |
857059 |
* This routine will not perform a kernel mode context switch.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* PARAMETERS :
|
|
Packit |
857059 |
* INPUTS :
|
|
Packit |
857059 |
* serviceHandle : The handle got in Register Call
|
|
Packit |
857059 |
* mad : Pointer to MadtStruct
|
|
Packit |
857059 |
* data pointed to only used during duration of call
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* None
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FSUCCESS : Operation was successful
|
|
Packit |
857059 |
* FINVALID_PARAMETER : Invalid argumetns
|
|
Packit |
857059 |
* Environment : User Mode
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NOTES:
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS (UMADT_RELEASERECVMAD)(
|
|
Packit |
857059 |
IN MADT_HANDLE serviceHandle,
|
|
Packit |
857059 |
IN MadtStruct *mad
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API UMADT_RELEASERECVMAD iba_umadt_release_recvmad;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* PostSend
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* DESCRIPTION :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This routine sends a management datatgram out on the wire.
|
|
Packit |
857059 |
* This routine may perform a kernel mode context switch.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* PARAMETERS :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS
|
|
Packit |
857059 |
* serviceHandle : The handle got in Register Call
|
|
Packit |
857059 |
* mad : MAD info
|
|
Packit |
857059 |
* data pointed to only used during duration of call
|
|
Packit |
857059 |
* destAddr : MadAddrStruct info
|
|
Packit |
857059 |
* data pointed to only used during duration of call
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* None
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FSUCCESS : Operation was successful
|
|
Packit |
857059 |
* FINVALID_PARAMETER : Invalid argumetns
|
|
Packit |
857059 |
* FERROR : Error while posting
|
|
Packit |
857059 |
* FINSUFFICIENT_RESOURCES : Insufficient resource
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Environment : User Mode
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NOTES:
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS (UMADT_POSTSEND)(
|
|
Packit |
857059 |
IN MADT_HANDLE serviceHandle,
|
|
Packit |
857059 |
IN MadtStruct *mad,
|
|
Packit |
857059 |
IN MadAddrStruct *destAddr
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API UMADT_POSTSEND iba_umadt_post_send;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* PostRecv
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* DESCRIPTION :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This routine informs the kernen mode component to post additional receive
|
|
Packit |
857059 |
* buffers on the Queue pair described by the service handle
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This routine may perform a kernel mode context switch.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* PARAMETERS :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS
|
|
Packit |
857059 |
* serviceHandle : The handle got in Register Call
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* None
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FSUCCESS : Operation was successful
|
|
Packit |
857059 |
* FINVALID_PARAMETER : Invalid argumetns
|
|
Packit |
857059 |
* FERROR : Error while posting
|
|
Packit |
857059 |
* FINSUFFICIENT_RESOURCES : Insufficient resource
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Environment : User Mode
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NOTES:
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS (UMADT_POSTRECV)(
|
|
Packit |
857059 |
IN MADT_HANDLE serviceHandle
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API UMADT_POSTRECV iba_umadt_post_recv;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* PollForSendCompletion
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* DESCRIPTION :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This routine polls for any send completion mads.
|
|
Packit |
857059 |
* This routine will not perform a kernel mode context switch.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* PARAMETERS :
|
|
Packit |
857059 |
* INPUTS :
|
|
Packit |
857059 |
* serviceHandle : The handle got in Register Call
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* mad : MAD info
|
|
Packit |
857059 |
* destAddr : MadAddrStruct info
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FSUCCESS : Operation was successful
|
|
Packit |
857059 |
* FINVALID_PARAMETER : Invalid arguments
|
|
Packit |
857059 |
* FNOT_FOUND : No more to packets
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Environment : User Mode
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NOTES:
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS (UMADT_POLLFORSENDCOMPLETION)(
|
|
Packit |
857059 |
IN MADT_HANDLE serviceHandle,
|
|
Packit |
857059 |
OUT MadtStruct **mad,
|
|
Packit |
857059 |
OUT MadWorkCompletion **ppWorkCompInfo
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API UMADT_POLLFORSENDCOMPLETION iba_umadt_poll_send_compl;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* PollForRecvCompletion
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* DESCRIPTION :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This routine polls and gets the receive completion mads.
|
|
Packit |
857059 |
* This routine will not perform a kernel mode context switch.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* PARAMETERS :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS :
|
|
Packit |
857059 |
* serviceHandle : The handle got in Register Call
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* mad : MAD info
|
|
Packit |
857059 |
* destAddr : MadAddrStruct info
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FSUCCESS : Operation was successful
|
|
Packit |
857059 |
* FINVALID_PARAMETER : Invalid argumetns
|
|
Packit |
857059 |
* FNOT_FOUND : No more to packets
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Environment : User Mode
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NOTES:
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS (UMADT_POLLFORRECVCOMPLETION)(
|
|
Packit |
857059 |
IN MADT_HANDLE serviceHandle,
|
|
Packit |
857059 |
OUT MadtStruct **mad,
|
|
Packit |
857059 |
OUT MadWorkCompletion **ppWorkCompInfo
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API UMADT_POLLFORRECVCOMPLETION iba_umadt_poll_recv_compl;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* PollForEvent
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* DESCRIPTION :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This routine gets the eventrecord
|
|
Packit |
857059 |
* This routine will not perform a kernel mode context switch.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* PARAMETERS :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS :
|
|
Packit |
857059 |
* serviceHandle : The handle got in Register Call
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* eventRecord : MadtEventRecordStruct
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FSUCCESS : Operation was successful
|
|
Packit |
857059 |
* FINVALID_PARAMETER : Invalid argumetns
|
|
Packit |
857059 |
* FNOT_FOUND : No more to packets
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Environment : User Mode
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NOTES:
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS (UMADT_POLLFOREVENT)(
|
|
Packit |
857059 |
IN MADT_HANDLE serviceHandle,
|
|
Packit |
857059 |
OUT MadtEventRecordStruct *eventRecord
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
/* not yet implemented */
|
|
Packit |
857059 |
IBA_API UMADT_POLLFOREVENT iba_umadt_poll_event;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* WaitForAnyCompletion
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* DESCRIPTION :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Blocks on an OS sync objects until a completion event occurs.
|
|
Packit |
857059 |
* This routine will not perform a kernel mode context switch.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* PARAMETERS :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* INPUTS :
|
|
Packit |
857059 |
* serviceHandle : The handle got in Register Call
|
|
Packit |
857059 |
* completionType : Bit map identifying the set of completion to wait on
|
|
Packit |
857059 |
* timeout : Time in ms to wait for an event
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* None
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FSUCCESS : Operation was successful
|
|
Packit |
857059 |
* FTIMEOUT : Operation timedout
|
|
Packit |
857059 |
* FNOT_DONE : Operation terminated by signal
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Environment : User Mode
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NOTES:
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS (UMADT_WAITFORANYCOMPLETION)(
|
|
Packit |
857059 |
IN MADT_HANDLE serviceHandle,
|
|
Packit |
857059 |
IN uint32 completionType,
|
|
Packit |
857059 |
IN uint32 timeout
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API UMADT_WAITFORANYCOMPLETION iba_umadt_wait_any_compl;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* QueryOsSyncObject
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* DESCRIPTION :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This routine Queries the OS Specific synchronization object.
|
|
Packit |
857059 |
* This routine will not perform a kernel mode context switch.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* PARAMETERS :
|
|
Packit |
857059 |
* INPUTS :
|
|
Packit |
857059 |
* serviceHandle : The handle got in Register Call
|
|
Packit |
857059 |
* completionType : Bit map identifies the wait object to retrive
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* syncType : Type of OS specific sync object
|
|
Packit |
857059 |
* syncObject : OS specific sync object
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FSUCCESS : Operation was successful
|
|
Packit |
857059 |
* FINVALID_PARAMETER : Invalid argumetns
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Environment : User Mode
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NOTES:
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS (UMADT_QUERYOSSYNCOBJECT)(
|
|
Packit |
857059 |
IN MADT_HANDLE serviceHandle,
|
|
Packit |
857059 |
IN uint32 CompletionType,
|
|
Packit |
857059 |
OUT uint32 SyncType,
|
|
Packit |
857059 |
OUT void * syncObject
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
/* not yet implemented */
|
|
Packit |
857059 |
IBA_API UMADT_QUERYOSSYNCOBJECT iba_umadt_query_sync_object;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* Deregister
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* DESCRIPTION :
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This routine deregisters an agent or a manager associated with the
|
|
Packit |
857059 |
* service handle.
|
|
Packit |
857059 |
* This routine may be expected to perform a kernel mode context switch
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* PARAMETERS :
|
|
Packit |
857059 |
* INPUTS :
|
|
Packit |
857059 |
* serviceHandle : The handle got in Register Call
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* OUTPUTS:
|
|
Packit |
857059 |
* None
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* RETURNS:
|
|
Packit |
857059 |
* FSUCCESS : Operation was successful
|
|
Packit |
857059 |
* FINVALID_PARAMETER : Invalid argumetns
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* Environment : User Mode
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* NOTES:
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef
|
|
Packit |
857059 |
FSTATUS (UMADT_DEREGISTER)(
|
|
Packit |
857059 |
IN MADT_HANDLE serviceHandle
|
|
Packit |
857059 |
);
|
|
Packit |
857059 |
IBA_API UMADT_DEREGISTER iba_umadt_deregister;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
static __inline void
|
|
Packit |
857059 |
GetSmiAddrFromPath( IN const IB_PATH_RECORD *pPathRecord,
|
|
Packit |
857059 |
OUT MadAddrStruct *pAddrInfo
|
|
Packit |
857059 |
)
|
|
Packit |
857059 |
{
|
|
Packit |
857059 |
pAddrInfo->DestLid = pPathRecord->DLID;
|
|
Packit |
857059 |
pAddrInfo->PathBits = (uint8)(pPathRecord->SLID & IB_PATHBITS_MASK);
|
|
Packit |
857059 |
pAddrInfo->StaticRate = pPathRecord->Rate;
|
|
Packit |
857059 |
pAddrInfo->AddrType.Smi.SourceLid = pPathRecord->SLID;
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
static __inline void
|
|
Packit |
857059 |
GetGsiAddrFromPath( IN const IB_PATH_RECORD *pPathRecord,
|
|
Packit |
857059 |
IN uint32 RemoteQPN,
|
|
Packit |
857059 |
IN IB_Q_KEY RemoteQkey,
|
|
Packit |
857059 |
OUT MadAddrStruct *pAddrInfo
|
|
Packit |
857059 |
)
|
|
Packit |
857059 |
{
|
|
Packit |
857059 |
pAddrInfo->DestLid = pPathRecord->DLID;
|
|
Packit |
857059 |
pAddrInfo->PathBits = (uint8)(pPathRecord->SLID & IB_PATHBITS_MASK);
|
|
Packit |
857059 |
pAddrInfo->StaticRate = pPathRecord->Rate;
|
|
Packit |
857059 |
pAddrInfo->AddrType.Gsi.RemoteQpNumber = RemoteQPN;
|
|
Packit |
857059 |
pAddrInfo->AddrType.Gsi.RemoteQkey= RemoteQkey;
|
|
Packit |
857059 |
pAddrInfo->AddrType.Gsi.ServiceLevel = pPathRecord->u2.s.SL;
|
|
Packit |
857059 |
pAddrInfo->AddrType.Gsi.PKey = pPathRecord->P_Key;
|
|
Packit |
857059 |
pAddrInfo->AddrType.Gsi.GlobalRoute = (pPathRecord->u1.s.HopLimit > 1);
|
|
Packit |
857059 |
pAddrInfo->AddrType.Gsi.GRHInfo.DestGID = pPathRecord->DGID;
|
|
Packit |
857059 |
pAddrInfo->AddrType.Gsi.GRHInfo.FlowLabel = pPathRecord->u1.s.FlowLabel;
|
|
Packit |
857059 |
pAddrInfo->AddrType.Gsi.GRHInfo.HopLimit = (uint8)pPathRecord->u1.s.HopLimit;
|
|
Packit |
857059 |
pAddrInfo->AddrType.Gsi.GRHInfo.SrcGIDIndex = 0; /* BUGBUG assume 0 */
|
|
Packit |
857059 |
pAddrInfo->AddrType.Gsi.GRHInfo.TrafficClass = pPathRecord->TClass;
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#if defined (__cplusplus)
|
|
Packit |
857059 |
};
|
|
Packit |
857059 |
#endif
|
|
Packit |
857059 |
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#endif /* _IBA_UMADT_H_ */
|