mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 10:01:03 +03:00
Direct polling of TX completion queue now works.
This commit is contained in:
@@ -1,6 +1,26 @@
|
||||
#ifndef _ARBEL_H
|
||||
#define _ARBEL_H
|
||||
|
||||
/** @file
|
||||
*
|
||||
* Mellanox Arbel Infiniband HCA driver
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Hardware constants
|
||||
*
|
||||
*/
|
||||
|
||||
#define ARBEL_OPCODE_SEND 0x0a
|
||||
#define ARBEL_OPCODE_RECV_ERROR 0xfe
|
||||
#define ARBEL_OPCODE_SEND_ERROR 0xff
|
||||
|
||||
/*
|
||||
* Wrapper structures for hardware datatypes
|
||||
*
|
||||
*/
|
||||
|
||||
struct MLX_DECLARE_STRUCT ( arbelprm_completion_queue_entry );
|
||||
struct MLX_DECLARE_STRUCT ( arbelprm_completion_with_error );
|
||||
struct MLX_DECLARE_STRUCT ( arbelprm_cq_ci_db_record );
|
||||
@@ -12,6 +32,11 @@ struct MLX_DECLARE_STRUCT ( arbelprm_wqe_segment_data_ptr );
|
||||
struct MLX_DECLARE_STRUCT ( arbelprm_wqe_segment_next );
|
||||
struct MLX_DECLARE_STRUCT ( arbelprm_wqe_segment_ud );
|
||||
|
||||
/*
|
||||
* Composite hardware datatypes
|
||||
*
|
||||
*/
|
||||
|
||||
#define ARBELPRM_MAX_GATHER 1
|
||||
|
||||
struct arbelprm_ud_send_wqe {
|
||||
@@ -36,4 +61,58 @@ union arbelprm_doorbell_register {
|
||||
uint32_t dword[2];
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/*
|
||||
* gPXE-specific definitions
|
||||
*
|
||||
*/
|
||||
|
||||
/** Alignment of Arbel send work queue entries */
|
||||
#define ARBEL_SEND_WQE_ALIGN 128
|
||||
|
||||
/** An Arbel send work queue entry */
|
||||
union arbel_send_wqe {
|
||||
struct arbelprm_ud_send_wqe ud;
|
||||
uint8_t force_align[ARBEL_SEND_WQE_ALIGN];
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** An Arbel send work queue */
|
||||
struct arbel_send_work_queue {
|
||||
/** Doorbell record number */
|
||||
unsigned int doorbell_idx;
|
||||
/** Work queue entries */
|
||||
union arbel_send_wqe *wqe;
|
||||
};
|
||||
|
||||
/** Alignment of Arbel receive work queue entries */
|
||||
#define ARBEL_RECV_WQE_ALIGN 64
|
||||
|
||||
/** An Arbel receive work queue entry */
|
||||
union arbel_recv_wqe {
|
||||
uint8_t force_align[ARBEL_RECV_WQE_ALIGN];
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** An Arbel receive work queue */
|
||||
struct arbel_recv_work_queue {
|
||||
/** Doorbell record number */
|
||||
unsigned int doorbell_idx;
|
||||
/** Work queue entries */
|
||||
union arbel_recv_wqe *wqe;
|
||||
};
|
||||
|
||||
/** An Arbel completion queue */
|
||||
struct arbel_completion_queue {
|
||||
/** Doorbell record number */
|
||||
unsigned int doorbell_idx;
|
||||
/** Completion queue entries */
|
||||
union arbelprm_completion_entry *cqe;
|
||||
};
|
||||
|
||||
/** An Arbel device */
|
||||
struct arbel {
|
||||
/** User Access Region */
|
||||
void *uar;
|
||||
/** Doorbell records */
|
||||
union arbelprm_doorbell_record *db_rec;
|
||||
};
|
||||
|
||||
#endif /* _ARBEL_H */
|
||||
|
||||
Reference in New Issue
Block a user