iPXE
|
Infiniband protocol. More...
#include <stdint.h>
#include <ipxe/refcnt.h>
#include <ipxe/device.h>
#include <ipxe/tables.h>
#include <ipxe/ib_packet.h>
#include <ipxe/ib_mad.h>
#include <ipxe/if_ether.h>
Go to the source code of this file.
Data Structures | |
struct | ib_address_vector |
An Infiniband Address Vector. More... | |
struct | ib_work_queue |
An Infiniband Work Queue. More... | |
struct | ib_multicast_gid |
An Infiniband multicast GID. More... | |
struct | ib_queue_pair_operations |
Infiniband queue pair operations. More... | |
struct | ib_queue_pair |
An Infiniband Queue Pair. More... | |
struct | ib_completion_queue_operations |
Infiniband completion queue operations. More... | |
struct | ib_completion_queue |
An Infiniband Completion Queue. More... | |
struct | ib_device_operations |
Infiniband device operations. More... | |
struct | ib_device |
An Infiniband device. More... | |
struct | ib_driver |
An Infiniband upper-layer driver. More... | |
Macros | |
#define | IB_QPN_SMI 0 |
Subnet management interface QPN. More... | |
#define | IB_QKEY_SMI 0 |
Subnet management interface queue key. More... | |
#define | IB_QPN_GSI 1 |
General service interface QPN. More... | |
#define | IB_QKEY_GSI 0x80010000UL |
General service interface queue key. More... | |
#define | IB_QPN_BROADCAST 0xffffffUL |
Broadcast QPN. More... | |
#define | IB_QPN_MASK 0xffffffUL |
QPN mask. More... | |
#define | IB_PKEY_DEFAULT 0xffff |
Default Infiniband partition key. More... | |
#define | IB_PKEY_FULL 0x8000 |
Infiniband partition key full membership flag. More... | |
#define | IB_MAX_PAYLOAD_SIZE 2048 |
Maximum payload size. More... | |
#define | IBDEV_NAME_LEN 8 |
Maximum length of an Infiniband device name. More... | |
#define | IB_DRIVERS __table ( struct ib_driver, "ib_drivers" ) |
Infiniband driver table. More... | |
#define | __ib_driver __table_entry ( IB_DRIVERS, 01 ) |
Declare an Infiniband driver. More... | |
#define | for_each_ibdev(ibdev) list_for_each_entry ( (ibdev), &ib_devices, list ) |
Iterate over all network devices. More... | |
Enumerations | |
enum | ib_rate { IB_RATE_2_5 = 2, IB_RATE_10 = 3, IB_RATE_30 = 4, IB_RATE_5 = 5, IB_RATE_20 = 6, IB_RATE_40 = 7, IB_RATE_60 = 8, IB_RATE_80 = 9, IB_RATE_120 = 10 } |
Infiniband transmission rates. More... | |
enum | ib_queue_pair_type { IB_QPT_SMI, IB_QPT_GSI, IB_QPT_UD, IB_QPT_RC, IB_QPT_ETH } |
An Infiniband queue pair type. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
int | ib_create_cq (struct ib_device *ibdev, unsigned int num_cqes, struct ib_completion_queue_operations *op, struct ib_completion_queue **new_cq) |
Create completion queue. More... | |
void | ib_destroy_cq (struct ib_device *ibdev, struct ib_completion_queue *cq) |
Destroy completion queue. More... | |
void | ib_poll_cq (struct ib_device *ibdev, struct ib_completion_queue *cq) |
Poll completion queue. More... | |
int | ib_create_qp (struct ib_device *ibdev, enum ib_queue_pair_type type, unsigned int num_send_wqes, struct ib_completion_queue *send_cq, unsigned int num_recv_wqes, struct ib_completion_queue *recv_cq, struct ib_queue_pair_operations *op, const char *name, struct ib_queue_pair **new_qp) |
Create queue pair. More... | |
int | ib_modify_qp (struct ib_device *ibdev, struct ib_queue_pair *qp) |
Modify queue pair. More... | |
void | ib_destroy_qp (struct ib_device *ibdev, struct ib_queue_pair *qp) |
Destroy queue pair. More... | |
struct ib_queue_pair * | ib_find_qp_qpn (struct ib_device *ibdev, unsigned long qpn) |
Find queue pair by QPN. More... | |
struct ib_queue_pair * | ib_find_qp_mgid (struct ib_device *ibdev, union ib_gid *gid) |
Find queue pair by multicast GID. More... | |
struct ib_work_queue * | ib_find_wq (struct ib_completion_queue *cq, unsigned long qpn, int is_send) |
Find work queue belonging to completion queue. More... | |
int | ib_post_send (struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_address_vector *dest, struct io_buffer *iobuf) |
Post send work queue entry. More... | |
int | ib_post_recv (struct ib_device *ibdev, struct ib_queue_pair *qp, struct io_buffer *iobuf) |
Post receive work queue entry. More... | |
void | ib_complete_send (struct ib_device *ibdev, struct ib_queue_pair *qp, struct io_buffer *iobuf, int rc) |
Complete send work queue entry. More... | |
void | ib_complete_recv (struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_address_vector *dest, struct ib_address_vector *source, struct io_buffer *iobuf, int rc) |
Complete receive work queue entry. More... | |
void | ib_refill_recv (struct ib_device *ibdev, struct ib_queue_pair *qp) |
Refill receive work queue. More... | |
int | ib_open (struct ib_device *ibdev) |
Open port. More... | |
void | ib_close (struct ib_device *ibdev) |
Close port. More... | |
int | ib_link_rc (struct ib_device *ibdev) |
Get link state. More... | |
int | ib_mcast_attach (struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid) |
Attach to multicast group. More... | |
void | ib_mcast_detach (struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid) |
Detach from multicast group. More... | |
int | ib_set_port_info (struct ib_device *ibdev, union ib_mad *mad) |
Set port information. More... | |
int | ib_set_pkey_table (struct ib_device *ibdev, union ib_mad *mad) |
Set partition key table. More... | |
struct ib_device * | alloc_ibdev (size_t priv_size) |
Allocate Infiniband device. More... | |
int | register_ibdev (struct ib_device *ibdev) |
Register Infiniband device. More... | |
void | unregister_ibdev (struct ib_device *ibdev) |
Unregister Infiniband device. More... | |
struct ib_device * | find_ibdev (union ib_gid *gid) |
Find Infiniband device by GID. More... | |
struct ib_device * | last_opened_ibdev (void) |
Get most recently opened Infiniband device. More... | |
void | ib_link_state_changed (struct ib_device *ibdev) |
Notify of Infiniband link state change. More... | |
void | ib_poll_eq (struct ib_device *ibdev) |
Poll event queue. More... | |
static __always_inline int | ib_link_ok (struct ib_device *ibdev) |
Check link state of Infiniband device. More... | |
static int | ib_is_open (struct ib_device *ibdev) |
Check whether or not Infiniband device is open. More... | |
static __always_inline struct ib_device * | ibdev_get (struct ib_device *ibdev) |
Get reference to Infiniband device. More... | |
static __always_inline void | ibdev_put (struct ib_device *ibdev) |
Drop reference to Infiniband device. More... | |
static __always_inline void | ib_wq_set_drvdata (struct ib_work_queue *wq, void *priv) |
Set Infiniband work queue driver-private data. More... | |
static __always_inline void * | ib_wq_get_drvdata (struct ib_work_queue *wq) |
Get Infiniband work queue driver-private data. More... | |
static __always_inline void | ib_qp_set_drvdata (struct ib_queue_pair *qp, void *priv) |
Set Infiniband queue pair driver-private data. More... | |
static __always_inline void * | ib_qp_get_drvdata (struct ib_queue_pair *qp) |
Get Infiniband queue pair driver-private data. More... | |
static __always_inline void | ib_qp_set_ownerdata (struct ib_queue_pair *qp, void *priv) |
Set Infiniband queue pair owner-private data. More... | |
static __always_inline void * | ib_qp_get_ownerdata (struct ib_queue_pair *qp) |
Get Infiniband queue pair owner-private data. More... | |
static __always_inline void | ib_cq_set_drvdata (struct ib_completion_queue *cq, void *priv) |
Set Infiniband completion queue driver-private data. More... | |
static __always_inline void * | ib_cq_get_drvdata (struct ib_completion_queue *cq) |
Get Infiniband completion queue driver-private data. More... | |
static __always_inline void | ib_set_drvdata (struct ib_device *ibdev, void *priv) |
Set Infiniband device driver-private data. More... | |
static __always_inline void * | ib_get_drvdata (struct ib_device *ibdev) |
Get Infiniband device driver-private data. More... | |
Variables | |
struct list_head | ib_devices |
List of Infiniband devices. More... | |
Infiniband protocol.
Definition in file infiniband.h.
#define IB_QPN_SMI 0 |
Subnet management interface QPN.
Definition at line 21 of file infiniband.h.
#define IB_QKEY_SMI 0 |
Subnet management interface queue key.
Definition at line 24 of file infiniband.h.
#define IB_QPN_GSI 1 |
General service interface QPN.
Definition at line 27 of file infiniband.h.
#define IB_QKEY_GSI 0x80010000UL |
General service interface queue key.
Definition at line 30 of file infiniband.h.
#define IB_QPN_BROADCAST 0xffffffUL |
Broadcast QPN.
Definition at line 33 of file infiniband.h.
#define IB_QPN_MASK 0xffffffUL |
QPN mask.
Definition at line 36 of file infiniband.h.
#define IB_PKEY_DEFAULT 0xffff |
Default Infiniband partition key.
Definition at line 39 of file infiniband.h.
#define IB_PKEY_FULL 0x8000 |
Infiniband partition key full membership flag.
Definition at line 42 of file infiniband.h.
#define IB_MAX_PAYLOAD_SIZE 2048 |
Maximum payload size.
This is currently hard-coded in various places (drivers, subnet management agent, etc.) to 2048.
Definition at line 50 of file infiniband.h.
#define IBDEV_NAME_LEN 8 |
Maximum length of an Infiniband device name.
Definition at line 395 of file infiniband.h.
Infiniband driver table.
Definition at line 493 of file infiniband.h.
#define __ib_driver __table_entry ( IB_DRIVERS, 01 ) |
Declare an Infiniband driver.
Definition at line 496 of file infiniband.h.
#define for_each_ibdev | ( | ibdev | ) | list_for_each_entry ( (ibdev), &ib_devices, list ) |
Iterate over all network devices.
Definition at line 555 of file infiniband.h.
enum ib_rate |
Infiniband transmission rates.
Enumerator | |
---|---|
IB_RATE_2_5 | |
IB_RATE_10 | |
IB_RATE_30 | |
IB_RATE_5 | |
IB_RATE_20 | |
IB_RATE_40 | |
IB_RATE_60 | |
IB_RATE_80 | |
IB_RATE_120 |
Definition at line 59 of file infiniband.h.
enum ib_queue_pair_type |
An Infiniband queue pair type.
Enumerator | |
---|---|
IB_QPT_SMI | |
IB_QPT_GSI | |
IB_QPT_UD | |
IB_QPT_RC | |
IB_QPT_ETH |
Definition at line 138 of file infiniband.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
int ib_create_cq | ( | struct ib_device * | ibdev, |
unsigned int | num_cqes, | ||
struct ib_completion_queue_operations * | op, | ||
struct ib_completion_queue ** | new_cq | ||
) |
Create completion queue.
ibdev | Infiniband device |
num_cqes | Number of completion queue entries |
op | Completion queue operations |
new_cq | New completion queue to fill in |
rc | Return status code |
Definition at line 98 of file infiniband.c.
References ib_completion_queue::cqn, ib_device::cqs, ib_device_operations::create_cq, DBGC, ib_device_operations::destroy_cq, ENOMEM, free, ib_cq_get_drvdata(), ib_completion_queue::ibdev, INIT_LIST_HEAD, ib_completion_queue::list, list_add_tail, list_del, ib_device::name, ib_completion_queue::num_cqes, ib_completion_queue::op, op, ib_device::op, rc, strerror(), ib_completion_queue::work_queues, and zalloc().
Referenced by eoib_open(), flexboot_nodnic_eth_open(), hermon_eth_open(), ib_cmrc_open(), ib_create_mi(), and ipoib_open().
void ib_destroy_cq | ( | struct ib_device * | ibdev, |
struct ib_completion_queue * | cq | ||
) |
Destroy completion queue.
ibdev | Infiniband device |
cq | Completion queue |
Definition at line 145 of file infiniband.c.
References assert(), ib_completion_queue::cqn, DBGC, ib_device_operations::destroy_cq, free, ib_completion_queue::ibdev, ib_completion_queue::list, list_del, list_empty, ib_device::name, ib_device::op, and ib_completion_queue::work_queues.
Referenced by eoib_close(), eoib_open(), flexboot_nodnic_eth_close(), hermon_eth_close(), hermon_eth_open(), ib_cmrc_open(), ib_cmrc_shutdown(), ib_create_mi(), ib_destroy_mi(), ipoib_close(), and ipoib_open().
void ib_poll_cq | ( | struct ib_device * | ibdev, |
struct ib_completion_queue * | cq | ||
) |
Poll completion queue.
ibdev | Infiniband device |
cq | Completion queue |
Definition at line 161 of file infiniband.c.
References ib_work_queue::cq, ib_refill_recv(), ib_work_queue::is_send, ib_work_queue::list, list_for_each_entry, ib_device::op, ib_device_operations::poll_cq, ib_work_queue::qp, and ib_completion_queue::work_queues.
Referenced by flexboot_nodnic_complete_all_tx(), golan_cq_clean(), and ib_poll_eq().
int ib_create_qp | ( | struct ib_device * | ibdev, |
enum ib_queue_pair_type | type, | ||
unsigned int | num_send_wqes, | ||
struct ib_completion_queue * | send_cq, | ||
unsigned int | num_recv_wqes, | ||
struct ib_completion_queue * | recv_cq, | ||
struct ib_queue_pair_operations * | op, | ||
const char * | name, | ||
struct ib_queue_pair ** | new_qp | ||
) |
Create queue pair.
ibdev | Infiniband device |
type | Queue pair type |
num_send_wqes | Number of send work queue entries |
send_cq | Send completion queue |
num_recv_wqes | Number of receive work queue entries |
recv_cq | Receive completion queue |
op | Queue pair operations |
name | Queue pair name |
new_qp | New queue pair to fill in |
rc | Return status code |
The queue pair will be left in the INIT state; you must call ib_modify_qp() before it is ready to use for sending and receiving.
Definition at line 199 of file infiniband.c.
References ib_device_operations::create_qp, DBGC, ib_device_operations::destroy_qp, ENOMEM, free, ib_qp_get_drvdata(), IB_QPN_GSI, IB_QPN_SMI, IB_QPT_GSI, IB_QPT_SMI, ib_queue_pair::ibdev, INIT_LIST_HEAD, list_add_tail, list_del, ib_device::name, name, op, ib_device::op, qp, ib_device::qps, random(), rc, strerror(), type, ib_completion_queue::work_queues, and zalloc().
Referenced by eoib_open(), flexboot_nodnic_eth_open(), hermon_eth_open(), ib_cmrc_open(), ib_create_mi(), and ipoib_open().
int ib_modify_qp | ( | struct ib_device * | ibdev, |
struct ib_queue_pair * | qp | ||
) |
Modify queue pair.
ibdev | Infiniband device |
qp | Queue pair |
rc | Return status code |
Definition at line 294 of file infiniband.c.
References DBGC, ib_queue_pair::ibdev, ib_device_operations::modify_qp, ib_device::name, ib_device::op, qp, rc, and strerror().
Referenced by hermon_eth_open(), ib_cm_req_complete(), ib_create_mi(), and ib_mcast_complete().
void ib_destroy_qp | ( | struct ib_device * | ibdev, |
struct ib_queue_pair * | qp | ||
) |
Destroy queue pair.
ibdev | Infiniband device |
qp | Queue pair |
Definition at line 314 of file infiniband.c.
References assert(), DBGC, ib_device_operations::destroy_qp, ECANCELED, free, ib_complete_recv(), ib_complete_send(), list_del, list_empty, ib_device::name, NULL, ib_device::op, and qp.
Referenced by eoib_close(), eoib_open(), flexboot_nodnic_eth_close(), flexboot_nodnic_eth_open(), hermon_eth_close(), hermon_eth_open(), ib_cmrc_open(), ib_cmrc_shutdown(), ib_create_mi(), ib_destroy_mi(), ipoib_close(), and ipoib_open().
struct ib_queue_pair* ib_find_qp_qpn | ( | struct ib_device * | ibdev, |
unsigned long | qpn | ||
) |
Find queue pair by QPN.
ibdev | Infiniband device |
qpn | Queue pair number |
qp | Queue pair, or NULL |
Definition at line 354 of file infiniband.c.
References ib_queue_pair::ibdev, ib_queue_pair::list, list_for_each_entry, NULL, qp, qpn, and ib_device::qps.
Referenced by ib_pull().
struct ib_queue_pair* ib_find_qp_mgid | ( | struct ib_device * | ibdev, |
union ib_gid * | gid | ||
) |
Find queue pair by multicast GID.
ibdev | Infiniband device |
gid | Multicast GID |
qp | Queue pair, or NULL |
Definition at line 372 of file infiniband.c.
References gid, ib_multicast_gid::list, list_for_each_entry, memcmp(), mgid, NULL, qp, and ib_device::qps.
Referenced by ib_pull().
struct ib_work_queue* ib_find_wq | ( | struct ib_completion_queue * | cq, |
unsigned long | qpn, | ||
int | is_send | ||
) |
Find work queue belonging to completion queue.
cq | Completion queue |
qpn | Queue pair number |
is_send | Find send work queue (rather than receive) |
wq | Work queue, or NULL if not found |
Definition at line 396 of file infiniband.c.
References ib_work_queue::cq, ib_work_queue::is_send, ib_work_queue::list, list_for_each_entry, NULL, ib_work_queue::qp, qpn, ib_queue_pair::qpn, and ib_completion_queue::work_queues.
Referenced by arbel_complete(), golan_complete(), and hermon_complete().
int ib_post_send | ( | struct ib_device * | ibdev, |
struct ib_queue_pair * | qp, | ||
struct ib_address_vector * | dest, | ||
struct io_buffer * | iobuf | ||
) |
Post send work queue entry.
ibdev | Infiniband device |
qp | Queue pair |
dest | Destination address vector |
iobuf | I/O buffer |
rc | Return status code |
Definition at line 416 of file infiniband.c.
References DBGC, dest, ENOBUFS, IB_RATE_2_5, memcpy(), ib_device::name, ib_device::op, ib_device_operations::post_send, profile_start(), profile_stop(), qp, rc, and strerror().
Referenced by eoib_duplicate(), eoib_transmit(), flexboot_nodnic_eth_transmit(), hermon_eth_transmit(), ib_cmrc_xfer_deliver(), ib_mi_send(), and ipoib_transmit().
int ib_post_recv | ( | struct ib_device * | ibdev, |
struct ib_queue_pair * | qp, | ||
struct io_buffer * | iobuf | ||
) |
Post receive work queue entry.
ibdev | Infiniband device |
qp | Queue pair |
iobuf | I/O buffer |
rc | Return status code |
Definition at line 470 of file infiniband.c.
References DBGC, EINVAL, ENOBUFS, IB_MAX_PAYLOAD_SIZE, iob_tailroom(), ib_device::name, ib_device::op, ib_device_operations::post_recv, profile_start(), profile_stop(), qp, rc, and strerror().
Referenced by ib_refill_recv().
void ib_complete_send | ( | struct ib_device * | ibdev, |
struct ib_queue_pair * | qp, | ||
struct io_buffer * | iobuf, | ||
int | rc | ||
) |
Complete send work queue entry.
ibdev | Infiniband device |
qp | Queue pair |
iobuf | I/O buffer |
rc | Completion status code |
Definition at line 515 of file infiniband.c.
References free_iob(), qp, and rc.
Referenced by arbel_complete(), flexboot_nodnic_complete(), golan_complete(), hermon_complete(), ib_destroy_qp(), linda_complete_send(), and qib7322_complete_send().
void ib_complete_recv | ( | struct ib_device * | ibdev, |
struct ib_queue_pair * | qp, | ||
struct ib_address_vector * | dest, | ||
struct ib_address_vector * | source, | ||
struct io_buffer * | iobuf, | ||
int | rc | ||
) |
Complete receive work queue entry.
ibdev | Infiniband device |
qp | Queue pair |
dest | Destination address vector, or NULL |
source | Source address vector, or NULL |
iobuf | I/O buffer |
rc | Completion status code |
Definition at line 536 of file infiniband.c.
References dest, free_iob(), qp, and rc.
Referenced by arbel_complete(), flexboot_nodnic_complete(), golan_complete(), hermon_complete(), ib_destroy_qp(), linda_complete_recv(), and qib7322_complete_recv().
void ib_refill_recv | ( | struct ib_device * | ibdev, |
struct ib_queue_pair * | qp | ||
) |
Refill receive work queue.
ibdev | Infiniband device |
qp | Queue pair |
Definition at line 556 of file infiniband.c.
References DBGC, free_iob(), IB_MAX_PAYLOAD_SIZE, ib_post_recv(), ib_device::name, qp, rc, and strerror().
Referenced by eoib_open(), flexboot_nodnic_eth_open(), hermon_eth_open(), ib_create_mi(), ib_poll_cq(), and ipoib_open().
int ib_open | ( | struct ib_device * | ibdev | ) |
Open port.
ibdev | Infiniband device |
rc | Return status code |
Definition at line 652 of file infiniband.c.
References assert(), ib_device_operations::close, DBGC, ib_device::gsi, ib_create_mi(), ib_create_sma(), ib_destroy_mi(), ib_destroy_sma(), ib_notify(), IB_QPT_GSI, IB_QPT_SMI, list_add, ib_device::name, ib_device::op, ib_device_operations::open, ib_device::open_count, open_ib_devices, ib_device::open_list, rc, ib_device::smi, and strerror().
Referenced by eoib_open(), ib_cmrc_open(), ipoib_open(), and xsigo_ib_open().
void ib_close | ( | struct ib_device * | ibdev | ) |
Close port.
ibdev | Infiniband device |
Definition at line 716 of file infiniband.c.
References ib_device_operations::close, ib_device::gsi, ib_destroy_mi(), ib_destroy_sma(), ib_notify(), IB_PORT_STATE_DOWN, list_del, ib_device::op, ib_device::open_count, ib_device::open_list, ib_device::port_state, and ib_device::smi.
Referenced by eoib_close(), eoib_open(), ib_cmrc_open(), ib_cmrc_shutdown(), ipoib_close(), ipoib_open(), and xsigo_ib_remove().
int ib_link_rc | ( | struct ib_device * | ibdev | ) |
Get link state.
ibdev | Infiniband device |
rc | Link status code |
Definition at line 594 of file infiniband.c.
References EINPROGRESS_ARMED, EINPROGRESS_INIT, EINVAL, ENOTCONN, IB_PORT_STATE_ACTIVE, IB_PORT_STATE_ARMED, IB_PORT_STATE_DOWN, IB_PORT_STATE_INIT, and ib_device::port_state.
Referenced by eoib_link_state_changed(), and ipoib_link_state_changed().
int ib_mcast_attach | ( | struct ib_device * | ibdev, |
struct ib_queue_pair * | qp, | ||
union ib_gid * | gid | ||
) |
Attach to multicast group.
ibdev | Infiniband device |
qp | Queue pair |
gid | Multicast GID |
rc | Return status code |
Note that this function handles only the local device's attachment to the multicast GID; it does not issue the relevant MADs to join the multicast group on the subnet.
Definition at line 752 of file infiniband.c.
References assert(), ENOMEM, free, gid, list_add_tail, list_del, ib_device_operations::mcast_attach, memcpy(), mgid, NULL, ib_device::op, qp, rc, and zalloc().
Referenced by ib_mcast_join().
void ib_mcast_detach | ( | struct ib_device * | ibdev, |
struct ib_queue_pair * | qp, | ||
union ib_gid * | gid | ||
) |
Detach from multicast group.
ibdev | Infiniband device |
qp | Queue pair |
gid | Multicast GID |
Definition at line 789 of file infiniband.c.
References assert(), free, gid, ib_multicast_gid::list, list_del, list_for_each_entry, ib_device_operations::mcast_detach, memcmp(), mgid, NULL, ib_device::op, and qp.
Referenced by ib_mcast_join(), and ib_mcast_leave().
Set port information.
ibdev | Infiniband device |
mad | Set port information MAD |
Definition at line 822 of file infiniband.c.
References DBGC, ENOTSUP, mad, ib_device::name, ib_device::op, rc, ib_device_operations::set_port_info, and strerror().
Referenced by ib_sma_set_port_info().
Set partition key table.
ibdev | Infiniband device |
mad | Set partition key table MAD |
Definition at line 847 of file infiniband.c.
References DBGC, ENOTSUP, mad, ib_device::name, ib_device::op, rc, ib_device_operations::set_pkey_table, and strerror().
Referenced by ib_sma_set_pkey_table().
Allocate Infiniband device.
priv_size | Size of driver private data area |
ibdev | Infiniband device, or NULL |
Definition at line 917 of file infiniband.c.
References ib_device::cqs, ib_device::drv_priv, IB_LID_NONE, IB_PKEY_DEFAULT, IB_PORT_STATE_DOWN, ib_set_drvdata(), INIT_LIST_HEAD, ib_device::lid, ib_device::list, ib_device::open_list, ib_device::pkey, ib_device::port_state, ib_device::qps, and zalloc().
Referenced by arbel_probe(), flexboot_nodnic_allocate_infiniband_devices(), golan_probe_normal(), hermon_probe(), linda_probe(), and qib7322_probe().
int register_ibdev | ( | struct ib_device * | ibdev | ) |
Register Infiniband device.
ibdev | Infiniband device |
rc | Return status code |
Definition at line 944 of file infiniband.c.
References DBGC, ib_device::dev, for_each_table_entry, for_each_table_entry_continue_reverse, ib_devices, IB_DRIVERS, ibdev_get(), ibdev_index, ibdev_put(), ib_device::index, ib_device::list, list_add_tail, list_del, device::name, ib_device::name, ib_driver::name, ib_driver::probe, rc, ib_driver::remove, snprintf(), and strerror().
Referenced by arbel_probe(), golan_register_ibdev(), hermon_register_ibdev(), linda_probe(), and qib7322_probe().
void unregister_ibdev | ( | struct ib_device * | ibdev | ) |
Unregister Infiniband device.
ibdev | Infiniband device |
Definition at line 985 of file infiniband.c.
References DBGC, for_each_table_entry_reverse, ib_devices, IB_DRIVERS, ibdev_index, ibdev_put(), ib_device::list, list_del, list_empty, ib_device::name, and ib_driver::remove.
Referenced by arbel_probe(), arbel_remove(), golan_probe_normal(), golan_remove_normal(), hermon_unregister_ibdev(), linda_probe(), linda_remove(), qib7322_probe(), and qib7322_remove().
Find Infiniband device by GID.
gid | GID |
ibdev | Infiniband device, or NULL |
Definition at line 1008 of file infiniband.c.
References for_each_ibdev, gid, ib_device::gid, memcmp(), and NULL.
Referenced by ib_srp_open_uri().
struct ib_device* last_opened_ibdev | ( | void | ) |
Get most recently opened Infiniband device.
ibdev | Most recently opened Infiniband device, or NULL |
Definition at line 1023 of file infiniband.c.
References assert(), list_first_entry, NULL, ib_device::open_count, open_ib_devices, and ib_device::open_list.
Referenced by ib_srp_parse_sgid().
void ib_link_state_changed | ( | struct ib_device * | ibdev | ) |
Notify of Infiniband link state change.
ibdev | Infiniband device |
Definition at line 637 of file infiniband.c.
References DBGC, ib_link_state_text(), ib_notify(), and ib_device::name.
Referenced by golan_ib_update(), ib_smc_update(), linda_link_state_changed(), and qib7322_link_state_changed().
void ib_poll_eq | ( | struct ib_device * | ibdev | ) |
Poll event queue.
ibdev | Infiniband device |
Definition at line 878 of file infiniband.c.
References ib_device::cqs, ib_poll_cq(), ib_completion_queue::ibdev, ib_completion_queue::list, list_for_each_entry, ib_device::op, and ib_device_operations::poll_eq.
Referenced by eoib_poll(), flexboot_nodnic_eth_poll(), hermon_eth_poll(), ib_step(), and ipoib_poll().
|
inlinestatic |
Check link state of Infiniband device.
ibdev | Infiniband device |
link_up | Link is up |
Definition at line 565 of file infiniband.h.
References IB_PORT_STATE_ACTIVE, and ib_device::port_state.
Referenced by eoib_link_state_changed(), ibstat(), ipoib_link_state_changed(), ipoib_transmit(), xsigo_ib_notify(), and xsigo_ib_open().
|
inlinestatic |
Check whether or not Infiniband device is open.
ibdev | Infiniband device |
is_open | Infiniband device is open |
Definition at line 576 of file infiniband.h.
References ib_device::open_count.
Referenced by arbel_poll_eq(), eoib_link_state_changed(), golan_handle_port_event(), hermon_poll_eq(), ibstat(), and ipoib_link_state_changed().
|
inlinestatic |
Get reference to Infiniband device.
ibdev | Infiniband device |
ibdev | Infiniband device |
Definition at line 587 of file infiniband.h.
References ref_get, and ib_device::refcnt.
Referenced by eoib_create(), ib_srp_open(), register_ibdev(), and xsigo_ib_probe().
|
inlinestatic |
Drop reference to Infiniband device.
ibdev | Infiniband device |
Definition at line 598 of file infiniband.h.
References ref_put, and ib_device::refcnt.
Referenced by arbel_probe(), arbel_remove(), eoib_create(), eoib_destroy(), flexboot_nodnic_allocate_infiniband_devices(), flexboot_nodnic_ports_unregister_dev(), golan_probe_normal(), golan_remove_normal(), hermon_probe(), hermon_remove(), ib_srp_free(), linda_probe(), linda_remove(), qib7322_probe(), qib7322_remove(), register_ibdev(), unregister_ibdev(), and xsigo_free().
|
inlinestatic |
Set Infiniband work queue driver-private data.
wq | Work queue |
priv | Private data |
Definition at line 609 of file infiniband.h.
References ib_work_queue::drv_priv, and priv.
Referenced by linda_create_qp(), and qib7322_create_qp().
|
inlinestatic |
Get Infiniband work queue driver-private data.
wq | Work queue |
priv | Private data |
Definition at line 620 of file infiniband.h.
References ib_work_queue::drv_priv.
Referenced by linda_complete_recv(), linda_complete_send(), linda_create_recv_wq(), linda_create_send_wq(), linda_destroy_recv_wq(), linda_destroy_send_wq(), linda_poll_recv_wq(), linda_poll_send_wq(), linda_post_recv(), linda_post_send(), qib7322_complete_recv(), qib7322_complete_send(), qib7322_create_recv_wq(), qib7322_create_send_wq(), qib7322_destroy_recv_wq(), qib7322_destroy_send_wq(), qib7322_poll_recv_wq(), qib7322_poll_send_wq(), qib7322_post_recv(), and qib7322_post_send().
|
inlinestatic |
Set Infiniband queue pair driver-private data.
qp | Queue pair |
priv | Private data |
Definition at line 631 of file infiniband.h.
Referenced by arbel_create_qp(), arbel_destroy_qp(), flexboot_nodnic_create_qp(), golan_create_qp_aux(), golan_destroy_qp(), hermon_create_qp(), and hermon_destroy_qp().
|
inlinestatic |
Get Infiniband queue pair driver-private data.
qp | Queue pair |
priv | Private data |
Definition at line 642 of file infiniband.h.
References qp.
Referenced by arbel_complete(), arbel_destroy_qp(), arbel_modify_qp(), arbel_post_recv(), arbel_post_send(), flexboot_nodnic_destroy_qp(), flexboot_nodnic_eth_open(), flexboot_nodnic_find_wq(), flexboot_nodnic_post_recv(), flexboot_nodnic_post_send(), golan_complete(), golan_destroy_qp(), golan_modify_qp(), golan_modify_qp_to_rst(), golan_post_recv(), golan_post_send(), hermon_complete(), hermon_destroy_qp(), hermon_dump_qpctx(), hermon_modify_qp(), hermon_post_recv(), hermon_post_send(), ib_create_qp(), and shomron_fill_eth_send_wqe().
|
inlinestatic |
Set Infiniband queue pair owner-private data.
qp | Queue pair |
priv | Private data |
Definition at line 653 of file infiniband.h.
Referenced by eoib_open(), flexboot_nodnic_eth_open(), hermon_eth_open(), ib_cmrc_open(), ib_create_mi(), and ipoib_open().
|
inlinestatic |
Get Infiniband queue pair owner-private data.
qp | Queue pair |
priv | Private data |
Definition at line 664 of file infiniband.h.
References qp.
Referenced by eoib_complete_recv(), eoib_complete_send(), flexboot_nodnic_eth_complete_recv(), flexboot_nodnic_eth_complete_send(), hermon_eth_complete_recv(), hermon_eth_complete_send(), ib_cmrc_changed(), ib_cmrc_complete_recv(), ib_cmrc_complete_send(), ib_mi_complete_recv(), ipoib_complete_recv(), and ipoib_complete_send().
|
inlinestatic |
Set Infiniband completion queue driver-private data.
cq | Completion queue |
priv | Private data |
Definition at line 675 of file infiniband.h.
References ib_completion_queue::drv_priv, and priv.
Referenced by arbel_create_cq(), arbel_destroy_cq(), flexboot_nodnic_create_cq(), golan_create_cq(), golan_destroy_cq(), hermon_create_cq(), and hermon_destroy_cq().
|
inlinestatic |
Get Infiniband completion queue driver-private data.
cq | Completion queue |
priv | Private data |
Definition at line 686 of file infiniband.h.
References ib_completion_queue::drv_priv.
Referenced by arbel_destroy_cq(), arbel_poll_cq(), flexboot_nodnic_destroy_cq(), flexboot_nodnic_poll_cq(), golan_destroy_cq(), golan_poll_cq(), hermon_destroy_cq(), hermon_poll_cq(), and ib_create_cq().
|
inlinestatic |
Set Infiniband device driver-private data.
ibdev | Infiniband device |
priv | Private data |
Definition at line 697 of file infiniband.h.
References ib_device::drv_priv, and priv.
Referenced by alloc_ibdev(), arbel_probe(), flexboot_nodnic_allocate_infiniband_devices(), golan_probe_normal(), hermon_probe(), and qib7322_probe().
|
inlinestatic |
Get Infiniband device driver-private data.
ibdev | Infiniband device |
priv | Private data |
Definition at line 708 of file infiniband.h.
References ib_device::drv_priv.
Referenced by arbel_alloc_qpn(), arbel_complete(), arbel_create_cq(), arbel_create_qp(), arbel_destroy_cq(), arbel_destroy_qp(), arbel_fill_mlx_send_wqe(), arbel_fill_rc_send_wqe(), arbel_fill_ud_send_wqe(), arbel_free_qpn(), arbel_ib_close(), arbel_ib_open(), arbel_mad(), arbel_mcast_attach(), arbel_mcast_detach(), arbel_modify_qp(), arbel_poll_cq(), arbel_poll_eq(), arbel_post_recv(), arbel_post_send(), flexboot_nodnic_complete(), flexboot_nodnic_create_cq(), flexboot_nodnic_create_qp(), flexboot_nodnic_destroy_cq(), flexboot_nodnic_destroy_qp(), flexboot_nodnic_eth_close(), flexboot_nodnic_eth_open(), flexboot_nodnic_eth_transmit(), flexboot_nodnic_find_wq(), flexboot_nodnic_mcast_attach(), flexboot_nodnic_mcast_detach(), flexboot_nodnic_poll_cq(), flexboot_nodnic_poll_eq(), flexboot_nodnic_post_recv(), flexboot_nodnic_post_send(), golan_complete(), golan_create_cq(), golan_create_qp_aux(), golan_destroy_cq(), golan_destroy_qp(), golan_ib_close(), golan_ib_open(), golan_mcast_attach(), golan_mcast_detach(), golan_modify_qp(), golan_modify_qp_to_rst(), golan_poll_cq(), golan_poll_eq(), golan_post_recv(), golan_post_send(), golan_query_vport_context(), golan_query_vport_gid(), golan_query_vport_pkey(), hermon_alloc_qpn(), hermon_complete(), hermon_create_cq(), hermon_create_qp(), hermon_destroy_cq(), hermon_destroy_qp(), hermon_eth_close(), hermon_eth_open(), hermon_eth_transmit(), hermon_fill_eth_send_wqe(), hermon_fill_mlx_send_wqe(), hermon_fill_rc_send_wqe(), hermon_fill_ud_send_wqe(), hermon_free_qpn(), hermon_ib_close(), hermon_ib_open(), hermon_mad(), hermon_mcast_attach(), hermon_mcast_detach(), hermon_modify_qp(), hermon_poll_cq(), hermon_poll_eq(), hermon_post_recv(), hermon_post_send(), linda_close(), linda_complete_recv(), linda_complete_send(), linda_create_cq(), linda_create_qp(), linda_destroy_cq(), linda_destroy_qp(), linda_link_state_changed(), linda_mcast_attach(), linda_mcast_detach(), linda_modify_qp(), linda_open(), linda_poll_eq(), linda_poll_recv_wq(), linda_poll_send_wq(), linda_post_recv(), linda_post_send(), linda_probe(), linda_remove(), linda_set_port_info(), qib7322_alloc_ctx(), qib7322_close(), qib7322_complete_recv(), qib7322_complete_send(), qib7322_create_cq(), qib7322_create_qp(), qib7322_create_recv_wq(), qib7322_create_send_wq(), qib7322_destroy_cq(), qib7322_destroy_recv_wq(), qib7322_free_ctx(), qib7322_link_state_changed(), qib7322_link_state_check(), qib7322_mcast_attach(), qib7322_mcast_detach(), qib7322_modify_qp(), qib7322_open(), qib7322_poll_eq(), qib7322_poll_recv_wq(), qib7322_poll_send_wq(), qib7322_post_recv(), qib7322_post_send(), qib7322_set_port_info(), shomron_fill_eth_send_wqe(), and shomron_tx_uar_send_db().
struct list_head ib_devices |
List of Infiniband devices.
Definition at line 52 of file infiniband.c.
Referenced by register_ibdev(), and unregister_ibdev().