Generated from osm_madw.h with ROBODoc vunknown on Wed Aug 07 15:31:43 2002

TABLE OF CONTENTS

  1. OpenSM: MAD Wrapper/osm_bind_info_t
  2. OpenSM/MAD Wrapper
  3. OpenSM: MAD Wrapper/osm_ni_context_t
  4. OpenSM: MAD Wrapper/osm_pi_context_t
  5. OpenSM: MAD Wrapper/osm_nd_context_t
  6. OpenSM: MAD Wrapper/osm_si_context_t
  7. OpenSM: MAD Wrapper/osm_madw_context_t
  8. OpenSM: MAD Wrapper/osm_bind_info_t
  9. OpenSM: MAD Wrapper/osm_madw_t
  10. OpenSM: MAD Wrapper/osm_madw_construct
  11. OpenSM: MAD Wrapper/osm_madw_destroy
  12. OpenSM: MAD Wrapper/osm_madw_init
  13. OpenSM: MAD Wrapper/osm_madw_get_smp_ptr
  14. OpenSM: MAD Wrapper/osm_madw_get_sa_mad_ptr
  15. OpenSM: MAD Wrapper/osm_madw_get_ni_context_ptr
  16. OpenSM: MAD Wrapper/osm_madw_get_pi_context_ptr
  17. OpenSM: MAD Wrapper/osm_madw_get_nd_context_ptr
  18. OpenSM: MAD Wrapper/osm_madw_get_si_context_ptr
  19. OpenSM: MAD Wrapper/osm_madw_get_vend_ptr
  20. OpenSM: MAD Wrapper/osm_madw_get_vend_ptr
  21. OpenSM: MAD Wrapper/osm_madw_get_mad_addr_ptr
  22. OpenSM: MAD Wrapper/osm_madw_get_mad_addr_ptr
  23. OpenSM: MAD Wrapper/osm_madw_set_mad
  24. OpenSM: MAD Wrapper/osm_madw_copy_context

OpenSM: MAD Wrapper/osm_bind_info_t

NAME
   osm_bind_info_t

DESCRIPTION
SYNOPSIS
typedef struct _osm_bind_info
{
    ib_net64_t      port_guid;
    uint8_t         mad_class;
    uint8_t         class_version;
    boolean_t       is_responder;
    boolean_t       is_trap_processor;
    boolean_t       is_report_processor;
    uint32_t        send_q_size;
    uint32_t        recv_q_size;

} osm_bind_info_t;

FIELDS
   portguid
      PortGuid of local port 

   class
      Mgmt Class ID 

   class_version
         Mgmt Class version

    is_responder
        True if this is a GSI Agent

    is_trap_processor
        True if GSI Trap msgs are handled
    
    is_report_processo
        True if GSI Report msgs are handled

    send_q_size
        SendQueueSize

    recv_q_size
        Receive Queue Size
 
SEE ALSO

OpenSM/MAD Wrapper

NAME
    MAD Wrapper

DESCRIPTION
    The MAD Wrapper object encapsulates the information needed by the
    OpenSM to manage individual MADs.  The OpenSM allocates one MAD Wrapper
    per MAD.

    The MAD Wrapper is not thread safe, thus callers must provide
    serialization.

    This object should be treated as opaque and should be
    manipulated only through the provided functions.

AUTHOR
    Steve King, Intel


OpenSM: MAD Wrapper/osm_ni_context_t

NAME
    osm_ni_context_t

DESCRIPTION
    Context needed by recipient of NodeInfo attribute.

SYNOPSIS
typedef struct _osm_ni_context
{
    ib_net64_t          node_guid;
    uint8_t             port_num;

} osm_ni_context_t;

FIELDS
    p_node
        Pointer to the node thru which we got to this node.

    p_sw
        Pointer to the switch object (if any) of the switch
        thru which we got to this node.

    port_num
        Port number on the node or switch thru which we got
        to this node.
 
SEE ALSO

OpenSM: MAD Wrapper/osm_pi_context_t

NAME
    osm_pi_context_t

DESCRIPTION
    Context needed by recipient of PortInfo attribute.

SYNOPSIS
typedef struct _osm_pi_context
{
    ib_net64_t          node_guid;
    ib_net64_t          port_guid;
    boolean_t           set_method;

} osm_pi_context_t;

