Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0 deprecations #10250

Merged
merged 13 commits into from
Aug 3, 2024
1 change: 0 additions & 1 deletion fabtests/component/dmabuf-rdma/fi-rdmabw-xe.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ static int init_nic(int nic, char *domain_name, char *server_name, int port,
if (buf_location != MALLOC)
hints->caps |= FI_HMEM;
hints->mode = FI_CONTEXT;
hints->domain_attr->control_progress = FI_PROGRESS_MANUAL;
hints->domain_attr->data_progress = FI_PROGRESS_MANUAL;
hints->domain_attr->mr_mode = FI_MR_ALLOCATED | FI_MR_PROV_KEY |
FI_MR_VIRT_ADDR | FI_MR_LOCAL |
Expand Down
6 changes: 3 additions & 3 deletions fabtests/component/dmabuf-rdma/ofi_ctx_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*/

struct context_list {
struct fi_context context;
struct fi_context context; /* keep first */
struct context_list *next;
};

Expand All @@ -53,7 +53,7 @@ static inline struct context_pool *init_context_pool(size_t pool_size)
pool_size * sizeof(struct context_list));
if (!pool)
return NULL;

pool->head = &pool->list[0];
pool->tail = &pool->list[pool_size - 1];
for (i = 0; i < pool_size; i++)
Expand Down Expand Up @@ -84,7 +84,7 @@ static inline void put_context(struct context_pool *pool,
if (!ctxt)
return;

entry = container_of(ctxt, struct context_list, context);
entry = (struct context_list *) ctxt;
entry->next = NULL;
pool->tail->next = entry;
pool->tail = entry;
Expand Down
6 changes: 3 additions & 3 deletions fabtests/functional/rdm_atomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static enum fi_op get_fi_op(char *op)
return FI_MSWAP;
else {
fprintf(stderr, "Not a valid atomic operation\n");
return FI_ATOMIC_OP_LAST;
return OFI_ATOMIC_OP_CNT;
}
}

