|
Packit |
5ea288 |
/* BEGIN_ICS_COPYRIGHT1 ****************************************
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
Copyright (c) 2015-2017, Intel Corporation
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
Redistribution and use in source and binary forms, with or without
|
|
Packit |
5ea288 |
modification, are permitted provided that the following conditions are met:
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
* Redistributions of source code must retain the above copyright notice,
|
|
Packit |
5ea288 |
this list of conditions and the following disclaimer.
|
|
Packit |
5ea288 |
* Redistributions in binary form must reproduce the above copyright
|
|
Packit |
5ea288 |
notice, this list of conditions and the following disclaimer in the
|
|
Packit |
5ea288 |
documentation and/or other materials provided with the distribution.
|
|
Packit |
5ea288 |
* Neither the name of Intel Corporation nor the names of its contributors
|
|
Packit |
5ea288 |
may be used to endorse or promote products derived from this software
|
|
Packit |
5ea288 |
without specific prior written permission.
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
Packit |
5ea288 |
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Packit |
5ea288 |
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
Packit |
5ea288 |
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
Packit |
5ea288 |
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
Packit |
5ea288 |
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
Packit |
5ea288 |
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
Packit |
5ea288 |
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
Packit |
5ea288 |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Packit |
5ea288 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
** END_ICS_COPYRIGHT1 ****************************************/
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/* [ICS VERSION STRING: unknown] */
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
#ifndef __IBA_IB_SMI_H__
|
|
Packit |
5ea288 |
#define __IBA_IB_SMI_H__ (1)
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
#if defined(VXWORKS)
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/* kernel mode SMI Interfaces */
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
#include <iba/vpi.h>
|
|
Packit |
5ea288 |
#include "iba/stl_types.h"
|
|
Packit |
5ea288 |
#include "iba/stl_sm_types.h"
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
#if defined (__cplusplus)
|
|
Packit |
5ea288 |
extern "C" {
|
|
Packit |
5ea288 |
#endif
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* Defines
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* Interface Definitions
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* The SM is a trusted client and the only client to the SMA.
|
|
Packit |
5ea288 |
* Since the data and structures maintained by SMA may be of interest
|
|
Packit |
5ea288 |
* to the SM and most times be duplicated, it may be desirable to share
|
|
Packit |
5ea288 |
* as much common info as possible between the two modules.
|
|
Packit |
5ea288 |
* The use of SMA_OBJECT helps attain this goal. Only those values that
|
|
Packit |
5ea288 |
* are of use to the SM are exposed, keeping the rest as private to SMA
|
|
Packit |
5ea288 |
* and opaque to SM.
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* Per Port definitions
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
typedef struct _SMA_PORT_BLOCK {
|
|
Packit |
5ea288 |
EUI64 GUID; /* Port GUID */
|
|
Packit |
5ea288 |
uint8 PortNumber;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
uint8 NumPKeys; /* Number of Pkeys in the Pkey table */
|
|
Packit |
5ea288 |
uint8 NumGIDs; /* Number of GIDs in the GID table */
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
IB_PORT_STATE State;
|
|
Packit |
5ea288 |
IB_PORT_ADDRESS Address; /* Port addressing info */
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
#if 0
|
|
Packit |
5ea288 |
/* these are not used */
|
|
Packit |
5ea288 |
/* Sma */
|
|
Packit |
5ea288 |
IB_HANDLE QpHandle;
|
|
Packit |
5ea288 |
uint32 SendQDepth; /* Maximum outstanding WRs permitted */
|
|
Packit |
5ea288 |
/* on the SendQ of the QP */
|
|
Packit |
5ea288 |
uint32 RecvQDepth; /* Maximum outstanding WRs permitted */
|
|
Packit |
5ea288 |
/* on the RecvQ */
|
|
Packit |
5ea288 |
#endif
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
} SMA_PORT_BLOCK;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* An array of ports based on number of ports
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
typedef struct _SMA_PORT_TABLE {
|
|
Packit |
5ea288 |
SMA_PORT_BLOCK PortBlock[1];
|
|
Packit |
5ea288 |
} SMA_PORT_TABLE;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/* Per Channel Adapter List */
|
|
Packit |
5ea288 |
typedef struct _SMA_CA_OBJECT {
|
|
Packit |
5ea288 |
/* */
|
|
Packit |
5ea288 |
/* Ca Specifics */
|
|
Packit |
5ea288 |
/* */
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
EUI64 CaGuid; /* Node GUID */
|
|
Packit |
5ea288 |
void *SmaCaContext; /* Context that uniquely identifies a CA */
|
|
Packit |
5ea288 |
uint32 Ports; /* Number of ports on this CA */
|
|
Packit |
5ea288 |
IB_CA_CAPABILITIES Capabilities; /* Capabilities of this CA */
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
SMA_PORT_TABLE *PortTbl;
|
|
Packit |
5ea288 |
} SMA_CA_OBJECT;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
typedef struct _SMA_CA_TABLE {
|
|
Packit |
5ea288 |
SMA_CA_OBJECT CaObj[1]; /* An array of Ca structures */
|
|
Packit |
5ea288 |
} SMA_CA_TABLE;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/* Sma data structure information */
|
|
Packit |
5ea288 |
typedef struct _SMA_OBJECT {
|
|
Packit |
5ea288 |
uint32 NumCa; /* Total CA's known */
|
|
Packit |
5ea288 |
SMA_CA_TABLE *CaTbl; /* Pointer to LList of CA structures */
|
|
Packit |
5ea288 |
} SMA_OBJECT;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/* All Send/Recvs use this block */
|
|
Packit |
5ea288 |
typedef struct _SMP_BLOCK {
|
|
Packit |
5ea288 |
void *Next; /* pointers maintained exclusively by SMA */
|
|
Packit |
5ea288 |
void *Prev; /* pointers maintained exclusively by SMA */
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
FSTATUS Status;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
void *pSendContext;
|
|
Packit |
5ea288 |
void *SmaCaContext; /* Context that identifies CA */
|
|
Packit |
5ea288 |
uint8 PortNumber;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
uint32 SmpByteCount; /* Used size of *Smp in bytes */
|
|
Packit |
5ea288 |
/* When zero indicates MAD_BLOCK_SIZE */
|
|
Packit |
5ea288 |
uint32 RecvByteCount; /* Total size of receive completion */
|
|
Packit |
5ea288 |
void *Smp; /* Pointer to SMP/MAD */
|
|
Packit |
5ea288 |
STL_LID DLID; /* destination LID */
|
|
Packit |
5ea288 |
STL_LID SLID; /* source LID */
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
IB_PATHBITS PathBits; /* path bits */
|
|
Packit |
5ea288 |
uint8 StaticRate; /* enum IB_STATIC_RATE */
|
|
Packit |
5ea288 |
IB_SL ServiceLevel;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
IB_GRH *Grh; /* Pointer to GRH */
|
|
Packit |
5ea288 |
} SMP_BLOCK;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* Callback definitions
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* SM_RCV_CALLBACK
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* The receive callback that will be invoked for SMP's received.
|
|
Packit |
5ea288 |
* There may be more than one receives in the list. The SM should
|
|
Packit |
5ea288 |
* lookup the list till a NULL pointer is obtained on search of
|
|
Packit |
5ea288 |
* the link list.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* INPUTS:
|
|
Packit |
5ea288 |
* Context -user's context supplied during SmaOpen()
|
|
Packit |
5ea288 |
* SmpBlockList -List of SMP's received.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* OUTPUTS:
|
|
Packit |
5ea288 |
* None
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* RETURNS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
typedef
|
|
Packit |
5ea288 |
void (SM_RCV_CALLBACK)(
|
|
Packit |
5ea288 |
IN void *Context,
|
|
Packit |
5ea288 |
IN SMP_BLOCK *SmpBlockList
|
|
Packit |
5ea288 |
);
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* SM_POST_CALLBACK
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* The Post callback that will be called on all successful posts. The
|
|
Packit |
5ea288 |
* callback will pass back the user's context and a list of SMP's that
|
|
Packit |
5ea288 |
* were previously posted.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* The callback is registered with SMA during SmaPostSend()
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* INPUTS:
|
|
Packit |
5ea288 |
* PostContext -user's context supplied during the post.
|
|
Packit |
5ea288 |
* SmpBlockList -List of SMP's posted.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* OUTPUTS:
|
|
Packit |
5ea288 |
* None
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* RETURNS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
typedef
|
|
Packit |
5ea288 |
void (SM_POST_CALLBACK)(
|
|
Packit |
5ea288 |
IN void *PostContext,
|
|
Packit |
5ea288 |
IN SMP_BLOCK *SmpBlockList
|
|
Packit |
5ea288 |
);
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
typedef enum _SMA_EVENT {
|
|
Packit |
5ea288 |
EVENT_PORT,
|
|
Packit |
5ea288 |
EVENT_CA,
|
|
Packit |
5ea288 |
EVENT_SEND_ERROR
|
|
Packit |
5ea288 |
/*EVENT_RECV_ERROR */
|
|
Packit |
5ea288 |
} SMA_EVENT;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* SM_EVENT_CALLBACK
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* The Event callback that will be called for any events generated as
|
|
Packit |
5ea288 |
* listed in SMA_EVENT. The callback will specify the type of event
|
|
Packit |
5ea288 |
* and cause with optional paramaters.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* INPUTS:
|
|
Packit |
5ea288 |
* EventCode -The type of event as listed in SMA_EVENT
|
|
Packit |
5ea288 |
* Cause -The cause can point out to a port number or SMP_BLOCK
|
|
Packit |
5ea288 |
* data pointed to only valid during duration of call
|
|
Packit |
5ea288 |
* Context -If a post error, the user's context supplied during
|
|
Packit |
5ea288 |
* the post.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* OUTPUTS:
|
|
Packit |
5ea288 |
* None
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* RETURNS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
typedef
|
|
Packit |
5ea288 |
void (SM_EVENT_CALLBACK)(
|
|
Packit |
5ea288 |
IN SMA_EVENT EventCode, /* event that occured */
|
|
Packit |
5ea288 |
IN void *Cause, /* cause; can be Smp_block/port no */
|
|
Packit |
5ea288 |
IN void *Context /* if PostSend */
|
|
Packit |
5ea288 |
);
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* Interface API's
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* SmaOpen
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* Returns a pointer to an Object that refereces the SMA structures.
|
|
Packit |
5ea288 |
* The structures should be referenced as read-only.
|
|
Packit |
5ea288 |
* The SM can use the handles of CA/QP/CQ's for its own usage if required.
|
|
Packit |
5ea288 |
* No tracking of resources will be done if Handles are used.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* INPUTS:
|
|
Packit |
5ea288 |
* RcvCallback -Callback to be invoked if SMP's are received.
|
|
Packit |
5ea288 |
* PostCallback -Callback to be invoked on completion of SMP's posted.
|
|
Packit |
5ea288 |
* EventCallback -Event callback for all events.
|
|
Packit |
5ea288 |
* Context -User's Global context supplied back in Event callback
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* OUTPUTS:
|
|
Packit |
5ea288 |
* SmObject -A pointer to an Object that references into the
|
|
Packit |
5ea288 |
* SMA structures.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* RETURNS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
typedef FSTATUS
|
|
Packit |
5ea288 |
(SMA_OPEN)(
|
|
Packit |
5ea288 |
IN SM_RCV_CALLBACK *RcvCallback,
|
|
Packit |
5ea288 |
/* IN SM_POST_CALLBACK *PostCallback, */
|
|
Packit |
5ea288 |
IN SM_EVENT_CALLBACK *EventCallback,
|
|
Packit |
5ea288 |
IN void *Context,
|
|
Packit |
5ea288 |
OUT SMA_OBJECT **SmObject
|
|
Packit |
5ea288 |
);
|
|
Packit |
5ea288 |
IBA_API SMA_OPEN iba_smi_open;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* SmaClose
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* Dereferences usage of the SMA used previously by SmaOpen().
|
|
Packit |
5ea288 |
* No tracking of resources will be done if Handles are used.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* INPUTS:
|
|
Packit |
5ea288 |
* SmObject -Object returned in the Open call.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* OUTPUTS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* RETURNS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
typedef FSTATUS
|
|
Packit |
5ea288 |
(SMA_CLOSE)(
|
|
Packit |
5ea288 |
IN SMA_OBJECT *SmObject
|
|
Packit |
5ea288 |
);
|
|
Packit |
5ea288 |
IBA_API SMA_CLOSE iba_smi_close;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* SmaPostSend
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* All SMPs are sent out by the SM with this call. The caller can send one
|
|
Packit |
5ea288 |
* to many SMPs by listing each SMP through a linked list of SMP_BLOCKs.
|
|
Packit |
5ea288 |
* The user will specify the total SMPs contained in the list.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* INPUTS:
|
|
Packit |
5ea288 |
* SmObject -Object returned in the Open call.
|
|
Packit |
5ea288 |
* NumSmps -Number of SMPs in the list
|
|
Packit |
5ea288 |
* SmpBlockList -Linked list of send requests contained in SMP_BLOCKs
|
|
Packit |
5ea288 |
* PostCallback -A callback for SMPs Posted through SmpBlockList
|
|
Packit |
5ea288 |
* PostContext -user context that will be passed back on a post callback
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* OUTPUTS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* RETURNS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
typedef FSTATUS
|
|
Packit |
5ea288 |
(SMA_POST_SEND)(
|
|
Packit |
5ea288 |
IN SMA_OBJECT *SmObject,
|
|
Packit |
5ea288 |
IN uint32 NumSmps,
|
|
Packit |
5ea288 |
IN SMP_BLOCK *SmpBlockList,
|
|
Packit |
5ea288 |
IN SM_POST_CALLBACK *PostCallback,
|
|
Packit |
5ea288 |
IN void *PostContext
|
|
Packit |
5ea288 |
);
|
|
Packit |
5ea288 |
IBA_API SMA_POST_SEND iba_smi_post_send;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* SmaPostRecv
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* The caller can notify the SMA to recieve these many requests on this port.
|
|
Packit |
5ea288 |
* If the caller is expecting a known number of replies/receives, it should
|
|
Packit |
5ea288 |
* inform the SMA in advance to queue additional receives so as not to drop
|
|
Packit |
5ea288 |
* them. This call does not gaurantee that the SMA will not drop all
|
|
Packit |
5ea288 |
* incoming requests. However, it can help the SMA decide the traffic
|
|
Packit |
5ea288 |
* on this port.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* INPUTS:
|
|
Packit |
5ea288 |
* SmObject -Object returned in the Open call.
|
|
Packit |
5ea288 |
* SmacaContext -Context to Channel Adapter to post receives on
|
|
Packit |
5ea288 |
* PortNumber -Incoming Port on Channel Adapter.
|
|
Packit |
5ea288 |
* NumSmps -Number of Smps that the caller is expecting on port
|
|
Packit |
5ea288 |
* specified.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* OUTPUTS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* RETURNS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
typedef FSTATUS
|
|
Packit |
5ea288 |
(SMA_POST_RECV)(
|
|
Packit |
5ea288 |
IN SMA_OBJECT *SmObject,
|
|
Packit |
5ea288 |
IN void *SmaCaContext,
|
|
Packit |
5ea288 |
IN uint8 PortNumber,
|
|
Packit |
5ea288 |
IN uint32 NumSmps
|
|
Packit |
5ea288 |
);
|
|
Packit |
5ea288 |
IBA_API SMA_POST_RECV iba_smi_post_recv;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* SmaRecv
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* Returns any SMPs received. If the call is successful, the NumSmps will
|
|
Packit |
5ea288 |
* indicate the number of SMPS received and the SmpBlockList will hold
|
|
Packit |
5ea288 |
* a list of SmpBlocks received.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* INPUTS:
|
|
Packit |
5ea288 |
* SmObject -Object returned in the Open call.
|
|
Packit |
5ea288 |
* NumSmps -Number of SMPs received.
|
|
Packit |
5ea288 |
* SmpBlockList -A Linked list of receives with specific information.
|
|
Packit |
5ea288 |
* The list contains individual SMP_BLOCKs and the
|
|
Packit |
5ea288 |
* elements in list is indicated by NumSmps.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* OUTPUTS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* RETURNS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
typedef FSTATUS
|
|
Packit |
5ea288 |
(SMA_RECV)(
|
|
Packit |
5ea288 |
IN SMA_OBJECT *SmObject,
|
|
Packit |
5ea288 |
IN uint32 *NumSmps,
|
|
Packit |
5ea288 |
OUT SMP_BLOCK **SmpBlockList
|
|
Packit |
5ea288 |
);
|
|
Packit |
5ea288 |
IBA_API SMA_RECV iba_smi_recv;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* Common buffer calls for Smp's on requested Hca
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* Usage:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* The SMA allocates all SMP buffers for sends and receives. Since these buffers
|
|
Packit |
5ea288 |
* are of a constant size (MAD size), allocation size is known at all times and hence
|
|
Packit |
5ea288 |
* not specified in calls.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* The following rules apply for all SMP buffer usage:
|
|
Packit |
5ea288 |
* * Cut down the requirements on system memory is reduced by half as there is no
|
|
Packit |
5ea288 |
* copy administered between Sends and Receives. The same SMP buffers are
|
|
Packit |
5ea288 |
* passed to/from the hardware. All SMP buffers come from registered memory.
|
|
Packit |
5ea288 |
* * The buffers are not tied down to a particular Channel Adapter. Hence they can
|
|
Packit |
5ea288 |
* be sent to or received from any CA. The memory registration is taken care of
|
|
Packit |
5ea288 |
* by the SMA.
|
|
Packit |
5ea288 |
* * The buffers are not required to be maintained by the Subnet Manager. All
|
|
Packit |
5ea288 |
* tracking is done by the SMA.
|
|
Packit |
5ea288 |
* * Once a buffer is submitted by a SmaPost or SmaSetLocal call to the SMA, it
|
|
Packit |
5ea288 |
* will be not returned back.
|
|
Packit |
5ea288 |
* * There is no rule maintained as to the order of these buffers. The Subnet Manager
|
|
Packit |
5ea288 |
* cannot except the same buffers to be passed in by the SMA.
|
|
Packit |
5ea288 |
* * All buffers allocated and returned through any send/receive calls hold the same
|
|
Packit |
5ea288 |
* size and is equal to the size of a MAD structure of 256 bytes.
|
|
Packit |
5ea288 |
* * A buffer once allocated from pool can be rturned back to pool by SmaPost() and
|
|
Packit |
5ea288 |
* SmaReturnToPool().
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* SmaGrabFromPool
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* The SM can request registered memory from the SMA using this call. This memory can
|
|
Packit |
5ea288 |
* be then used to send Smp's. All memory received from this call will be in Smp sizes.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* INPUTS:
|
|
Packit |
5ea288 |
* SmObject -Object returned in the Open call.
|
|
Packit |
5ea288 |
* NumSmps -Number of blocks of memory that the caller wants in SMP sizes.
|
|
Packit |
5ea288 |
* SmpBlockList -A pointer to hold the SMPs requested.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* OUTPUTS:
|
|
Packit |
5ea288 |
* NumSmps -Number of blocks of memory allocated.
|
|
Packit |
5ea288 |
* SmpBlockList -Pointer filled with the first SMP_BLOCK entry that contains
|
|
Packit |
5ea288 |
* the linked list of SMA_BLOCKs allocated.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* RETURNS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
typedef FSTATUS
|
|
Packit |
5ea288 |
(SMA_GRAB_FROM_POOL)(
|
|
Packit |
5ea288 |
IN SMA_OBJECT *SmObject,
|
|
Packit |
5ea288 |
IN OUT uint32 *NumSmps,
|
|
Packit |
5ea288 |
OUT SMP_BLOCK **SmpBlockList
|
|
Packit |
5ea288 |
);
|
|
Packit |
5ea288 |
IBA_API SMA_GRAB_FROM_POOL iba_smi_pool_get;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* SmaReturnToPool
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* The caller can release memory back to the SMA using this call.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* INPUTS:
|
|
Packit |
5ea288 |
* SmObject -Object returned in the Open call.
|
|
Packit |
5ea288 |
* SmpBlockList -A pointer to the linked list of SMA_BLOCKs to be freed.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* OUTPUTS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* RETURNS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
typedef FSTATUS
|
|
Packit |
5ea288 |
(SMA_RETURN_TO_POOL)(
|
|
Packit |
5ea288 |
IN SMA_OBJECT *SmObject,
|
|
Packit |
5ea288 |
IN SMP_BLOCK *SmpBlockList
|
|
Packit |
5ea288 |
);
|
|
Packit |
5ea288 |
IBA_API SMA_RETURN_TO_POOL iba_smi_pool_put;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
/*
|
|
Packit |
5ea288 |
* SmaUpdateInfo
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* The caller uses this function to update the SMA_OBJECT to reflect any
|
|
Packit |
5ea288 |
* changes to Channel adapters and their states. The call is done
|
|
Packit |
5ea288 |
* immedeatly after an state change event is received by the caller.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* INPUTS:
|
|
Packit |
5ea288 |
* SmObject -Object returned in the Open call.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* OUTPUTS:
|
|
Packit |
5ea288 |
* SmObject -Updated Object information.
|
|
Packit |
5ea288 |
* Event -Update information based on this event.
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
* RETURNS:
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*
|
|
Packit |
5ea288 |
*/
|
|
Packit |
5ea288 |
typedef FSTATUS
|
|
Packit |
5ea288 |
(SMA_UPDATE_INFO)(
|
|
Packit |
5ea288 |
IN OUT SMA_OBJECT *SmObject
|
|
Packit |
5ea288 |
/*IN SMA_EVENT_TYPE Event */
|
|
Packit |
5ea288 |
);
|
|
Packit |
5ea288 |
IBA_API SMA_UPDATE_INFO iba_smi_update_info;
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
#if defined (__cplusplus)
|
|
Packit |
5ea288 |
};
|
|
Packit |
5ea288 |
#endif
|
|
Packit |
5ea288 |
|
|
Packit |
5ea288 |
#endif /* VXWORKS */
|
|
Packit |
5ea288 |
#endif /* __IBA_IB_SMI_H__ */
|