OpenSM: MAD Wrapper/osm_nd_context_t

NAME
    osm_nd_context_t

DESCRIPTION
    Context needed by recipient of NodeDescription attribute.

SYNOPSIS
typedef struct _osm_nd_context
{
    ib_net64_t          node_guid;

} osm_nd_context_t;

OpenSM: MAD Wrapper/osm_si_context_t

NAME
    osm_si_context_t

DESCRIPTION
    Context needed by recipient of SwitchInfo attribute.

SYNOPSIS
typedef struct _osm_si_context
{
    ib_net64_t          node_guid;
    boolean_t           set_method;

} osm_si_context_t;

OpenSM: MAD Wrapper/osm_madw_context_t

NAME
    osm_madw_context_t

DESCRIPTION
    Context needed by recipients of MAD responses.

SYNOPSIS
typedef union _osm_madw_context
{
    osm_ni_context_t        ni_context;
    osm_pi_context_t        pi_context;
    osm_nd_context_t        nd_context;
    osm_si_context_t        si_context;

} osm_madw_context_t;

OpenSM: MAD Wrapper/osm_bind_info_t

NAME
   osm_bind_info_t

DESCRIPTION
SYNOPSIS
typedef struct _osm_mad_addr
{
    ib_net16_t  dest_lid;
    uint8_t     path_bits;
    uint8_t     static_rate;

    union addr_type
    {
        struct _smi
        {
            ib_net16_t      source_lid;    
            uint8_t         port_num;       
        } smi;

        struct _gsi
        {
            ib_net32_t          remote_qp;          
            ib_net32_t          remote_qkey;       
            ib_net16_t          pkey;
            uint8_t             service_level;          
            boolean_t           global_route;
            //GlobalRouteInfo   grh_info;
        } gsi;
    } addr_type;

} osm_mad_addr_t;


FIELDS
SEE ALSO


OpenSM: MAD Wrapper/osm_madw_t

NAME
    osm_madw_t

DESCRIPTION
    Context needed for processing individual MADs

SYNOPSIS
typedef struct _osm_madw
{
    cl_pool_item_t                  pool_item;
    osm_bind_handle_t               h_bind;
    osm_vend_wrap_t                 vend_wrap;
    osm_mad_addr_t                  mad_addr;
    osm_bind_info_t                 bind_info;
    osm_madw_context_t              context;
    uint32_t                        mad_size;
    ib_api_status_t                 status;
    cl_disp_msgid_t                 fail_msg;
    const ib_mad_t                  *p_mad;

} osm_madw_t;

FIELDS
    pool_item
        List linkage for pools and lists.  MUST BE FIRST MEMBER!

    h_bind
        Bind handle for the port on which this MAD will be sent
        or was received.

    vend_wrap
        Transport vendor specific context.  This structure is not
        used outside MAD transport vendor specific code.

    context
        Union of controller specific contexts needed for this MAD.
        This structure allows controllers to indirectly communicate
        with each other through the dispatcher.

    mad_size
        Size of this MAD in bytes.

    status
        Status of completed operation on the MAD.
        CL_SUCCESS if the operation was successful.

    fail_msg
        Dispatcher message with which to post this MAD on failure.
        This value is set by the originator of the MAD.
        If an operation on this MAD fails, for example due to a timeout,
        then the transport layer will dispose of the MAD by sending
        it through the Dispatcher with this message type.  Presumably,
        there is a controller listening for the failure message that can
        properly clean up.

    p_mad
        Pointer to the wire MAD.  The MAD itself cannot be part of the
        wrapper, since wire MADs typically reside in special memory
        registered with the local HCA.

SEE ALSO

OpenSM: MAD Wrapper/osm_madw_construct

NAME
    osm_madw_construct

DESCRIPTION
    This function constructs a MAD Wrapper object.

SYNOPSIS
 void
osm_madw_construct(
    IN osm_madw_t* const p_madw );
PARAMETERS
    p_madw
        [in] Pointer to a MAD Wrapper object to construct.

RETURN VALUE
    This function does not return a value.

NOTES
    Allows calling osm_madw_init, osm_madw_destroy

    Calling osm_madw_construct is a prerequisite to calling any other
    method except osm_madw_init.

