iPXE
|
Infiniband management interfaces. More...
#include <ipxe/list.h>
#include <ipxe/retry.h>
#include <ipxe/tables.h>
#include <ipxe/infiniband.h>
Go to the source code of this file.
Data Structures | |
struct | ib_mad_agent |
An Infiniband management agent. More... | |
struct | ib_mad_transaction_operations |
Infiniband management transaction operations. More... | |
struct | ib_mad_transaction |
An Infiniband management transaction. More... | |
struct | ib_mad_interface |
An Infiniband management interface. More... | |
Macros | |
#define | IB_MAD_AGENTS __table ( struct ib_mad_agent, "ib_mad_agents" ) |
Infiniband management agents. More... | |
#define | __ib_mad_agent __table_entry ( IB_MAD_AGENTS, 01 ) |
Declare an Infiniband management agent. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static __always_inline void | ib_madx_set_ownerdata (struct ib_mad_transaction *madx, void *priv) |
Set Infiniband management transaction owner-private data. More... | |
static __always_inline void * | ib_madx_get_ownerdata (struct ib_mad_transaction *madx) |
Get Infiniband management transaction owner-private data. More... | |
int | ib_mi_send (struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad, struct ib_address_vector *av) |
Transmit MAD. More... | |
struct ib_mad_transaction * | ib_create_madx (struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad, struct ib_address_vector *av, struct ib_mad_transaction_operations *op) |
Create management transaction. More... | |
void | ib_destroy_madx (struct ib_device *ibdev, struct ib_mad_interface *mi, struct ib_mad_transaction *madx) |
int | ib_create_mi (struct ib_device *ibdev, enum ib_queue_pair_type type, struct ib_mad_interface **new_mi) |
Create management interface. More... | |
void | ib_destroy_mi (struct ib_device *ibdev, struct ib_mad_interface *mi) |
Destroy management interface. More... | |
Infiniband management interfaces.
Definition in file ib_mi.h.
#define IB_MAD_AGENTS __table ( struct ib_mad_agent, "ib_mad_agents" ) |
#define __ib_mad_agent __table_entry ( IB_MAD_AGENTS, 01 ) |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Set Infiniband management transaction owner-private data.
madx | Management transaction |
priv | Private data |
Definition at line 106 of file ib_mi.h.
References ib_mad_transaction::owner_priv, and priv.
Referenced by ib_cm_path_complete(), ib_create_path(), ib_mcast_join(), xsigo_discover(), and xsigo_xds_complete().
|
inlinestatic |
Get Infiniband management transaction owner-private data.
madx | Management transaction |
priv | Private data |
Definition at line 117 of file ib_mi.h.
References ib_mad_transaction::owner_priv.
Referenced by ib_cm_req_complete(), ib_mcast_complete(), ib_path_complete(), xsigo_xcm_complete(), and xsigo_xds_complete().
int ib_mi_send | ( | struct ib_device * | ibdev, |
struct ib_mad_interface * | mi, | ||
union ib_mad * | mad, | ||
struct ib_address_vector * | av | ||
) |
Transmit MAD.
ibdev | Infiniband device |
mi | Management interface |
mad | MAD |
av | Destination address vector |
rc | Return status code |
Definition at line 187 of file ib_mi.c.
References alloc_iob(), assert(), DBGC, DBGC2_HDA, EINVAL, ENOMEM, free_iob(), ib_mad::hdr, hdr, hop_count, ib_smp_class_specific::hop_count, hop_pointer, ib_smp_class_specific::hop_pointer, htonl, htons, IB_MGMT_BASE_VERSION, IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE, IB_MI_TID_MAGIC, ib_post_send(), IB_SMP_STATUS_D_INBOUND, iob_put, mad, memcpy(), next_tid, ntohl, ntohs, ib_device::port, ib_mad_interface::qp, rc, smp, ib_mad::smp, and strerror().
Referenced by ib_cm_send_drep(), ib_cm_send_rtu(), ib_mcast_leave(), ib_mi_timer_expired(), ib_sma_guid_info(), ib_sma_node_desc(), ib_sma_node_info(), ib_sma_pkey_table(), and ib_sma_port_info().
struct ib_mad_transaction* ib_create_madx | ( | struct ib_device * | ibdev, |
struct ib_mad_interface * | mi, | ||
union ib_mad * | mad, | ||
struct ib_address_vector * | av, | ||
struct ib_mad_transaction_operations * | op | ||
) |
Create management transaction.
ibdev | Infiniband device |
mi | Management interface |
mad | MAD to send |
av | Destination address, or NULL to use SM's GSI |
op | Management transaction operations |
madx | Management transaction, or NULL |
Definition at line 287 of file ib_mi.c.
References ib_mad_transaction::av, ib_mi_timer_expired(), IB_QKEY_GSI, IB_QPN_GSI, ib_address_vector::lid, ib_mad_transaction::list, list_add, mad, ib_mad_transaction::mad, ib_mad_interface::madx, memcpy(), ib_mad_transaction::mi, NULL, ib_mad_transaction::op, op, ib_address_vector::qkey, ib_address_vector::qpn, ib_address_vector::sl, ib_device::sm_lid, ib_device::sm_sl, start_timer_nodelay(), ib_mad_transaction::timer, and zalloc().
Referenced by ib_cm_path_complete(), ib_create_path(), ib_create_service_madx(), ib_mcast_join(), and xsigo_xds_complete().
void ib_destroy_madx | ( | struct ib_device * | ibdev, |
struct ib_mad_interface * | mi, | ||
struct ib_mad_transaction * | madx | ||
) |
int ib_create_mi | ( | struct ib_device * | ibdev, |
enum ib_queue_pair_type | type, | ||
struct ib_mad_interface ** | new_mi | ||
) |
Create management interface.
ibdev | Infiniband device |
type | Queue pair type |
new_mi | New management interface to fill in |
rc | Return status code |
Definition at line 347 of file ib_mi.c.
References ib_mad_interface::cq, DBGC, ENOMEM, free, ib_create_cq(), ib_create_qp(), ib_destroy_cq(), ib_destroy_qp(), ib_mi_completion_ops, IB_MI_NUM_CQES, IB_MI_NUM_RECV_WQES, IB_MI_NUM_SEND_WQES, ib_mi_queue_pair_ops, ib_modify_qp(), IB_QKEY_GSI, IB_QKEY_SMI, ib_qp_set_ownerdata(), IB_QPT_SMI, ib_refill_recv(), ib_mad_interface::ibdev, INIT_LIST_HEAD, ib_mad_interface::madx, ib_queue_pair::name, name, ib_queue_pair::qkey, ib_mad_interface::qp, ib_queue_pair::qpn, rc, strerror(), type, and zalloc().
Referenced by ib_open().
void ib_destroy_mi | ( | struct ib_device * | ibdev, |
struct ib_mad_interface * | mi | ||
) |
Destroy management interface.
mi | Management interface |
Definition at line 411 of file ib_mi.c.
References ib_mad_transaction_operations::complete, ib_mad_interface::cq, DBGC, ECANCELED, free, ib_mad::hdr, ib_mad_tid::high, ib_destroy_cq(), ib_destroy_qp(), ib_mad_transaction::list, list_for_each_entry_safe, ib_mad_tid::low, ib_mad_transaction::mad, ib_mad_interface::madx, ib_mad_transaction::mi, ntohl, NULL, ib_mad_transaction::op, ib_mad_interface::qp, ib_mad_hdr::tid, and tmp.
Referenced by ib_close(), and ib_open().