[hermon] Add support for RC queue pairs
This commit is contained in:
@@ -30,6 +30,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
#define HERMON_PCI_UAR_BAR PCI_BASE_ADDRESS_2
|
||||
|
||||
/* Work queue entry and completion queue entry opcodes */
|
||||
#define HERMON_OPCODE_NOP 0x00
|
||||
#define HERMON_OPCODE_SEND 0x0a
|
||||
#define HERMON_OPCODE_RECV_ERROR 0xfe
|
||||
#define HERMON_OPCODE_SEND_ERROR 0xff
|
||||
@@ -54,6 +55,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
#define HERMON_HCR_RTR2RTS_QP 0x001b
|
||||
#define HERMON_HCR_RTS2RTS_QP 0x001c
|
||||
#define HERMON_HCR_2RST_QP 0x0021
|
||||
#define HERMON_HCR_QUERY_QP 0x0022
|
||||
#define HERMON_HCR_CONF_SPECIAL_QP 0x0023
|
||||
#define HERMON_HCR_MAD_IFC 0x0024
|
||||
#define HERMON_HCR_READ_MCG 0x0025
|
||||
@@ -71,6 +73,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
#define HERMON_HCR_MAP_FA 0x0fff
|
||||
|
||||
/* Service types */
|
||||
#define HERMON_ST_RC 0x00
|
||||
#define HERMON_ST_UD 0x03
|
||||
#define HERMON_ST_MLX 0x07
|
||||
|
||||
@@ -85,7 +88,9 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
#define HERMON_DB_EQ_OFFSET(_eqn) \
|
||||
( 0x800 + HERMON_PAGE_SIZE * ( (_eqn) / 4 ) + 0x08 * ( (_eqn) % 4 ) )
|
||||
|
||||
#define HERMON_QP_OPT_PARAM_PM_STATE 0x00000400UL
|
||||
#define HERMON_QP_OPT_PARAM_QKEY 0x00000020UL
|
||||
#define HERMON_QP_OPT_PARAM_ALT_PATH 0x00000001UL
|
||||
|
||||
#define HERMON_MAP_EQ ( 0UL << 31 )
|
||||
#define HERMON_UNMAP_EQ ( 1UL << 31 )
|
||||
@@ -95,6 +100,12 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
#define HERMON_SCHED_QP0 0x3f
|
||||
#define HERMON_SCHED_DEFAULT 0x83
|
||||
|
||||
#define HERMON_PM_STATE_ARMED 0x00
|
||||
#define HERMON_PM_STATE_REARM 0x01
|
||||
#define HERMON_PM_STATE_MIGRATED 0x03
|
||||
|
||||
#define HERMON_RETRY_MAX 0x07
|
||||
|
||||
/*
|
||||
* Datatypes that seem to be missing from the autogenerated documentation
|
||||
*
|
||||
@@ -214,6 +225,11 @@ struct hermonprm_mlx_send_wqe {
|
||||
uint8_t headers[IB_MAX_HEADER_SIZE];
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
struct hermonprm_rc_send_wqe {
|
||||
struct hermonprm_wqe_segment_ctrl_send ctrl;
|
||||
struct hermonprm_wqe_segment_data_ptr data[HERMON_MAX_GATHER];
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
#define HERMON_MAX_SCATTER 1
|
||||
|
||||
struct hermonprm_recv_wqe {
|
||||
@@ -336,6 +352,7 @@ union hermon_send_wqe {
|
||||
struct hermonprm_wqe_segment_ctrl_send ctrl;
|
||||
struct hermonprm_ud_send_wqe ud;
|
||||
struct hermonprm_mlx_send_wqe mlx;
|
||||
struct hermonprm_rc_send_wqe rc;
|
||||
uint8_t force_align[HERMON_SEND_WQE_ALIGN];
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
@@ -485,11 +502,11 @@ struct hermon {
|
||||
|
||||
/** Event queue */
|
||||
struct hermon_event_queue eq;
|
||||
/** Reserved LKey
|
||||
/** Unrestricted LKey
|
||||
*
|
||||
* Used to get unrestricted memory access.
|
||||
*/
|
||||
unsigned long reserved_lkey;
|
||||
unsigned long lkey;
|
||||
|
||||
/** Completion queue in-use bitmask */
|
||||
hermon_bitmask_t cq_inuse[ HERMON_BITMASK_SIZE ( HERMON_MAX_CQS ) ];
|
||||
|
||||
Reference in New Issue
Block a user