diff --git a/kernel/ibv.c b/kernel/ibv.c index c53d6a724..c033e7a00 100644 --- a/kernel/ibv.c +++ b/kernel/ibv.c @@ -1936,7 +1936,7 @@ int ibv_post_send(struct ibv_qp * qp, struct ibv_send_wr * wr, struct ibv_send_w struct ibv_send_wr * curr_wr; int num_wrs; int num_sges_max; - int is_rdma, is_atomic, is_bind_mw, is_tso; + int is_bind_mw, is_tso; // Number of work requests in linked list num_wrs = 1; @@ -1956,30 +1956,14 @@ int ibv_post_send(struct ibv_qp * qp, struct ibv_send_wr * wr, struct ibv_send_w struct ibv_send_wr * wr__next[num_wrs]; struct ibv_sge * wr__sg_list[num_wrs]; uint64_t wr__sg_list__addr[num_wrs][num_sges_max]; - /* uint64_t wr__wr__rdma__remote_addr[num_wrs]; */ - /* uint64_t wr__wr__atomic__remote_addr[num_wrs]; */ uint64_t wr__bind_mw__bind_info__addr[num_wrs]; void * wr__tso__hdr[num_wrs]; curr_wr = wr; for (int i = 0; i < num_wrs; i++) { - /* is_rdma = curr_wr->opcode == IBV_WR_RDMA_WRITE || */ - /* curr_wr->opcode == IBV_WR_RDMA_WRITE_WITH_IMM || */ - /* curr_wr->opcode == IBV_WR_RDMA_READ; */ - /* is_atomic = curr_wr->opcode == IBV_WR_ATOMIC_CMP_AND_SWP || */ - /* curr_wr->opcode == IBV_WR_ATOMIC_FETCH_AND_ADD; */ is_bind_mw = curr_wr->opcode == IBV_WR_BIND_MW; is_tso = curr_wr->opcode == IBV_WR_TSO; - // union wr: rdma and atomic - /* if (is_rdma) { */ - /* wr__wr__rdma__remote_addr[i] = curr_wr->wr.rdma.remote_addr; */ - /* curr_wr->wr.rdma.remote_addr = (uint64_t) guest_to_host((size_t) curr_wr->wr.rdma.remote_addr); */ - /* } else if (is_atomic) { */ - /* wr__wr__atomic__remote_addr[i] = curr_wr->wr.atomic.remote_addr; */ - /* curr_wr->wr.atomic.remote_addr = (uint64_t) guest_to_host((size_t) curr_wr->wr.atomic.remote_addr); */ - /* } */ - // union: bind_mw and tso if (is_bind_mw) { wr__bind_mw__bind_info__addr[i] = curr_wr->bind_mw.bind_info.addr; @@ -2015,21 +1999,9 @@ int ibv_post_send(struct ibv_qp * qp, struct ibv_send_wr * wr, struct ibv_send_w curr_wr = wr; for (int i = 0; i < num_wrs; i++) { - /* is_rdma = curr_wr->opcode == IBV_WR_RDMA_WRITE || */ - /* curr_wr->opcode == IBV_WR_RDMA_WRITE_WITH_IMM || */ - /* curr_wr->opcode == IBV_WR_RDMA_READ; */ - /* is_atomic = curr_wr->opcode == IBV_WR_ATOMIC_CMP_AND_SWP || */ - /* curr_wr->opcode == IBV_WR_ATOMIC_FETCH_AND_ADD; */ is_bind_mw = curr_wr->opcode == IBV_WR_BIND_MW; is_tso = curr_wr->opcode == IBV_WR_TSO; - // union wr: rdma and atomic - /* if (is_rdma) { */ - /* curr_wr->wr.rdma.remote_addr = wr__wr__rdma__remote_addr[i]; */ - /* } else if (is_atomic) { */ - /* curr_wr->wr.atomic.remote_addr = wr__wr__atomic__remote_addr[i]; */ - /* } */ - // union: bind_mw and tso if (is_bind_mw) { curr_wr->bind_mw.bind_info.addr = wr__bind_mw__bind_info__addr[i]; diff --git a/tools/uhyve-ibv.c b/tools/uhyve-ibv.c index b825b5611..2a5a65270 100644 --- a/tools/uhyve-ibv.c +++ b/tools/uhyve-ibv.c @@ -892,7 +892,7 @@ void call_ibv_ack_cq_events(struct kvm_run * run, uint8_t * guest_mem) { */ void call_ibv_poll_cq(struct kvm_run * run, uint8_t * guest_mem) { - printf("LOG: UHYVE - call_ibv_poll_cq\n"); + /* printf("LOG: UHYVE - call_ibv_poll_cq\n"); */ unsigned data = *((unsigned*) ((size_t) run + run->io.data_offset)); uhyve_ibv_poll_cq_t * args = (uhyve_ibv_poll_cq_t *) (guest_mem + data); @@ -1222,12 +1222,12 @@ void call_ibv_destroy_rwq_ind_table(struct kvm_run * run, uint8_t * guest_mem) { */ void call_ibv_post_send(struct kvm_run * run, uint8_t * guest_mem) { - printf("LOG: UHYVE - call_ibv_post_send\n"); + /* printf("LOG: UHYVE - call_ibv_post_send\n"); */ unsigned data = *((unsigned*) ((size_t) run + run->io.data_offset)); uhyve_ibv_post_send_t * args = (uhyve_ibv_post_send_t *) (guest_mem + data); - /* printf("\tqp->context: %p\n", args->qp->context); */ - /* printf("\tqp->state: %d\n", args->qp->state); */ + /* printf("\tqp->context: %p\n", args->qp->context); */ + /* printf("\tqp->state: %d\n", args->qp->state); */ /* printf("\twr->id: %lu\n", args->wr->wr_id); */ /* printf("\twr->next: %p\n", args->wr->next); */ /* printf("\twr->num_sge: %d\n", args->wr->num_sge); */ diff --git a/tools/uhyve.c b/tools/uhyve.c index 928281eea..be9402a83 100644 --- a/tools/uhyve.c +++ b/tools/uhyve.c @@ -227,8 +227,6 @@ typedef struct { /* #define IB_MEM_DEBUG */ -/* static uint8_t * ib_pool_top = NULL; */ -/* uint64_t ib_pool_addr = 0; // TODO: static? */ static uint8_t* ib_pool_addr = 0; static uint8_t* ib_pool_top = 0; static const size_t std_alignment = 16; // TODO: Use sizeof(maxint_t) (?) or similar @@ -236,8 +234,6 @@ static pthread_mutex_t ib_pool_mutex = PTHREAD_MUTEX_INITIALIZER; bool use_ib_mem_pool = false; bool init_real_calloc_active = false; -/* void * dlsym_mem = NULL; */ -/* size_t dlsym_mem_len = 0; */ static unsigned char dlsym_mem_buffer[8192]; static void * (*real_malloc) (size_t) = NULL; @@ -313,7 +309,6 @@ void * new_ib_malloc_region(size_t size) return result; } -// TODO: locks ok? /* * malloc @@ -402,7 +397,7 @@ void * realloc(void * ptr, size_t new_size) { } if (!ptr) { - return malloc(new_size); // works, like standard + return malloc(new_size); // This is what standard realloc will do for a null ptr. } void * result; @@ -478,30 +473,10 @@ void free(void * ptr) { real_free(ptr); } - /* if (!use_ib_mem_pool) { */ -/* #ifdef IB_MEM_DEBUG */ - /* printf("\tfree() real\n"); */ -/* #endif */ - /* real_free(ptr); */ - /* } else if ((uint8_t*)ptr != NULL && ((uint8_t*)ptr <= ib_pool_addr || */ - /* (uint8_t*)ptr >= ib_pool_addr + IB_POOL_SIZE)) { */ -/* #ifdef IB_MEM_DEBUG */ - /* printf("\tIB PTR OUT OF POOL: ptr: %p -------------------------------\n", ptr); */ - /* printf("\tib_pool_addr : %p\n", ib_pool_addr); */ - /* printf("\tib_pool_addr + SIZE: %p\n", ib_pool_addr + IB_POOL_SIZE); */ - - /* real_free(ptr); // TODO: trying this. */ -/* #endif */ - /* } */ - pthread_mutex_unlock(&ib_pool_mutex); } - - - - static uint64_t memparse(const char *ptr) { // local pointer to end of parsed string diff --git a/usr/benchmarks/ib/perftest_communication_write_bw.c b/usr/benchmarks/ib/perftest_communication_write_bw.c index 3f2d9c297..953782482 100755 --- a/usr/benchmarks/ib/perftest_communication_write_bw.c +++ b/usr/benchmarks/ib/perftest_communication_write_bw.c @@ -294,15 +294,26 @@ uint16_t ctx_get_local_lid(struct ibv_context *context, int port) // ----------------------------------------------------------------------------- -static int ethernet_write_keys(struct pingpong_dest *my_dest, - struct perftest_comm *comm) +static int ethernet_write_keys(struct pingpong_dest *my_dest, struct perftest_comm *comm) { if (my_dest->gid_index == -1) { - char msg[KEY_MSG_SIZE]; + uint32_t vaddr_hi, vaddr_lo; + unsigned long long vaddr_hi_shfd = my_dest->vaddr >> 32; + memcpy(&vaddr_hi, &vaddr_hi_shfd, sizeof(uint32_t)); + memcpy(&vaddr_lo, &my_dest->vaddr, sizeof(uint32_t)); + + /* sprintf(msg, KEY_PRINT_FMT, my_dest->lid, my_dest->out_reads, */ + /* my_dest->qpn, my_dest->psn, my_dest->rkey, my_dest->vaddr, my_dest->srqn); */ sprintf(msg, KEY_PRINT_FMT, my_dest->lid, my_dest->out_reads, - my_dest->qpn, my_dest->psn, my_dest->rkey, my_dest->vaddr, my_dest->srqn); + my_dest->qpn, my_dest->psn, my_dest->rkey, vaddr_hi, vaddr_lo, my_dest->srqn); + + /* printf("\nEthernet WRITE\n"); */ + /* printf("my_dest->vaddr: %016llx\n", my_dest->vaddr); */ + /* printf("vaddr_hi: %08x\n", vaddr_hi); */ + /* printf("vaddr_lo: %08x\n\n", vaddr_lo); */ + /* printf("msg: %s\n\n", msg); */ if (write(comm->rdma_params->sockfd, msg, sizeof msg) != sizeof msg) { perror("client write"); @@ -310,10 +321,16 @@ static int ethernet_write_keys(struct pingpong_dest *my_dest, return 1; } - } else { + } else { // gid_index != -1 char msg[KEY_MSG_SIZE_GID]; + + uint32_t vaddr_hi, vaddr_lo; + unsigned long long vaddr_hi_shfd = my_dest->vaddr >> 32; + memcpy(&vaddr_hi, &vaddr_hi_shfd, sizeof(uint32_t)); + memcpy(&vaddr_lo, &my_dest->vaddr, sizeof(uint32_t)); + sprintf(msg, KEY_PRINT_FMT_GID, my_dest->lid, my_dest->out_reads, - my_dest->qpn, my_dest->psn, my_dest->rkey, my_dest->vaddr, + my_dest->qpn, my_dest->psn, my_dest->rkey, vaddr_hi, vaddr_lo, my_dest->gid.raw[0], my_dest->gid.raw[1], my_dest->gid.raw[2], my_dest->gid.raw[3], my_dest->gid.raw[4], my_dest->gid.raw[5], @@ -324,23 +341,24 @@ static int ethernet_write_keys(struct pingpong_dest *my_dest, my_dest->gid.raw[14], my_dest->gid.raw[15], my_dest->srqn); + /* printf("Ethernet WRITE (gid_index != -1)\n"); */ + /* printf("my_dest->vaddr: %llx\n", my_dest->vaddr); */ + /* printf("msg: %s\n", msg); */ + if (write(comm->rdma_params->sockfd, msg, sizeof msg) != sizeof msg) { perror("client write"); fprintf(stderr, "Couldn't send local address\n"); return 1; } - } return 0; } -static int ethernet_read_keys(struct pingpong_dest *rem_dest, - struct perftest_comm *comm) +static int ethernet_read_keys(struct pingpong_dest *rem_dest, struct perftest_comm *comm) { if (rem_dest->gid_index == -1) { - int parsed; char msg[KEY_MSG_SIZE]; @@ -349,17 +367,30 @@ static int ethernet_read_keys(struct pingpong_dest *rem_dest, return 1; } + uint32_t vaddr_hi, vaddr_lo; + + /* parsed = sscanf(msg, KEY_PRINT_FMT, (unsigned int*)&rem_dest->lid, */ + /* &rem_dest->out_reads, &rem_dest->qpn, */ + /* &rem_dest->psn, &rem_dest->rkey, &rem_dest->vaddr, &rem_dest->srqn); */ parsed = sscanf(msg, KEY_PRINT_FMT, (unsigned int*)&rem_dest->lid, &rem_dest->out_reads, &rem_dest->qpn, - &rem_dest->psn, &rem_dest->rkey, &rem_dest->vaddr, &rem_dest->srqn); + &rem_dest->psn, &rem_dest->rkey, &vaddr_hi, &vaddr_lo, &rem_dest->srqn); - if (parsed != 7) { + rem_dest->vaddr = ((unsigned long long) vaddr_hi << 32) | + ((unsigned long long) vaddr_lo); + + /* printf("\nEthernet READ\n"); */ + /* printf("msg: %s\n", msg); */ + /* printf("vaddr_hi: %08x\n", vaddr_hi); */ + /* printf("vaddr_lo: %08x\n", vaddr_lo); */ + /* printf("rem_dest->vaddr: %016llx\n\n", rem_dest->vaddr); */ + + if (parsed != 8) { fprintf(stderr, "Couldn't parse line <%.*s>\n", (int)sizeof msg, msg); return 1; } - } else { - + } else { // gid_index != -1 char msg[KEY_MSG_SIZE_GID]; char *pstr = msg, *term; char tmp[120]; @@ -404,6 +435,7 @@ static int ethernet_read_keys(struct pingpong_dest *rem_dest, memcpy(tmp, pstr, term - pstr); tmp[term - pstr] = 0; + // TODO: check if this works (no sscanf, so it should.) rem_dest->vaddr = strtoull(tmp, NULL, 16); /*VA*/ for (i = 0; i < 15; ++i) { @@ -428,6 +460,10 @@ static int ethernet_read_keys(struct pingpong_dest *rem_dest, tmp[term - pstr] = 0; rem_dest->srqn = (unsigned)strtoul(tmp, NULL, 16); /*SRQN*/ + printf("\nEthernet READ (gid_index != -1)\n"); + printf("rem_dest->vaddr: %llx\n", rem_dest->vaddr); + printf("msg: %s\n\n", msg); + } return 0; } @@ -474,9 +510,6 @@ static int ethernet_client_connect(struct perftest_comm *comm) return 0; } -/****************************************************************************** - * - ******************************************************************************/ static int ethernet_server_connect(struct perftest_comm *comm) { struct addrinfo *res, *t; @@ -758,20 +791,17 @@ int set_up_connection(struct pingpong_context *ctx, /* Each qp gives its receive buffer address.*/ my_dest[i].out_reads = user_param->out_reads; - uintptr_t guest_vaddr; + uintptr_t guest_vaddr; // !!! if (user_param->mr_per_qp) { - /* my_dest[i].vaddr = (uintptr_t)ctx->buf[i] + BUFF_SIZE(ctx->size, ctx->cycle_buffer); */ - guest_vaddr = (uintptr_t)ctx->buf[i] + BUFF_SIZE(ctx->size, ctx->cycle_buffer); // !!! + guest_vaddr = (uintptr_t)ctx->buf[i] + BUFF_SIZE(ctx->size, ctx->cycle_buffer); my_dest[i].vaddr = (unsigned long long) guest_to_host((size_t) guest_vaddr); - /* printf("if:\nctx->buf[i]:\t%p\nguest_vaddr:\t%p\nmydestvaddr:\t%llu\n", ctx->buf[i], guest_vaddr, my_dest[i].vaddr); */ } else { - /* my_dest[i].vaddr = (uintptr_t)ctx->buf[0] + */ - /* (user_param->num_of_qps + i)*BUFF_SIZE(ctx->size, ctx->cycle_buffer); */ guest_vaddr = (uintptr_t)ctx->buf[0] + - (user_param->num_of_qps + i)*BUFF_SIZE(ctx->size, ctx->cycle_buffer); + (user_param->num_of_qps + i) * BUFF_SIZE(ctx->size, ctx->cycle_buffer); my_dest[i].vaddr = (unsigned long long) guest_to_host((size_t) guest_vaddr); - printf("\nelse:\nctx->buf[0]:\t%p\nguest_vaddr:\t%p\nmydestvaddr:\t%p\n", - ctx->buf[0], guest_vaddr, (uintptr_t) my_dest[i].vaddr); + /* printf("ctx->buf[0]: %p\n", ctx->buf[0]); */ + /* printf("guest_vaddr: %p\n", guest_vaddr); */ + printf("\nmydestvaddr: %llx\n\n", (unsigned long long) my_dest[i].vaddr); } if (user_param->dualport==ON) { diff --git a/usr/benchmarks/ib/perftest_communication_write_bw.h b/usr/benchmarks/ib/perftest_communication_write_bw.h index 0c0896798..37a0a7e26 100755 --- a/usr/benchmarks/ib/perftest_communication_write_bw.h +++ b/usr/benchmarks/ib/perftest_communication_write_bw.h @@ -81,7 +81,9 @@ #define SYNC_SPEC_ID (5) /* The Format of the message we pass through sockets , without passing Gid. */ -#define KEY_PRINT_FMT "%04x:%04x:%06x:%06x:%08x:%016Lx:%08x" +// #define KEY_PRINT_FMT "%04x:%04x:%06x:%06x:%08x:%016Lx:%08x" +// #define KEY_PRINT_FMT "%04x:%04x:%06x:%06x:%08x:%016llx:%08x" +#define KEY_PRINT_FMT "%04x:%04x:%06x:%06x:%08x:%08Lx:%08Lx:%08x" /* The Format of the message we pass through sockets (With Gid). */ #define KEY_PRINT_FMT_GID "%04x:%04x:%06x:%06x:%08x:%016Lx:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%08x:" @@ -93,7 +95,7 @@ #define READ_FMT " OUT %#04x" /* The print format of the pingpong_dest element for RDMA verbs. */ -#define RDMA_FMT " RKey %#08x VAddr %#016Lx" +#define RDMA_FMT " RKey %#08x VAddr 0x%016llx" /* The print number of SRQ in case of XRC */ #define XRC_FMT " SRQn %#08x" diff --git a/usr/benchmarks/ib/perftest_parameters_write_bw.c b/usr/benchmarks/ib/perftest_parameters_write_bw.c index 81046b760..1c14208b5 100755 --- a/usr/benchmarks/ib/perftest_parameters_write_bw.c +++ b/usr/benchmarks/ib/perftest_parameters_write_bw.c @@ -1139,35 +1139,6 @@ static void force_dependecies(struct perftest_parameters *user_param) if (user_param->verb == SEND && user_param->tst == BW && user_param->machine == SERVER && !user_param->duplex ) user_param->noPeak = ON; - /* Run infinitely dependencies */ - if (user_param->test_method == RUN_INFINITELY) { - user_param->noPeak = ON; - user_param->test_type = DURATION; - if (user_param->use_event) { - printf(RESULT_LINE); - fprintf(stderr, " run_infinitely does not support events feature yet.\n"); - exit(1); - } - - if (user_param->tst == LAT) { - printf(RESULT_LINE); - fprintf(stderr, " run_infinitely exists only in BW tests for now.\n"); - exit(1); - - } - - if (user_param->duplex && user_param->verb == SEND) { - printf(RESULT_LINE); - fprintf(stderr, " run_infinitely mode is not supported in SEND Bidirectional BW test\n"); - exit(1); - } - if (user_param->rate_limit_type != DISABLE_RATE_LIMIT) { - printf(RESULT_LINE); - fprintf(stderr, " run_infinitely does not support rate limit feature yet\n"); - exit(1); - } - } - if (user_param->connection_type == DC && !user_param->use_srq) user_param->use_srq = 1; @@ -1360,11 +1331,6 @@ static void force_dependecies(struct perftest_parameters *user_param) /* fprintf(stderr, "Accelerated verbs in perftest supports only unidir tests for now\n"); */ /* exit(1); */ /* } */ - - /* if (user_param->test_method == RUN_INFINITELY) { */ - /* fprintf(stderr, "Accelerated verbs in perftest does not support Run Infinitely mode for now\n"); */ - /* exit(1); */ - /* } */ /* } */ /* if (user_param->perform_warm_up && */ /* !(user_param->tst == BW && */ @@ -2386,8 +2352,6 @@ void print_report_bw(struct perftest_parameters *user_param, struct bw_report_da long num_of_calculated_iters = user_param->iters; int free_my_bw_rep = 0; - if (user_param->test_method == RUN_INFINITELY) - user_param->tcompleted[opt_posted] = get_cycles(); cycles_t t, opt_delta, peak_up, peak_down, tsize; diff --git a/usr/benchmarks/ib/perftest_parameters_write_bw.h b/usr/benchmarks/ib/perftest_parameters_write_bw.h index 348a8ef74..fd29526cb 100755 --- a/usr/benchmarks/ib/perftest_parameters_write_bw.h +++ b/usr/benchmarks/ib/perftest_parameters_write_bw.h @@ -113,12 +113,12 @@ /* ------------------------------------------------------------------- */ /* Connection types available. */ -#define RC (0) -#define UC (1) -#define UD (2) -#define RawEth (3) -#define XRC (4) -#define DC (5) +#define RC (0) +#define UC (1) +#define UD (2) +#define RawEth (3) +#define XRC (4) +#define DC (5) /* Genral control definitions */ #define OFF (0) @@ -128,7 +128,15 @@ #define VERSION_EXIT (10) #define HELP_EXIT (11) #define MTU_FIX (7) -#define MAX_SIZE (8388608) + +#define MAX_SIZE_EXP (24) +// #define MAX_SIZE_EXP (22) +// #define MAX_SIZE_EXP (21) +// #define MAX_SIZE_EXP (20) +// #define MAX_SIZE_EXP (19) +// #define MAX_SIZE_EXP (18) +#define MAX_SIZE (1UL << MAX_SIZE_EXP) + #define LINK_FAILURE (-1) #define LINK_UNSPEC (-2) #define MAX_OUT_READ_HERMON (16) diff --git a/usr/benchmarks/ib/perftest_resources_write_bw.c b/usr/benchmarks/ib/perftest_resources_write_bw.c index 00044cd1c..f2d20b169 100755 --- a/usr/benchmarks/ib/perftest_resources_write_bw.c +++ b/usr/benchmarks/ib/perftest_resources_write_bw.c @@ -1443,7 +1443,7 @@ int run_iter_bw(struct pingpong_context *ctx, struct perftest_parameters *user_p gap_cycles = cpu_mhz * gap_time; } - /* main loop for posting */ + /* main loop for posting - iterations*/ while (totscnt < tot_iters || totccnt < tot_iters || (user_param->test_type == DURATION && user_param->state != END_STATE) ) { @@ -1460,6 +1460,7 @@ int run_iter_bw(struct pingpong_context *ctx, struct perftest_parameters *user_p burst_iter = 0; } + /* Loop to post work requests */ while ( (ctx->scnt[index] < user_param->iters || user_param->test_type == DURATION) && ((ctx->scnt[index] - ctx->ccnt[index]) < (user_param->tx_depth)) && !((user_param->rate_limit_type == SW_RATE_LIMIT ) && is_sending_burst == 0)) { @@ -1479,9 +1480,6 @@ int run_iter_bw(struct pingpong_context *ctx, struct perftest_parameters *user_p if (user_param->noPeak == OFF) user_param->tposted[totscnt] = get_cycles(); - /* if (user_param->test_type == DURATION && user_param->state == END_STATE) */ - /* break; */ - err = ibv_post_send(ctx->qp[index], &ctx->wr[index*user_param->post_list], &bad_wr); if (err) { fprintf(stderr, "Couldn't post send: qp %d scnt=%lu \n", index, ctx->scnt[index]); diff --git a/usr/benchmarks/ib/perftest_resources_write_bw.h b/usr/benchmarks/ib/perftest_resources_write_bw.h index e43f6b616..862e1ddbe 100755 --- a/usr/benchmarks/ib/perftest_resources_write_bw.h +++ b/usr/benchmarks/ib/perftest_resources_write_bw.h @@ -443,6 +443,7 @@ int ctx_alloc_credit(struct pingpong_context *ctx, int ctx_set_credit_wqes(struct pingpong_context *ctx, struct perftest_parameters *user_param, struct pingpong_dest *rem_dest); + /* run_iter_bw. * * Description : diff --git a/usr/benchmarks/ib/read_bw.c b/usr/benchmarks/ib/read_bw.c index 1e80f1e6b..145bcb9e9 100755 --- a/usr/benchmarks/ib/read_bw.c +++ b/usr/benchmarks/ib/read_bw.c @@ -38,9 +38,9 @@ #include #include -#include "perftest_resources.h" -#include "perftest_parameters.h" -#include "perftest_communication.h" +#include "perftest_parameters_write_bw.h" +#include "perftest_resources_write_bw.h" +#include "perftest_communication_write_bw.h" int main(int argc, char *argv[]) @@ -242,7 +242,7 @@ int main(int argc, char *argv[]) if (user_param.test_method == RUN_ALL) { - for (i = 1; i < 24 ; ++i) { + for (i = 1; i < MAX_SIZE_EXP; ++i) { user_param.size = (uint64_t)1 << i; ctx_set_send_wqes(&ctx, &user_param, rem_dest); diff --git a/usr/benchmarks/ib/read_lat.c b/usr/benchmarks/ib/read_lat.c index d7719d232..fa86c1a2a 100755 --- a/usr/benchmarks/ib/read_lat.c +++ b/usr/benchmarks/ib/read_lat.c @@ -41,9 +41,9 @@ #include #include "get_clock.h" -#include "perftest_resources.h" -#include "perftest_parameters.h" -#include "perftest_communication.h" +#include "perftest_parameters_write_bw.h" +#include "perftest_resources_write_bw.h" +#include "perftest_communication_write_bw.h" int main(int argc, char *argv[]) { @@ -223,7 +223,7 @@ int main(int argc, char *argv[]) ctx_set_send_wqes(&ctx, &user_param, rem_dest); if (user_param.test_method == RUN_ALL) { - for (i = 1; i < 24 ; ++i) { + for (i = 1; i < MAX_SIZE_EXP; ++i) { user_param.size = (uint64_t)1 << i; if(run_iter_lat(&ctx, &user_param)); return 17; diff --git a/usr/benchmarks/ib/write_bw.c b/usr/benchmarks/ib/write_bw.c index cc2535201..d83e05ad6 100755 --- a/usr/benchmarks/ib/write_bw.c +++ b/usr/benchmarks/ib/write_bw.c @@ -226,21 +226,13 @@ int main(int argc, char *argv[]) printf(RESULT_LINE); } - /* if (user_param.work_rdma_cm == ON) { */ - /* if (destroy_ctx(&ctx, &user_param)) { */ - /* fprintf(stderr, "Failed to destroy resources\n"); */ - /* return FAILURE; */ - /* } */ - /* user_comm.rdma_params->work_rdma_cm = ON; */ - /* return destroy_ctx(user_comm.rdma_ctx, user_comm.rdma_params); */ - /* } */ - return destroy_ctx(&ctx, &user_param); } if (user_param.test_method == RUN_ALL) { - for (i = 1; i < 24 ; ++i) { + // iterate over all 2^i sizes + for (i = 1; i < MAX_SIZE_EXP; ++i) { // !!! user_param.size = (uint64_t)1 << i; ctx_set_send_wqes(&ctx, &user_param, rem_dest); @@ -327,14 +319,6 @@ int main(int argc, char *argv[]) printf((user_param.cpu_util_data.enable ? RESULT_EXT_CPU_UTIL : RESULT_EXT)); print_full_bw_report(&user_param, &rem_bw_rep, NULL); } - /* } else if (user_param.test_method == RUN_INFINITELY) { */ - - /* ctx_set_send_wqes(&ctx, &user_param, rem_dest); */ - - /* if(run_iter_bw_infinitely(&ctx, &user_param)) { */ - /* fprintf(stderr, " Error occurred while running infinitely! aborting ...\n"); */ - /* return FAILURE; */ - /* } */ } if (user_param.output == FULL_VERBOSITY) { diff --git a/usr/benchmarks/ib/write_lat.c b/usr/benchmarks/ib/write_lat.c index 4a6278d4d..d0a89f0c7 100755 --- a/usr/benchmarks/ib/write_lat.c +++ b/usr/benchmarks/ib/write_lat.c @@ -197,7 +197,7 @@ int main(int argc, char *argv[]) } if (user_param.test_method == RUN_ALL) { - for (i = 1; i < 24 ; ++i) { + for (i = 1; i < MAX_SIZE_EXP; ++i) { user_param.size = (uint64_t)1 << i; if(run_iter_lat_write(&ctx, &user_param)) { fprintf(stderr, "Test exited with Error\n");