Generated from osm_port.h with ROBODoc vunknown on Wed Aug 07 15:31:47 2002
TABLE OF CONTENTS
- OpenSM/P_Key Table
- OpenSM: P_Key Table/osm_pkey_tbl_t
- OpenSM: P_Key Table/osm_pkey_tbl_new
- OpenSM/Physical Port
- OpenSM: Physical Port/osm_physp_t
- OpenSM: Physical Port/osm_physp_construct
- OpenSM: Physical Port/osm_physp_init
- OpenSM: Physical Port/osm_physp_is_valid
- OpenSM: Physical Port/osm_physp_set_port_info
- OpenSM: Physical Port/osm_physp_get_remote
- OpenSM: Physical Port/osm_physp_get_port_guid
- OpenSM: Physical Port/osm_physp_link
- OpenSM: Physical Port/osm_physp_link_exists
- OpenSM: Physical Port/osm_physp_has_any_link
- OpenSM: Physical Port/osm_physp_get_port_num
- OpenSM: Physical Port/osm_physp_get_port_info_ptr
- OpenSM: Physical Port/osm_physp_get_node_ptr
- OpenSM: Physical Port/osm_physp_get_port_state
- OpenSM: Physical Port/osm_physp_get_base_lid
- OpenSM: Physical Port/osm_physp_get_lmc
- OpenSM: Physical Port/osm_physp_get_dr_path_ptr
- OpenSM/Port
- OpenSM: Port/osm_port_lid_category_t
- OpenSM: Port/osm_port_t
- OpenSM: Port/osm_port_construct
- OpenSM: Port/osm_port_destroy
- OpenSM: Port/osm_port_destroy
- OpenSM: Port/osm_port_init
- OpenSM: Port/osm_port_new
- OpenSM: Port/osm_port_get_base_lid
- OpenSM: Port/osm_port_get_lmc
- OpenSM: Port/osm_port_get_guid
- OpenSM: Port/osm_port_get_phys_ptr
- OpenSM: Port/osm_port_get_parent_node
- OpenSM: Physical Port/osm_physp_get_parent_node
- OpenSM: Port/osm_port_categorize_lid
- OpenSM: Port/osm_port_get_lid_range_ho
- OpenSM: Port/osm_port_add_new_physp
NAME
P_Key Table Structure
DESCRIPTION
The P_Key Table Structure provides a simple table structure
to group P_Key objects. Calling code accesses this structure
directly.
AUTHOR
Steve King, Intel
NAME
osm_pkey_tbl_t
DESCRIPTION
Contains an array of P_Key objects.
SYNOPSIS
typedef struct _osm_pkey_tbl
{
uint32_t size;
ib_net16_t tbl[1];
} osm_pkey_tbl_t;
FIELDS
size
The number of P_Key objects in the table.
tbl
Array of P_Key objects associated with this port.
Index is contiguous from 0 to size - 1.
MUST BE LAST MEMBER OF THE OBJECT!
SEE ALSO
Port, P_Key object
NAME
osm_pkey_tbl_new
DESCRIPTION
This function creates and initializes a P_Key Table object.
SYNOPSIS
osm_pkey_tbl_t* osm_pkey_tbl_new(
IN uint32_t const size );
PARAMETERS
size
[in] Number of entries in the P_Key Table.
RETURN VALUE
On success, returns a pointer to a new P_Key Table object
of the specified size.
NULL otherwise.
NOTES
SEE ALSO
NAME
Physical Port
DESCRIPTION
The Physical Port object encapsulates the information needed by the
OpenSM to manage physical ports. The OpenSM allocates one Physical Port
per physical port in the IBA subnet.
In a switch, one multiple Physical Port objects share the same port GUID.
In an end-point, Physical Ports do not share GUID values.
The Physical Port is not thread safe, thus callers must provide
serialization.
These objects should be treated as opaque and should be
manipulated only through the provided functions.
AUTHOR
Steve King, Intel
NAME
osm_physp_t
DESCRIPTION
This object represents a physical port on a switch, router or end-point.
The osm_physp_t object should be treated as opaque and should
be manipulated only through the provided functions.
SYNOPSIS
typedef struct _osm_physp
{
ib_port_info_t port_info;
ib_net64_t port_guid;
uint8_t port_num;
struct _osm_node *p_node;
struct _osm_physp *p_remote_physp;
osm_dr_path_t dr_path;
osm_pkey_tbl_t *p_pkey_tbl;
} osm_physp_t;
FIELDS
port_info
The IBA defined PortInfo data for this port.
port_guid
Port GUID value of this port. For switches,
all ports share the same GUID value.
port_num
The port number of this port. The PortInfo also
contains a port_number, but that number is not
the port number of this port, but rather the number
of the port that received the SMP during discovery.
Therefore, we must keep a seperate record for this
port's port number.
p_node
Pointer to the parent Node object of this Physical Port.
p_remote_physp
Pointer to the Physical Port on the other side of the wire.
If this pointer is NULL no link exists at this port.
dr_path
The directed route path to this port.
p_pkey_tbl
Pointer to the P_Key table for this port.
SEE ALSO
Port
NAME
osm_physp_construct
DESCRIPTION
Constructs a Physical Port.
SYNOPSIS
void
osm_physp_construct(
IN osm_physp_t* const p_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object to initialize.
RETURN VALUES
This function does not return a value.
NOTES
SEE ALSO
Port, Physical Port
NAME
osm_physp_init
DESCRIPTION
Initializes a Physical Port for use.
SYNOPSIS
void
osm_physp_init(
IN osm_physp_t* const p_physp,
IN const ib_net64_t port_guid,
IN const uint8_t port_num,
IN const struct _osm_node* const p_node,
IN const osm_bind_handle_t h_bind,
IN const uint8_t hop_count,
IN const uint8_t* const p_initial_path );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object to initialize.
port_guid
[in] GUID value of this port. Switch ports all share
the same value.
Caller should use 0 if the guid is unknown.
port_num
[in] The port number of this port.
p_node
[in] Pointer to the parent Node object of this Physical Port.
h_bind
[in] Bind handle on which this port is accessed.
Caller should use OSM_INVALID_BIND_HANDLE if the bind
handle to this port is unknown.
hop_count
[in] Directed route hop count to reach this port.
Caller should use 0 if the hop count is unknown.
p_initial_path
[in] Pointer to the directed route path to reach this node.
Caller should use NULL if the path is unknown.
RETURN VALUES
This function does not return a value.
NOTES
SEE ALSO
Port, Physical Port
NAME
osm_physp_is_valid
DESCRIPTION
Returns TRUE if the Physical Port has been successfully initialized.
FALSE otherwise.
SYNOPSIS
boolean_t
osm_physp_is_valid(
IN const osm_physp_t* const p_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object.
RETURN VALUES
Returns TRUE if the Physical Port has been successfully initialized.
FALSE otherwise.
NOTES
SEE ALSO
Port, Physical Port
NAME
osm_physp_set_port_info
DESCRIPTION
Copies the PortInfo attribute into the Physical Port object.
SYNOPSIS
void
osm_physp_set_port_info(
IN osm_physp_t* const p_physp,
IN const ib_port_info_t* const p_pi );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object.
p_pi
[in] Pointer to the IBA defined PortInfo at this port number.
RETURN VALUES
This function does not return a value.
NOTES
SEE ALSO
Port, Physical Port
NAME
osm_physp_get_remote
DESCRIPTION
Returns a pointer to the Physical Port on the other side the wire.
SYNOPSIS
osm_physp_t*
osm_physp_get_remote(
IN osm_physp_t* const p_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object.
RETURN VALUES
Returns a pointer to the Physical Port on the other side of
the wire. A return value of NULL means there is no link at this port.
NOTES
SEE ALSO
Port, Physical Port
NAME
osm_physp_get_port_guid
DESCRIPTION
Returns the port guid of this physical port.
SYNOPSIS
ib_net64_t
osm_physp_get_port_guid(
IN osm_physp_t* const p_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object.
RETURN VALUES
Returns the port guid of this physical port.
NOTES
SEE ALSO
Port, Physical Port
NAME
osm_physp_link
DESCRIPTION
Sets the pointers to the Physical Ports on the other side the wire.
SYNOPSIS
void
osm_physp_link(
IN osm_physp_t* const p_physp,
IN osm_physp_t* const p_neighbor_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object to link.
p_neighbor_physp
[in] Pointer to the adjacent osm_physp_t object to link.
RETURN VALUES
Returns a pointer to the Physical Port on the other side of
the wire. A return value of NULL means there is no link at this port.
NOTES
SEE ALSO
Port, Physical Port
NAME
osm_physp_link_exists
DESCRIPTION
Returns TRUE if the Physical Port has a link to the specified port.
FALSE otherwise.
SYNOPSIS
boolean_t
osm_physp_link_exists(
IN const osm_physp_t* const p_physp,
IN const osm_physp_t* const p_neighbor_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object.
p_neighbor_physp
[in] Pointer to an osm_physp_t object.
RETURN VALUES
Returns TRUE if the Physical Port has a link to another port.
FALSE otherwise.
NOTES
SEE ALSO
Port, Physical Port
NAME
osm_physp_has_any_link
DESCRIPTION
Returns TRUE if the Physical Port has a link to another port.
FALSE otherwise.
SYNOPSIS
boolean_t
osm_physp_has_any_link(
IN const osm_physp_t* const p_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object.
RETURN VALUES
Returns TRUE if the Physical Port has a link to another port.
FALSE otherwise.
NOTES
SEE ALSO
Port, Physical Port
NAME
osm_physp_get_port_num
DESCRIPTION
Returns the local port number of this Physical Port.
SYNOPSIS
uint8_t
osm_physp_get_port_num(
IN const osm_physp_t* const p_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object.
RETURN VALUES
Returns the local port number of this Physical Port.
NOTES
SEE ALSO
NAME
osm_physp_get_port_info_ptr
DESCRIPTION
Returns a pointer to the PortInfo attribute for this port.
SYNOPSIS
ib_port_info_t*
osm_physp_get_port_info_ptr(
IN const osm_physp_t* const p_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object.
RETURN VALUES
Returns a pointer to the PortInfo attribute for this port.
NOTES
SEE ALSO
NAME
osm_physp_get_node_ptr
DESCRIPTION
Returns a pointer to the parent Node object for this port.
SYNOPSIS
struct _osm_node*
osm_physp_get_node_ptr(
IN const osm_physp_t* const p_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object.
RETURN VALUES
Returns a pointer to the parent Node object for this port.
NOTES
SEE ALSO
NAME
osm_physp_get_port_state
DESCRIPTION
Returns the port state of this Physical Port.
SYNOPSIS
uint8_t
osm_physp_get_port_state(
IN const osm_physp_t* const p_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object.
RETURN VALUES
Returns the local port number of this Physical Port.
NOTES
SEE ALSO
NAME
osm_physp_get_base_lid
DESCRIPTION
Returns the base lid of this Physical Port.
SYNOPSIS
ib_net16_t
osm_physp_get_base_lid(
IN const osm_physp_t* const p_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object.
RETURN VALUES
Returns the base lid of this Physical Port.
NOTES
SEE ALSO
NAME
osm_physp_get_lmc
DESCRIPTION
Returns the LMC value of this Physical Port.
SYNOPSIS
uint8_t
osm_physp_get_lmc(
IN const osm_physp_t* const p_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object.
RETURN VALUES
Returns the LMC value of this Physical Port.
NOTES
SEE ALSO
NAME
osm_physp_get_dr_path_ptr
DESCRIPTION
Returns a pointer to the directed route path for this port.
SYNOPSIS
osm_dr_path_t*
osm_physp_get_dr_path_ptr(
IN const osm_physp_t* const p_physp );
PARAMETERS
p_physp
[in] Pointer to a Physical Port object.
RETURN VALUES
Returns a pointer to the directed route path for this port.
NOTES
SEE ALSO
Physical Port object
NAME
Port
DESCRIPTION
The Port object encapsulates the information needed by the
OpenSM to manage ports. The OpenSM allocates one Port object
per port in the IBA subnet.
Each Port object is associated with a single port GUID. A Port object
contains 1 or more Physical Port objects. An end point node has
one Physical Port per Port. A switch node has more than
one Physical Port per Port.
The Port object is not thread safe, thus callers must provide
serialization.
These objects should be treated as opaque and should be
manipulated only through the provided functions.
AUTHOR
Steve King, Intel
NAME
osm_port_lid_category_t
DESCRIPTION
Enumerated values for LID dispostion.
SYNOPSIS
typedef enum _osm_port_lid_category
{
OSM_PORT_LID_ASSIGNED = 0,
OSM_PORT_LID_UNASSIGNED,
OSM_PORT_LID_CONFLICT,
OSM_PORT_LID_FOREIGN,
} osm_port_lid_category_t;
FIELDS
OSM_PORT_LID_ASSIGNED
Indicates the Port has a known LID value.
OSM_PORT_LID_UNASSIGNED
Indicates the Port does not have a LID value.
OSM_PORT_LID_CONFLICT
Indicates the Port's LID conflicts with an assigned LID.
OSM_PORT_LID_FOREIGN
Indicates the Port has a LID value not currently known in
in the OpenSM LID database.
SEE ALSO
Port
NAME
osm_port_t
DESCRIPTION
This object represents a logical port on a switch, router or end-point.
The osm_port_t object should be treated as opaque and should
be manipulated only through the provided functions.
SYNOPSIS
typedef struct _osm_port
{
cl_map_item_t map_item;
struct _osm_node *p_node;
ib_net64_t guid;
uint8_t default_port_num;
uint8_t port_tbl_size;
osm_physp_t *tbl[1];
} osm_port_t;
FIELDS
map_item
Linkage structure for cl_qmap. MUST BE FIRST MEMBER!
p_node
Points to the Node object that owns this port.
guid
Manufacturer assigned GUID for this port.
default_port_num
Index of the physical port used when physical charactereistics
contained in the Physical Port are needed.
port_tbl_size
Number of physical ports associated with this logical port.
tbl
Array of pointers to Physical Port objects contained by this node.
SEE ALSO
Port, Physical Port, Physical Port Table
NAME
osm_port_construct
DESCRIPTION
This function constructs a Port object.
SYNOPSIS
void
osm_port_construct(
IN osm_port_t* const p_port );
PARAMETERS
p_port
[in] Pointer to a Port oject to construct.
RETURN VALUE
This function does not return a value.
NOTES
Allows calling osm_port_init, osm_port_destroy, and osm_port_is_inited.
Calling osm_port_construct is a prerequisite to calling any other
method except osm_port_init.
SEE ALSO
Port, osm_port_init, osm_port_destroy, osm_port_is_inited
NAME
osm_port_destroy
DESCRIPTION
This function destroys a Port object.
SYNOPSIS
inline static void
osm_port_destroy(
IN osm_port_t* const p_port );
PARAMETERS
p_port
[in] Pointer to a Port oject to construct.
RETURN VALUE
This function does not return a value.
NOTES
Performs any necessary cleanup of the specified Port object.
Further operations should not be attempted on the destroyed object.
This function should only be called after a call to osm_port_construct or
osm_port_init.
SEE ALSO
Port, osm_port_init, osm_port_destroy, osm_port_is_inited
NAME
osm_port_destroy
DESCRIPTION
This function destroys and deallocates a Port object.
SYNOPSIS
inline static void
osm_port_delete(
IN OUT osm_port_t** const pp_port );
PARAMETERS
pp_port
[in][out] Pointer to a pointer to a Port oject to delete.
On return, this pointer is NULL.
RETURN VALUE
This function does not return a value.
NOTES
Performs any necessary cleanup of the specified Port object.
SEE ALSO
Port, osm_port_init, osm_port_destroy
NAME
osm_port_init
DESCRIPTION
This function initializes a Port object.
SYNOPSIS
void
osm_port_init(
IN osm_port_t* const p_port,
IN const ib_node_info_t* p_ni,
IN const struct _osm_node* const p_parent_node );
PARAMETERS
p_port
[in] Pointer to a Port oject to initialize.
p_ni
[in] Pointer to the NodeInfo attribute relavent for this port.
p_parent_node
[in] Pointer to the initialized parent osm_node_t object
that owns this port.
RETURN VALUE
None.
NOTES
Allows calling other port methods.
SEE ALSO
Port
NAME
osm_port_new
DESCRIPTION
This function allocates and initializes a Port object.
SYNOPSIS
osm_port_t*
osm_port_new(
IN const ib_node_info_t* p_ni,
IN const struct _osm_node* const p_parent_node );
PARAMETERS
p_ni
[in] Pointer to the NodeInfo attribute relavent for this port.
p_parent_node
[in] Pointer to the initialized parent osm_node_t object
that owns this port.
RETURN VALUE
Pointer to the initialize Port object.
NOTES
Allows calling other port methods.
SEE ALSO
Port
NAME
osm_port_get_base_lid
DESCRIPTION
Gets the base LID of a port.
SYNOPSIS
ib_net16_t
osm_port_get_base_lid(
IN const osm_port_t* const p_port );
PARAMETERS
p_port
[in] Pointer to a Port oject.
RETURN VALUE
Base LID of the port.
If the return value is 0, then this port has no assigned LID.
NOTES
SEE ALSO
Port
NAME
osm_port_get_lmc
DESCRIPTION
Gets the LMC value of a port.
SYNOPSIS
uint8_t
osm_port_get_lmc(
IN const osm_port_t* const p_port );
PARAMETERS
p_port
[in] Pointer to a Port oject.
RETURN VALUE
Gets the LMC value of a port.
NOTES
SEE ALSO
Port
NAME
osm_port_get_guid
DESCRIPTION
Gets the GUID of a port.
SYNOPSIS
ib_net64_t
osm_port_get_guid(
IN const osm_port_t* const p_port );
PARAMETERS
p_port
[in] Pointer to a Port oject.
RETURN VALUE
Manufacturer assigned GUID of the port.
NOTES
SEE ALSO
Port
NAME
osm_port_get_phys_ptr
DESCRIPTION
Gets the pointer to the specified Physical Port object.
SYNOPSIS
osm_physp_t*
osm_port_get_phys_ptr(
IN const osm_port_t* const p_port,
IN const uint8_t port_num );
PARAMETERS
p_port
[in] Pointer to a Port oject.
port_num
[in] Number of physical port for which to return the
osm_physp_t object. If this port is on an HCA, then
this value is ignored.
RETURN VALUE
Pointer to the Physical Port object.
NOTES
SEE ALSO
Port
NAME
osm_port_get_parent_node
DESCRIPTION
Gets the pointer to the specified Physical Port object.
SYNOPSIS
struct _osm_node*
osm_port_get_parent_node(
IN const osm_port_t* const p_port );
PARAMETERS
p_port
[in] Pointer to a Port oject.
port_num
[in] Number of physical port for which to return the
osm_physp_t object.
RETURN VALUE
Pointer to the Physical Port object.
NOTES
SEE ALSO
Port
NAME
osm_physp_get_parent_node
DESCRIPTION
Returns the parent node of this physical port.
SYNOPSIS
struct _osm_node*
osm_physp_get_parent_node(
IN const osm_physp_t* const p_physp );
PARAMETERS
p_physp
[in] Pointer to an osm_physp_t object.
RETURN VALUES
Returns the parent node of this physical port.
NOTES
SEE ALSO
NAME
osm_port_categorize_lid
DESCRIPTION
Returns an OSM_PORT_LID_XXX enum representing the disposition
of this Port's LID.
SYNOPSIS
osm_port_lid_category_t
osm_port_categorize_lid(
IN const osm_port_t* const p_port,
IN const cl_ptr_vector_t* const p_tbl,
IN const uint8_t opensm_lmc );
PARAMETERS
p_port
[in] Pointer to a Port oject.
p_tbl
[in] Pointer to the port LID vector.
opensm_lmc
[in] The LMC value currently used by the subnet.
RETURN VALUE
Returns an OSM_PORT_LID_XXX enum representing the disposition
of this Port's LID.
NOTES
SEE ALSO
Port
NAME
osm_port_get_lid_range_ho
DESCRIPTION
Returns the HOST ORDER lid min and max values for this port,
based on the lmc value.
SYNOPSIS
void
osm_port_get_lid_range_ho(
IN const osm_port_t* const p_port,
OUT uint16_t* const p_min_lid,
OUT uint16_t* const p_max_lid );
PARAMETERS
p_port
[in] Pointer to a Port oject.
p_min_lid
[out] Pointer to the minimum LID value occupied by this port.
p_max_lid
[out] Pointer to the maximum LID value occupied by this port.
RETURN VALUE
None.
NOTES
SEE ALSO
Port
NAME
osm_port_add_new_physp
DESCRIPTION
Adds a new physical port to the logical collection owned by the Port.
Physical Ports added here must share the same GUID as the Port.
SYNOPSIS
void
osm_port_add_new_physp(
IN osm_port_t* const p_port,
IN const uint8_t port_num );
PARAMETERS
p_port
[in] Pointer to a Port oject.
port_num
[in] Port number to add.
RETURN VALUE
None.
NOTES
SEE ALSO
Port