iPXE
|
Infiniband Subnet Management Agent. More...
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <byteswap.h>
#include <ipxe/settings.h>
#include <ipxe/infiniband.h>
#include <ipxe/iobuf.h>
#include <ipxe/ib_mi.h>
#include <ipxe/ib_sma.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | ib_sma_node_info (struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad, struct ib_address_vector *av) |
Node information. More... | |
static void | ib_sma_node_desc (struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad, struct ib_address_vector *av) |
Node description. More... | |
static void | ib_sma_guid_info (struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad, struct ib_address_vector *av) |
GUID information. More... | |
static int | ib_sma_set_port_info (struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad) |
Set port information. More... | |
static void | ib_sma_port_info (struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad, struct ib_address_vector *av) |
Port information. More... | |
static int | ib_sma_set_pkey_table (struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad) |
Set partition key table. More... | |
static void | ib_sma_pkey_table (struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad, struct ib_address_vector *av) |
Partition key table. More... | |
int | ib_create_sma (struct ib_device *ibdev, struct ib_mad_interface *mi) |
Create subnet management agent and interface. More... | |
void | ib_destroy_sma (struct ib_device *ibdev __unused, struct ib_mad_interface *mi __unused) |
Destroy subnet management agent and interface. More... | |
Variables | |
struct ib_mad_agent ib_sma_agent [] | __ib_mad_agent |
Subnet management agent. More... | |
Infiniband Subnet Management Agent.
Definition in file ib_sma.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Node information.
ibdev | Infiniband device |
mi | Management interface |
mad | Received MAD |
av | Source address vector |
Definition at line 54 of file ib_sma.c.
References ib_node_info::base_version, ib_node_info::class_version, DBGC, ib_device::gid, ib_gid::guid, ib_mad::hdr, htons, IB_MGMT_BASE_VERSION, IB_MGMT_METHOD_GET_RESP, ib_mi_send(), IB_NODE_TYPE_HCA, IB_SMP_CLASS_VERSION, ib_node_info::local_port_num, mad, memcpy(), memset(), ib_mad_hdr::method, ib_node_info::node_guid, ib_device::node_guid, ib_smp_data::node_info, node_info, ib_node_info::node_type, ib_node_info::num_ports, ib_node_info::partition_cap, ib_device::port, ib_node_info::port_guid, ib_device::ports, rc, ib_gid::s, ib_mad::smp, ib_mad_smp::smp_data, strerror(), and ib_node_info::sys_guid.
|
static |
Node description.
ibdev | Infiniband device |
mi | Management interface |
mad | Received MAD |
av | Source address vector |
Definition at line 93 of file ib_sma.c.
References DBGC, ib_device::dev, fetch_string_setting(), guid, ib_mad::hdr, IB_MGMT_METHOD_GET_RESP, ib_mi_send(), mad, memset(), ib_mad_hdr::method, device::name, ib_smp_data::node_desc, node_desc, ib_device::node_guid, ib_node_desc::node_string, NULL, rc, ib_mad::smp, ib_mad_smp::smp_data, snprintf(), and strerror().
|
static |
GUID information.
ibdev | Infiniband device |
mi | Management interface |
mad | Received MAD |
av | Source address vector |
Definition at line 131 of file ib_sma.c.
References DBGC, ib_device::gid, ib_gid::guid, ib_guid_info::guid, ib_smp_data::guid_info, guid_info, ib_mad::hdr, IB_MGMT_METHOD_GET_RESP, ib_mi_send(), mad, memcpy(), memset(), ib_mad_hdr::method, rc, ib_gid::s, ib_mad::smp, ib_mad_smp::smp_data, and strerror().
|
static |
Set port information.
ibdev | Infiniband device |
mi | Management interface |
mad | Received MAD |
rc | Return status code |
Definition at line 160 of file ib_sma.c.
References DBGC, ib_device::gid, ib_port_info::gid_prefix, ib_set_port_info(), ib_port_info::lid, ib_device::lid, ib_port_info::link_speed_active__link_speed_enabled, ib_device::link_speed_enabled, link_width_enabled, ib_port_info::link_width_enabled, ib_device::link_width_enabled, mad, ib_port_info::mastersm_lid, memcpy(), ib_port_info::neighbour_mtu__mastersm_sl, ntohs, ib_smp_data::port_info, port_info, ib_gid::prefix, rc, ib_gid::s, ib_device::sm_lid, ib_device::sm_sl, ib_mad::smp, ib_mad_smp::smp_data, and strerror().
Referenced by ib_sma_port_info().
|
static |
Port information.
ibdev | Infiniband device |
mi | Management interface |
mad | Received MAD |
av | Source address vector |
Definition at line 201 of file ib_sma.c.
References DBGC, ib_device::gid, ib_port_info::gid_prefix, ib_port_info::guid_cap, ib_mad::hdr, htons, IB_MGMT_METHOD_GET_RESP, IB_MGMT_METHOD_SET, IB_MGMT_STATUS_UNSUPPORTED_METHOD_ATTR, ib_mi_send(), IB_MTU_2048, IB_PORT_PHYS_STATE_POLLING, ib_sma_set_port_info(), IB_VL_0, ib_port_info::init_type_reply__mtu_cap, ib_port_info::lid, ib_device::lid, ib_device::link_speed_active, ib_port_info::link_speed_active__link_speed_enabled, ib_device::link_speed_enabled, ib_device::link_speed_supported, ib_port_info::link_speed_supported__port_state, ib_port_info::link_width_active, ib_device::link_width_active, ib_port_info::link_width_enabled, ib_device::link_width_enabled, ib_port_info::link_width_supported, ib_device::link_width_supported, ib_port_info::local_port_num, mad, ib_port_info::mastersm_lid, memcpy(), memset(), ib_mad_hdr::method, ib_port_info::neighbour_mtu__mastersm_sl, ntohs, ib_port_info::operational_vls__enforcement, ib_device::port, ib_smp_data::port_info, port_info, ib_port_info::port_phys_state__link_down_def_state, ib_device::port_state, ib_gid::prefix, rc, ib_gid::s, ib_device::sm_lid, ib_device::sm_sl, ib_mad::smp, ib_mad_smp::smp_data, ib_mad_hdr::status, strerror(), and ib_port_info::vl_cap__init_type.
|
static |
Set partition key table.
ibdev | Infiniband device |
mi | Management interface |
mad | Received MAD |
rc | Return status code |
Definition at line 259 of file ib_sma.c.
References DBGC, ib_set_pkey_table(), mad, ntohs, ib_pkey_table::pkey, ib_device::pkey, ib_smp_data::pkey_table, pkey_table, rc, ib_mad::smp, ib_mad_smp::smp_data, and strerror().
Referenced by ib_sma_pkey_table().
|
static |
Partition key table.
ibdev | Infiniband device |
mi | Management interface |
mad | Received MAD |
av | Source address vector |
Definition at line 287 of file ib_sma.c.
References DBGC, ib_mad::hdr, htons, IB_MGMT_METHOD_GET_RESP, IB_MGMT_METHOD_SET, IB_MGMT_STATUS_UNSUPPORTED_METHOD_ATTR, ib_mi_send(), ib_sma_set_pkey_table(), mad, memset(), ib_mad_hdr::method, ib_pkey_table::pkey, ib_device::pkey, ib_smp_data::pkey_table, pkey_table, rc, ib_mad::smp, ib_mad_smp::smp_data, ib_mad_hdr::status, and strerror().
int ib_create_sma | ( | struct ib_device * | ibdev, |
struct ib_mad_interface * | mi | ||
) |
Create subnet management agent and interface.
ibdev | Infiniband device |
mi | Management interface |
rc | Return status code |
Definition at line 358 of file ib_sma.c.
References DBGC, and ib_device::name.
Referenced by ib_open().
void ib_destroy_sma | ( | struct ib_device *ibdev | __unused, |
struct ib_mad_interface *mi | __unused | ||
) |
Destroy subnet management agent and interface.
ibdev | Infiniband device |
mi | Management interface |
Definition at line 372 of file ib_sma.c.
Referenced by ib_close(), and ib_open().
struct ib_mad_agent ib_sma_agent [] __ib_mad_agent |