1#ifndef _IPXE_INFINIBAND_H
2#define _IPXE_INFINIBAND_H
31#define IB_QKEY_GSI 0x80010000UL
34#define IB_QPN_BROADCAST 0xffffffUL
37#define IB_QPN_MASK 0xffffffUL
40#define IB_PKEY_DEFAULT 0xffff
43#define IB_PKEY_FULL 0x8000
51#define IB_MAX_PAYLOAD_SIZE 2048
396#define IBDEV_NAME_LEN 8
494#define IB_DRIVERS __table ( struct ib_driver, "ib_drivers" )
497#define __ib_driver __table_entry ( IB_DRIVERS, 01 )
507 unsigned int num_send_wqes,
509 unsigned int num_recv_wqes,
556#define for_each_ibdev( ibdev ) \
557 list_for_each_entry ( (ibdev), &ib_devices, list )
666 return qp->owner_priv;
struct arbelprm_rc_send_wqe rc
struct arbelprm_qp_db_record qp
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" retur dest)
uint32_t type
Operating system type.
#define __always_inline
Declare a function to be always inline.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Infiniband management datagrams.
#define IB_PORT_STATE_ACTIVE
Infiniband packet format.
struct list_head ib_devices
List of Infiniband devices.
void ib_refill_recv(struct ib_device *ibdev, struct ib_queue_pair *qp)
Refill receive work queue.
static __always_inline int ib_link_ok(struct ib_device *ibdev)
Check link state of Infiniband device.
int ib_mcast_attach(struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid)
Attach to multicast group.
static __always_inline void * ib_get_drvdata(struct ib_device *ibdev)
Get Infiniband device driver-private data.
void ib_link_state_changed(struct ib_device *ibdev)
Notify of Infiniband link state change.
void ib_destroy_cq(struct ib_device *ibdev, struct ib_completion_queue *cq)
Destroy completion queue.
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.
static __always_inline void * ib_cq_get_drvdata(struct ib_completion_queue *cq)
Get Infiniband completion queue driver-private data.
int ib_set_port_info(struct ib_device *ibdev, union ib_mad *mad)
Set port information.
int ib_open(struct ib_device *ibdev)
Open port.
int ib_modify_qp(struct ib_device *ibdev, struct ib_queue_pair *qp)
Modify queue pair.
static __always_inline void * ib_qp_get_ownerdata(struct ib_queue_pair *qp)
Get Infiniband queue pair owner-private data.
static __always_inline struct ib_device * ibdev_get(struct ib_device *ibdev)
Get reference to Infiniband device.
static __always_inline void ib_qp_set_ownerdata(struct ib_queue_pair *qp, void *priv)
Set Infiniband queue pair owner-private data.
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.
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.
ib_queue_pair_type
An Infiniband queue pair type.
int register_ibdev(struct ib_device *ibdev)
Register Infiniband device.
struct ib_queue_pair * ib_find_qp_mgid(struct ib_device *ibdev, union ib_gid *gid)
Find queue pair by multicast GID.
static __always_inline void * ib_qp_get_drvdata(struct ib_queue_pair *qp)
Get Infiniband queue pair driver-private data.
void unregister_ibdev(struct ib_device *ibdev)
Unregister Infiniband device.
int ib_post_recv(struct ib_device *ibdev, struct ib_queue_pair *qp, struct io_buffer *iobuf)
Post receive work queue entry.
int ib_link_rc(struct ib_device *ibdev)
Get link state.
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.
void ib_poll_eq(struct ib_device *ibdev)
Poll event queue.
static __always_inline void ib_cq_set_drvdata(struct ib_completion_queue *cq, void *priv)
Set Infiniband completion queue driver-private data.
void ib_mcast_detach(struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid)
Detach from multicast group.
static __always_inline void ib_qp_set_drvdata(struct ib_queue_pair *qp, void *priv)
Set Infiniband queue pair driver-private data.
void ib_close(struct ib_device *ibdev)
Close port.
void ib_poll_cq(struct ib_device *ibdev, struct ib_completion_queue *cq)
Poll completion queue.
void ib_destroy_qp(struct ib_device *ibdev, struct ib_queue_pair *qp)
Destroy queue pair.
struct ib_queue_pair * ib_find_qp_qpn(struct ib_device *ibdev, unsigned long qpn)
Find queue pair by QPN.
struct ib_device * find_ibdev(union ib_gid *gid)
Find Infiniband device by GID.
#define IBDEV_NAME_LEN
Maximum length of an Infiniband device name.
static int ib_is_open(struct ib_device *ibdev)
Check whether or not Infiniband device is open.
static __always_inline void ib_set_drvdata(struct ib_device *ibdev, void *priv)
Set Infiniband device driver-private data.
static __always_inline void * ib_wq_get_drvdata(struct ib_work_queue *wq)
Get Infiniband work queue driver-private data.
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.
static __always_inline void ib_wq_set_drvdata(struct ib_work_queue *wq, void *priv)
Set Infiniband work queue driver-private data.
ib_rate
Infiniband transmission rates.
void ib_complete_send(struct ib_device *ibdev, struct ib_queue_pair *qp, struct io_buffer *iobuf, int rc)
Complete send work queue entry.
struct ib_device * alloc_ibdev(size_t priv_size)
Allocate Infiniband device.
static __always_inline void ibdev_put(struct ib_device *ibdev)
Drop reference to Infiniband device.
struct ib_device * last_opened_ibdev(void)
Get most recently opened Infiniband device.
int ib_set_pkey_table(struct ib_device *ibdev, union ib_mad *mad)
Set partition key table.
static uint16_t struct vmbus_xfer_pages_operations * op
#define ref_get(refcnt)
Get additional reference to object.
#define ref_put(refcnt)
Drop reference to object.
An Infiniband Address Vector.
unsigned int sl
Service level.
unsigned int vlan
VLAN, if present.
unsigned long qkey
Queue key.
unsigned int gid_present
GID is present.
unsigned int lid
Local ID.
union ib_gid gid
GID, if present.
unsigned int vlan_present
VLAN is present.
unsigned long qpn
Queue Pair Number.
Infiniband completion queue operations.
void(* 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 WQE.
void(* complete_send)(struct ib_device *ibdev, struct ib_queue_pair *qp, struct io_buffer *iobuf, int rc)
Complete Send WQE.
An Infiniband Completion Queue.
struct ib_device * ibdev
Containing Infiniband device.
void * drv_priv
Driver private data.
unsigned long cqn
Completion queue number.
struct list_head list
List of completion queues on this Infiniband device.
unsigned long next_idx
Next completion queue entry index.
struct list_head work_queues
List of work queues completing to this queue.
struct ib_completion_queue_operations * op
Completion queue operations.
unsigned int num_cqes
Number of completion queue entries.
Infiniband device operations.
int(* create_qp)(struct ib_device *ibdev, struct ib_queue_pair *qp)
Create queue pair.
int(* 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.
void(* destroy_qp)(struct ib_device *ibdev, struct ib_queue_pair *qp)
Destroy queue pair.
int(* set_port_info)(struct ib_device *ibdev, union ib_mad *mad)
Set port information.
int(* set_pkey_table)(struct ib_device *ibdev, union ib_mad *mad)
Set partition key table.
int(* mcast_attach)(struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid)
Attach to multicast group.
int(* post_recv)(struct ib_device *ibdev, struct ib_queue_pair *qp, struct io_buffer *iobuf)
Post receive work queue entry.
void(* close)(struct ib_device *ibdev)
Close port.
void(* poll_cq)(struct ib_device *ibdev, struct ib_completion_queue *cq)
Poll completion queue.
void(* mcast_detach)(struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid)
Detach from multicast group.
int(* create_cq)(struct ib_device *ibdev, struct ib_completion_queue *cq)
Create completion queue.
void(* destroy_cq)(struct ib_device *ibdev, struct ib_completion_queue *cq)
Destroy completion queue.
void(* poll_eq)(struct ib_device *ibdev)
Poll event queue.
int(* modify_qp)(struct ib_device *ibdev, struct ib_queue_pair *qp)
Modify queue pair.
int(* open)(struct ib_device *ibdev)
Open port.
uint8_t sm_sl
Subnet manager SL.
struct ib_mad_interface * gsi
General services interface.
uint8_t link_width_enabled
Link width enabled.
char name[IBDEV_NAME_LEN]
Name of this Infiniband device.
uint8_t link_speed_active
Link speed active.
unsigned int ports
Total ports on device.
struct list_head list
List of Infiniband devices.
uint8_t link_speed_supported
Link speed supported.
uint16_t sm_lid
Subnet manager LID.
struct ib_device_operations * op
Infiniband operations.
unsigned int index
Index of this Infiniband device.
union ib_guid node_guid
Node GUID.
uint16_t pkey
Partition key.
void * drv_priv
Driver private data.
struct refcnt refcnt
Reference counter.
struct ib_mad_interface * smi
Subnet management interface.
struct device * dev
Underlying device.
uint8_t lemac[ETH_ALEN]
IPoIB LEMAC (if non-default)
uint8_t link_width_active
Link width active.
uint8_t link_speed_enabled
Link speed enabled.
uint8_t link_width_supported
Link width supported.
struct list_head qps
List of queue pairs.
uint8_t port_state
Port state.
union ib_gid gid
Port GID (comprising GID prefix and port GUID)
struct list_head cqs
List of completion queues.
unsigned int open_count
Port open request counter.
unsigned int port
Port number.
uint32_t rdma_key
RDMA key.
struct list_head open_list
List of open Infiniband devices.
An Infiniband upper-layer driver.
int(* probe)(struct ib_device *ibdev)
Probe device.
void(* remove)(struct ib_device *ibdev)
Remove device.
void(* notify)(struct ib_device *ibdev)
Notify of device or link state change.
An Infiniband management interface.
An Infiniband multicast GID.
struct list_head list
List of multicast GIDs on this QP.
Infiniband queue pair operations.
An Infiniband Queue Pair.
enum ib_queue_pair_type type
Queue pair type.
struct ib_address_vector av
Address vector.
struct ib_work_queue recv
Receive queue.
struct list_head list
List of queue pairs on this Infiniband device.
unsigned long qpn
Queue pair number.
const char * name
Queue pair name.
struct ib_queue_pair_operations * op
Queue pair operations.
void * drv_priv
Driver private data.
unsigned long ext_qpn
Externally-visible queue pair number.
struct ib_device * ibdev
Containing Infiniband device.
unsigned long qkey
Queue key.
struct list_head mgids
List of multicast GIDs.
void * owner_priv
Queue owner private data.
struct ib_work_queue send
Send queue.
An Infiniband Work Queue.
unsigned int fill
Number of occupied work queue entries.
struct io_buffer ** iobufs
I/O buffers assigned to work queue.
void * drv_priv
Driver private data.
struct ib_completion_queue * cq
Associated completion queue.
struct list_head list
List of work queues on this completion queue.
struct ib_queue_pair * qp
Containing queue pair.
uint32_t psn
Packet sequence number.
int is_send
"Is a send queue" flag
unsigned long next_idx
Next work queue entry index.
unsigned int num_wqes
Number of work queue entries.
A doubly-linked list entry (or list head)
static struct tlan_private * priv
An Infiniband Global Identifier.
An Infiniband Globally Unique Identifier.