|
47 | 47 |
|
48 | 48 | #define MCA_BTL_OFI_REQUESTED_MR_MODE (FI_MR_ALLOCATED | FI_MR_PROV_KEY | FI_MR_VIRT_ADDR) |
49 | 49 |
|
| 50 | +/** |
| 51 | + * FI_MR_BASIC (1<<0) and FI_MR_SCALABLE (1<<1) are deprecated |
| 52 | + * since Libfabric 1.5 and the symbols will get removed in |
| 53 | + * future Libfabric 2.x versions. Use the internal mode bits |
| 54 | + * for backward compatibilities without breaking compilation |
| 55 | + * with newer libfabric. |
| 56 | + */ |
| 57 | +#define MCA_BTL_OFI_MR_BASIC (1 << 0) |
| 58 | +#define MCA_BTL_OFI_MR_SCALABLE (1 << 1) |
| 59 | + |
50 | 60 | static char *ofi_progress_mode; |
51 | 61 | static bool disable_sep; |
52 | 62 | static int mca_btl_ofi_init_device(struct fi_info *info); |
@@ -107,7 +117,7 @@ static int validate_info(struct fi_info *info, uint64_t required_caps, |
107 | 117 |
|
108 | 118 | mr_mode = info->domain_attr->mr_mode; |
109 | 119 |
|
110 | | - if (!(mr_mode == FI_MR_BASIC || mr_mode == FI_MR_SCALABLE || |
| 120 | + if (!(mr_mode == MCA_BTL_OFI_MR_BASIC || mr_mode == MCA_BTL_OFI_MR_SCALABLE || |
111 | 121 | (mr_mode & ~(FI_MR_VIRT_ADDR | FI_MR_ALLOCATED | FI_MR_PROV_KEY)) == 0)) { |
112 | 122 | BTL_VERBOSE(("unsupported MR mode")); |
113 | 123 | return OPAL_ERROR; |
@@ -609,7 +619,7 @@ static int mca_btl_ofi_init_device(struct fi_info *info) |
609 | 619 | module->outstanding_rdma = 0; |
610 | 620 | module->use_virt_addr = false; |
611 | 621 |
|
612 | | - if (ofi_info->domain_attr->mr_mode == FI_MR_BASIC || |
| 622 | + if (ofi_info->domain_attr->mr_mode == MCA_BTL_OFI_MR_BASIC || |
613 | 623 | ofi_info->domain_attr->mr_mode & FI_MR_VIRT_ADDR) { |
614 | 624 | module->use_virt_addr = true; |
615 | 625 | } |
|
0 commit comments