Skip to content

Commit

Permalink
core: Move FI_PRIORITY to internal flag
Browse files Browse the repository at this point in the history
Flag is only used between rxm and verbs.

Signed-off-by: Sean Hefty <[email protected]>
  • Loading branch information
shefty authored and j-xiong committed Mar 7, 2024
1 parent c0c835b commit 31fc403
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions include/ofi_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,7 @@ void *ofi_ns_resolve_name(struct util_ns *ns, const char *server,
* the core by calling add_credits.
*/
#define OFI_OPS_FLOW_CTRL "ofix_flow_ctrl_v1"
#define OFI_PRIORITY (1ULL << 62)

struct ofi_ops_flow_ctrl {
size_t size;
Expand Down
2 changes: 1 addition & 1 deletion include/rdma/fabric.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ typedef struct fid *fid_t;
#define FI_PEEK (1ULL << 19)
#define FI_TRIGGER (1ULL << 20)
#define FI_FENCE (1ULL << 21)
#define FI_PRIORITY (1ULL << 22)
/* #define FI_PRIORITY (1ULL << 22) */

#define FI_COMPLETION (1ULL << 24)
#define FI_EVENT FI_COMPLETION
Expand Down
2 changes: 1 addition & 1 deletion prov/rxm/src/rxm_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ static ssize_t rxm_send_credits(struct fid_ep *ep, uint64_t credits)
msg.context = tx_buf;
msg.desc = &tx_buf->hdr.desc;

ret = fi_sendmsg(ep, &msg, FI_PRIORITY);
ret = fi_sendmsg(ep, &msg, OFI_PRIORITY);
if (!ret)
return FI_SUCCESS;

Expand Down
2 changes: 1 addition & 1 deletion prov/rxm/src/rxm_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ void rxm_ep_progress_deferred_queue(struct rxm_ep *rxm_ep,
msg.msg_iov = &iov;

ret = fi_sendmsg(def_tx_entry->rxm_conn->msg_ep, &msg,
FI_PRIORITY);
OFI_PRIORITY);
if (ret) {
if (ret != -FI_EAGAIN) {
rxm_cq_write_error(
Expand Down
2 changes: 1 addition & 1 deletion prov/verbs/src/verbs_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ ssize_t vrb_post_send(struct vrb_ep *ep, struct ibv_send_wr *wr, uint64_t flags)
}

if (vrb_wr_consumes_recv(wr) && !--ep->peer_rq_credits &&
!(flags & FI_PRIORITY)) {
!(flags & OFI_PRIORITY)) {
/* Last credit is reserved for credit update */
ep->peer_rq_credits++;
goto freectx;
Expand Down

0 comments on commit 31fc403

Please sign in to comment.