SEE ALSO
    MAD Wrapper object, osm_madw_init, osm_madw_destroy

OpenSM: MAD Wrapper/osm_madw_destroy

NAME
    osm_madw_destroy

DESCRIPTION
    The osm_madw_destroy function destroys a node, releasing
    all resources.

SYNOPSIS
void osm_madw_destroy(
    IN osm_madw_t* const p_madw );

PARAMETERS
    p_madw
        [in] Pointer to a MAD Wrapper object to destroy.

RETURN VALUE
    This function does not return a value.

NOTES
    Performs any necessary cleanup of the specified MAD Wrapper object.
    Further operations should not be attempted on the destroyed object.
    This function should only be called after a call to osm_madw_construct or
    osm_madw_init.

SEE ALSO
    MAD Wrapper object, osm_madw_construct, osm_madw_init

OpenSM: MAD Wrapper/osm_madw_init

NAME
    osm_madw_init

DESCRIPTION
    Initializes a MAD Wrapper object for use.

SYNOPSIS
 void
osm_madw_init(
    IN osm_madw_t* const p_madw,
    IN osm_bind_handle_t h_bind,
    IN const uint32_t mad_size,
    IN const osm_mad_addr_t* const p_mad_addr );
PARAMETERS
    p_madw
        [in] Pointer to an osm_madw_t object to initialize.

    h_bind
        [in] Pointer to the wire MAD.

    p_mad_addr
        [in] Pointer to the MAD address structure.  This parameter may
        be NULL for directed route MADs.

RETURN VALUES
    None.

NOTES

SEE ALSO

OpenSM: MAD Wrapper/osm_madw_get_smp_ptr

NAME
    osm_madw_get_smp_ptr

DESCRIPTION
    Gets a pointer to the SMP in this MAD.

SYNOPSIS
 ib_smp_t*
osm_madw_get_smp_ptr(
    IN const osm_madw_t* const p_madw );
PARAMETERS
    p_madw
        [in] Pointer to an osm_madw_t object to initialize.

RETURN VALUES
    Pointer to the start of the SMP MAD.

NOTES

SEE ALSO
    MAD Wrapper object, osm_madw_construct, osm_madw_destroy

OpenSM: MAD Wrapper/osm_madw_get_sa_mad_ptr

NAME
    osm_madw_get_sa_mad_ptr

DESCRIPTION
    Gets a pointer to the SA MAD in this MAD wrapper.

SYNOPSIS
 ib_sa_mad_t*
osm_madw_get_sa_mad_ptr(
    IN const osm_madw_t* const p_madw );
PARAMETERS
    p_madw
        [in] Pointer to an osm_madw_t object to initialize.

RETURN VALUES
    Pointer to the start of the SMP MAD.

NOTES

SEE ALSO
    MAD Wrapper object, osm_madw_construct, osm_madw_destroy

OpenSM: MAD Wrapper/osm_madw_get_ni_context_ptr

NAME
    osm_madw_get_ni_context_ptr

DESCRIPTION
    Gets a pointer to the NodeInfo context in this MAD.

SYNOPSIS
 osm_ni_context_t*
osm_madw_get_ni_context_ptr(
    IN const osm_madw_t* const p_madw );
PARAMETERS
    p_madw
        [in] Pointer to an osm_madw_t object.

RETURN VALUES
    Pointer to the start of the NodeInfo context structure.

NOTES

SEE ALSO

OpenSM: MAD Wrapper/osm_madw_get_pi_context_ptr

NAME
    osm_madw_get_pi_context_ptr

DESCRIPTION
    Gets a pointer to the PortInfo context in this MAD.

SYNOPSIS
 osm_pi_context_t*
osm_madw_get_pi_context_ptr(
    IN const osm_madw_t* const p_madw );
PARAMETERS
    p_madw
        [in] Pointer to an osm_madw_t object.

RETURN VALUES
    Pointer to the start of the PortInfo context structure.

NOTES

SEE ALSO

OpenSM: MAD Wrapper/osm_madw_get_nd_context_ptr

NAME
    osm_madw_get_nd_context_ptr

DESCRIPTION
    Gets a pointer to the NodeDescription context in this MAD.

