mirror of
https://github.com/ipxe/ipxe
synced 2026-01-01 17:34:42 +03:00
[infiniband] Add infrastructure for RC queue pairs
Queue pairs are now assumed to be created in the INIT state, with a call to ib_modify_qp() required to bring the queue pair to the RTS state. ib_modify_qp() no longer takes a modification list; callers should modify the relevant queue pair parameters (e.g. qkey) directly and then call ib_modify_qp() to synchronise the changes to the hardware. The packet sequence number is now a property of the queue pair, rather than of the device. Each queue pair may have an associated address vector. For RC queue pairs, this is the address vector that will be programmed in to the hardware as the remote address. For UD queue pairs, it will be used as the default address vector if none is supplied to ib_post_send().
This commit is contained in:
@@ -855,7 +855,6 @@ static int arbel_create_qp ( struct ib_device *ibdev,
|
||||
( virt_to_bus ( arbel_qp->recv.wqe ) >> 6 ) );
|
||||
MLX_FILL_1 ( &qpctx, 43, qpc_eec_data.rcv_db_record_index,
|
||||
arbel_qp->recv.doorbell_idx );
|
||||
MLX_FILL_1 ( &qpctx, 44, qpc_eec_data.q_key, qp->qkey );
|
||||
if ( ( rc = arbel_cmd_rst2init_qpee ( arbel, qp->qpn, &qpctx )) != 0 ){
|
||||
DBGC ( arbel, "Arbel %p RST2INIT_QPEE failed: %s\n",
|
||||
arbel, strerror ( rc ) );
|
||||
@@ -908,24 +907,17 @@ static int arbel_create_qp ( struct ib_device *ibdev,
|
||||
*
|
||||
* @v ibdev Infiniband device
|
||||
* @v qp Queue pair
|
||||
* @v mod_list Modification list
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int arbel_modify_qp ( struct ib_device *ibdev,
|
||||
struct ib_queue_pair *qp,
|
||||
unsigned long mod_list ) {
|
||||
struct ib_queue_pair *qp ) {
|
||||
struct arbel *arbel = ib_get_drvdata ( ibdev );
|
||||
struct arbelprm_qp_ee_state_transitions qpctx;
|
||||
unsigned long optparammask = 0;
|
||||
int rc;
|
||||
|
||||
/* Construct optparammask */
|
||||
if ( mod_list & IB_MODIFY_QKEY )
|
||||
optparammask |= ARBEL_QPEE_OPT_PARAM_QKEY;
|
||||
|
||||
/* Issue RTS2RTS_QP */
|
||||
memset ( &qpctx, 0, sizeof ( qpctx ) );
|
||||
MLX_FILL_1 ( &qpctx, 0, opt_param_mask, optparammask );
|
||||
MLX_FILL_1 ( &qpctx, 0, opt_param_mask, ARBEL_QPEE_OPT_PARAM_QKEY );
|
||||
MLX_FILL_1 ( &qpctx, 44, qpc_eec_data.q_key, qp->qkey );
|
||||
if ( ( rc = arbel_cmd_rts2rts_qp ( arbel, qp->qpn, &qpctx ) ) != 0 ){
|
||||
DBGC ( arbel, "Arbel %p RTS2RTS_QP failed: %s\n",
|
||||
|
||||
Reference in New Issue
Block a user