Skip to content

Commit

Permalink
prov/shm,efa: add FI_PEER capability to shm and query for cap in efa
Browse files Browse the repository at this point in the history
Use the new FI_PEER capability in the shm provider to indicate support for
using shm as a peer provider

Add FI_PEER to the shm_hints when efa queries shm as well as FI_AV_USER_ID
which indicates full peer support

Signed-off-by: Alexia Ingerson <alexia.ingerson@intel.com>
  • Loading branch information
aingerson committed Aug 27, 2024
1 parent d731157 commit 50fb455
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion prov/efa/src/efa_shm.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void efa_shm_info_create(const struct fi_info *app_info, struct fi_info **shm_in

shm_hints->domain_attr->threading = app_info->domain_attr->threading;
shm_hints->domain_attr->av_type = FI_AV_TABLE;
shm_hints->domain_attr->caps |= FI_LOCAL_COMM;
shm_hints->domain_attr->caps |= FI_LOCAL_COMM | FI_PEER | FI_AV_USER_ID;
shm_hints->tx_attr->msg_order = FI_ORDER_SAS;
shm_hints->rx_attr->msg_order = FI_ORDER_SAS;
/*
Expand Down
9 changes: 6 additions & 3 deletions prov/shm/src/smr_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#define SMR_RX_CAPS (FI_SOURCE | FI_RMA_EVENT | OFI_RX_MSG_CAPS | FI_TAGGED | \
OFI_RX_RMA_CAPS | FI_ATOMICS | FI_DIRECTED_RECV | \
FI_MULTI_RECV)
#define SMR_DOMAIN_CAPS (FI_LOCAL_COMM | FI_PEER | FI_AV_USER_ID)
#define SMR_HMEM_TX_CAPS (SMR_TX_CAPS | FI_HMEM)
#define SMR_HMEM_RX_CAPS (SMR_RX_CAPS | FI_HMEM)
#define SMR_TX_OP_FLAGS (FI_COMPLETION | FI_INJECT_COMPLETE | \
Expand Down Expand Up @@ -108,7 +109,7 @@ struct fi_domain_attr smr_domain_attr = {
.max_ep_tx_ctx = 1,
.max_ep_rx_ctx = 1,
.mr_iov_limit = SMR_IOV_LIMIT,
.caps = FI_LOCAL_COMM,
.caps = SMR_DOMAIN_CAPS,
};

struct fi_domain_attr smr_hmem_domain_attr = {
Expand All @@ -128,7 +129,7 @@ struct fi_domain_attr smr_hmem_domain_attr = {
.max_ep_tx_ctx = 1,
.max_ep_rx_ctx = 1,
.mr_iov_limit = SMR_IOV_LIMIT,
.caps = FI_LOCAL_COMM,
.caps = SMR_DOMAIN_CAPS,
};

struct fi_fabric_attr smr_fabric_attr = {
Expand All @@ -137,7 +138,8 @@ struct fi_fabric_attr smr_fabric_attr = {
};

struct fi_info smr_hmem_info = {
.caps = SMR_HMEM_TX_CAPS | SMR_HMEM_RX_CAPS | FI_MULTI_RECV | FI_LOCAL_COMM,
.caps = SMR_HMEM_TX_CAPS | SMR_HMEM_RX_CAPS | FI_MULTI_RECV |
SMR_DOMAIN_CAPS,
.addr_format = FI_ADDR_STR,
.tx_attr = &smr_hmem_tx_attr,
.rx_attr = &smr_hmem_rx_attr,
Expand All @@ -148,6 +150,7 @@ struct fi_info smr_hmem_info = {

struct fi_info smr_info = {
.caps = SMR_TX_CAPS | SMR_RX_CAPS | FI_MULTI_RECV | FI_LOCAL_COMM,
SMR_DOMAIN_CAPS,
.addr_format = FI_ADDR_STR,
.tx_attr = &smr_tx_attr,
.rx_attr = &smr_rx_attr,
Expand Down

0 comments on commit 50fb455

Please sign in to comment.