SYNOPSIS
 osm_nd_context_t*
osm_madw_get_nd_context_ptr(
    IN const osm_madw_t* const p_madw );
PARAMETERS
    p_madw
        [in] Pointer to an osm_madw_t object.

RETURN VALUES
    Pointer to the start of the NodeDescription context structure.

NOTES

SEE ALSO

OpenSM: MAD Wrapper/osm_madw_get_si_context_ptr

NAME
    osm_madw_get_si_context_ptr

DESCRIPTION
    Gets a pointer to the SwitchInfo context in this MAD.

SYNOPSIS
 osm_si_context_t*
osm_madw_get_si_context_ptr(
    IN const osm_madw_t* const p_madw );
PARAMETERS
    p_madw
        [in] Pointer to an osm_madw_t object.

RETURN VALUES
    Pointer to the start of the SwitchInfo context structure.

NOTES

SEE ALSO

OpenSM: MAD Wrapper/osm_madw_get_vend_ptr

NAME
    osm_madw_get_vend_ptr

DESCRIPTION
    Gets a pointer to the vendor specific MAD wrapper component.

SYNOPSIS
 osm_vend_wrap_t*
osm_madw_get_vend_ptr(
    IN const osm_madw_t* const p_madw );
PARAMETERS
    p_madw
        [in] Pointer to an osm_madw_t object.

RETURN VALUES
    Gets a pointer to the vendor specific MAD wrapper component.

NOTES

SEE ALSO

OpenSM: MAD Wrapper/osm_madw_get_vend_ptr

NAME
    osm_madw_get_vend_ptr

DESCRIPTION
    Returns the bind handle associated with this MAD.

SYNOPSIS
 osm_bind_handle_t
osm_madw_get_bind_handle(
    IN const osm_madw_t* const p_madw );
PARAMETERS
    p_madw
        [in] Pointer to an osm_madw_t object.

RETURN VALUES
    Returns the bind handle associated with this MAD.

NOTES

SEE ALSO

OpenSM: MAD Wrapper/osm_madw_get_mad_addr_ptr

NAME
    osm_madw_get_mad_addr_ptr

DESCRIPTION
    Returns the mad address structure associated with this MAD.

SYNOPSIS
 osm_mad_addr_t*
osm_madw_get_mad_addr_ptr(
    IN const osm_madw_t* const p_madw );
PARAMETERS
    p_madw
        [in] Pointer to an osm_madw_t object.

RETURN VALUES
    Returns the mad address structure associated with this MAD.

NOTES

SEE ALSO

OpenSM: MAD Wrapper/osm_madw_get_mad_addr_ptr

NAME
    osm_madw_get_mad_addr_ptr

DESCRIPTION
    Returns the mad address structure associated with this MAD.

SYNOPSIS
 ib_mad_t*
osm_madw_get_mad_ptr(
    IN const osm_madw_t* const p_madw );
PARAMETERS
    p_madw
        [in] Pointer to an osm_madw_t object.

RETURN VALUES
    Returns the mad address structure associated with this MAD.

NOTES

SEE ALSO

OpenSM: MAD Wrapper/osm_madw_set_mad

NAME
    osm_madw_set_mad

DESCRIPTION
    Associates a wire MAD with this MAD Wrapper object.

SYNOPSIS
 void
osm_madw_set_mad(
    IN osm_madw_t* const p_madw,
    IN const ib_mad_t* const p_mad );
PARAMETERS
    p_madw
        [in] Pointer to an osm_madw_t object.

    p_mad
        [in] Pointer to the wire MAD to attach to this wrapper.

RETURN VALUES
    None.

NOTES

SEE ALSO

OpenSM: MAD Wrapper/osm_madw_copy_context

NAME
    osm_madw_copy_context

DESCRIPTION
    Copies the controller context from one MAD Wrapper to another.

SYNOPSIS
 void
osm_madw_copy_context(
    IN osm_madw_t* const p_dest,
    IN const osm_madw_t* const p_src );
PARAMETERS
    p_dest
        [in] Pointer to the destination osm_madw_t object.

    p_src
        [in] Pointer to the source osm_madw_t object.

RETURN VALUES
    None.

NOTES

SEE ALSO