Skip to content

Commit

Permalink
prov/cxi: Update ctrl msg to use dom cmdq
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Ziemba <ian.ziemba@hpe.com>
(cherry picked from commit fd17e4c)
  • Loading branch information
iziemba authored and jswaro committed Feb 12, 2024
1 parent 6f37db0 commit 4c86b54
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions prov/cxi/src/cxip_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,32 @@ int cxip_ctrl_msg_send(struct cxip_ctrl_req *req)
idc_msg.match_bits = req->send.mb.raw;
idc_msg.user_ptr = (uint64_t)req;

ret = cxip_cmdq_cp_set(txq, req->send.vni, CXI_TC_BEST_EFFORT,
CXI_TC_TYPE_DEFAULT);
if (ret) {
CXIP_DBG("Failed to set cp: %d\n", ret);
goto err_return_credit;
}
if (req->ep_obj->av_auth_key) {
ret = cxip_domain_emit_idc_msg(req->ep_obj->domain,
req->send.vni,
CXI_TC_BEST_EFFORT, &c_state,
&idc_msg, NULL, 0, 0);
if (ret) {
CXIP_DBG("Failed to write domain IDC: %d\n", ret);
goto err_return_credit;
}
} else {
ret = cxip_cmdq_cp_set(txq, req->send.vni, CXI_TC_BEST_EFFORT,
CXI_TC_TYPE_DEFAULT);
if (ret) {
CXIP_DBG("Failed to set cp: %d\n", ret);
goto err_return_credit;
}

ret = cxip_cmdq_emit_idc_msg(txq, &c_state, &idc_msg, NULL, 0, 0);
if (ret) {
CXIP_DBG("Failed to write IDC: %d\n", ret);
goto err_return_credit;
}
ret = cxip_cmdq_emit_idc_msg(txq, &c_state, &idc_msg, NULL, 0,
0);
if (ret) {
CXIP_DBG("Failed to write IDC: %d\n", ret);
goto err_return_credit;
}

cxi_cq_ring(txq->dev_cmdq);
cxi_cq_ring(txq->dev_cmdq);
}

CXIP_DBG("Queued control message: %p\n", req);

Expand Down

0 comments on commit 4c86b54

Please sign in to comment.