Expand Down Expand Up @@ -342,7 +342,7 @@ static int run_ops(void)
{
int ret;

for (op_type = FI_MIN; op_type < FI_ATOMIC_OP_LAST; op_type++) {
for (op_type = FI_MIN; op_type < OFI_ATOMIC_OP_CNT; op_type++) {
ret = run_op();
if (ret && ret != -FI_ENOSYS && ret != -FI_EOPNOTSUPP) {
FT_PRINTERR("run_op", ret);
Expand Down Expand Up @@ -464,7 +464,7 @@ int main(int argc, char **argv)
} else {
run_all_ops = 0;
op_type = get_fi_op(optarg);
if (op_type == FI_ATOMIC_OP_LAST) {
if (op_type == OFI_ATOMIC_OP_CNT) {
print_opts_usage(argv[0]);
return EXIT_FAILURE;
}
Expand Down
1 change: 0 additions & 1 deletion fabtests/functional/unexpected_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ int main(int argc, char **argv)
hints->mode = FI_CONTEXT;
hints->domain_attr->mr_mode = opts.mr_mode;
hints->domain_attr->resource_mgmt = FI_RM_ENABLED;
hints->rx_attr->total_buffered_recv = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not important but if you're going to update the patch set anyway, "compatibility" is spelled wrong in the commit message

hints->caps = FI_TAGGED;
hints->addr_format = opts.address_format;

Expand Down
1 change: 1 addition & 0 deletions fabtests/include/ft_osd.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#endif

#define OFI_DATATYPE_CNT (FI_UINT128 + 1)
#define OFI_ATOMIC_OP_CNT (FI_MSWAP + 1)

#ifdef HAVE___INT128
typedef __int128 ofi_int128_t;
Expand Down
5 changes: 5 additions & 0 deletions fabtests/include/shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ extern "C" {
#define ALIGN(x, a) ALIGN_MASK(x, (typeof(x))(a) - 1)
#define ALIGN_DOWN(x, a) ALIGN((x) - ((a) - 1), (a))

#ifndef container_of
#define container_of(ptr, type, field) \
((type *) ((char *)ptr - offsetof(type, field)))
#endif

#define OFI_MR_BASIC_MAP (FI_MR_ALLOCATED | FI_MR_PROV_KEY | FI_MR_VIRT_ADDR)

/* exit codes must be 0-255 */
Expand Down
3 changes: 1 addition & 2 deletions fabtests/man/fabtests.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,7 @@ The following keys and respective key values may be used in the config file.
: FI_WAIT_NONE, FI_WAIT_UNSPEC, FI_WAIT_FD, FI_WAIT_MUTEX_COND

*threading*
: FI_THREAD_UNSPEC, FI_THREAD_SAFE, FI_THREAD_FID, FI_THREAD_DOMAIN,
FI_THREAD_COMPLETION, FI_THREAD_ENDPOINT
: FI_THREAD_UNSPEC, FI_THREAD_SAFE, FI_THREAD_DOMAIN, FI_THREAD_COMPLETION

*progress*
: FI_PROGRESS_MANUAL, FI_PROGRESS_AUTO, FI_PROGRESS_UNSPEC
Expand Down
1 change: 0 additions & 1 deletion fabtests/multinode/src/core_coll.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@ static inline void setup_hints(void)
hints->ep_attr->type = FI_EP_RDM;
hints->caps = FI_MSG | FI_COLLECTIVE;
hints->mode = FI_CONTEXT;
hints->domain_attr->control_progress = FI_PROGRESS_MANUAL;
hints->domain_attr->data_progress = FI_PROGRESS_MANUAL;
}

Expand Down
4 changes: 1 addition & 3 deletions fabtests/ubertest/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static struct key_t keys[] = {
.str = "op",
.offset = offsetof(struct ft_set, op),
.val_type = VAL_NUM,
.val_size = sizeof(((struct ft_set *)0)->op) / FI_ATOMIC_OP_LAST,
.val_size = sizeof(((struct ft_set *)0)->op) / OFI_ATOMIC_OP_CNT,
},
{
.str = "datatype",
Expand Down Expand Up @@ -373,10 +373,8 @@ static int ft_parse_num(char *str, int len, struct key_t *key, void *buf)
} else if (!strncmp(key->str, "threading", strlen("threading"))) {
TEST_ENUM_SET_N_RETURN(str, len, FI_THREAD_UNSPEC, int, buf);
TEST_ENUM_SET_N_RETURN(str, len, FI_THREAD_SAFE, int, buf);
TEST_ENUM_SET_N_RETURN(str, len, FI_THREAD_FID, int, buf);
TEST_ENUM_SET_N_RETURN(str, len, FI_THREAD_DOMAIN, int, buf);
TEST_ENUM_SET_N_RETURN(str, len, FI_THREAD_COMPLETION, int, buf);
TEST_ENUM_SET_N_RETURN(str, len, FI_THREAD_ENDPOINT, int, buf);
FT_ERR("Unknown threading level");
} else if (!strncmp(key->str, "constant_caps", strlen("constant_caps"))) {
TEST_ENUM_SET_N_RETURN(str, len, FI_RMA, uint64_t, buf);
Expand Down
20 changes: 12 additions & 8 deletions fabtests/ubertest/fabtest.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,18 @@ enum ft_class_function {
x == FT_FUNC_FETCH_ATOMICMSG || \
x == FT_FUNC_COMPARE_ATOMICMSG)

enum {
FT_NAME_MAX = 64
};

struct ft_set {
char node[FI_NAME_MAX];
char service[FI_NAME_MAX];
char prov_name[FI_NAME_MAX];
char node[FT_NAME_MAX];
char service[FT_NAME_MAX];
char prov_name[FT_NAME_MAX];
enum ft_test_type test_type[FT_MAX_TEST];
enum ft_class_function class_function[FT_MAX_FUNCTIONS];
uint64_t msg_flags;
enum fi_op op[FI_ATOMIC_OP_LAST];
enum fi_op op[OFI_ATOMIC_OP_CNT];
enum fi_datatype datatype[OFI_DATATYPE_CNT];
enum fi_ep_type ep_type[FT_MAX_EP_TYPES];
enum fi_av_type av_type[FT_MAX_AV_TYPES];
Expand Down Expand Up @@ -308,10 +312,10 @@ struct ft_info {
enum fi_threading threading;
uint32_t protocol;
uint32_t protocol_version;
char node[FI_NAME_MAX];
char service[FI_NAME_MAX];
char prov_name[FI_NAME_MAX];
char fabric_name[FI_NAME_MAX];
char node[FT_NAME_MAX];
char service[FT_NAME_MAX];
char prov_name[FT_NAME_MAX];
char fabric_name[FT_NAME_MAX];
uint64_t rx_cq_bind_flags;
uint64_t tx_cq_bind_flags;
uint64_t rx_op_flags;
Expand Down
Loading
Loading