• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/ofed/librdmacm/examples/

Lines Matching refs:test

72 static struct cmatest test;
213 test.connects_left--;
252 conn_param.private_data = test.rai->ai_connect;
253 conn_param.private_data_len = test.rai->ai_connect_len;
270 if (test.conn_index == connections) {
274 node = &test.nodes[test.conn_index++];
319 test.connects_left--;
320 test.disconnects_left++;
334 test.disconnects_left--;
337 /* Cleanup will occur after test completes. */
375 test.nodes = malloc(sizeof *test.nodes * connections);
376 if (!test.nodes) {
377 printf("cmatose: unable to allocate memory for test nodes\n");
380 memset(test.nodes, 0, sizeof *test.nodes * connections);
383 test.nodes[i].id = i;
385 ret = rdma_create_id(test.channel,
386 &test.nodes[i].cma_id,
387 &test.nodes[i], hints.ai_port_space);
395 rdma_destroy_id(test.nodes[i].cma_id);
396 free(test.nodes);
405 destroy_node(&test.nodes[i]);
406 free(test.nodes);
415 if (!test.nodes[i].connected)
419 ret = ibv_poll_cq(test.nodes[i].cq[index], 8, wc);
434 while (test.connects_left && !ret) {
435 ret = rdma_get_cm_event(test.channel, &event);
453 while (test.disconnects_left && !ret) {
454 ret = rdma_get_cm_event(test.channel, &event);
485 ret = rdma_migrate_id(test.nodes[i].cma_id, channel);
488 rdma_destroy_event_channel(test.channel);
489 test.channel = channel;
502 ret = rdma_create_id(test.channel, &listen_id, &test, hints.ai_port_space);
508 ret = get_rdma_addr(src_addr, dst_addr, port, &hints, &test.rai);
514 ret = rdma_bind_addr(listen_id, test.rai->ai_src_addr);
533 ret = post_sends(&test.nodes[i]);
559 if (!test.nodes[i].connected)
562 test.nodes[i].connected = 0;
563 rdma_disconnect(test.nodes[i].cma_id);
581 ret = get_rdma_addr(src_addr, dst_addr, port, &hints, &test.rai);
589 ret = rdma_resolve_addr(test.nodes[i].cma_id, test.rai->ai_src_addr,
590 test.rai->ai_dst_addr, 2000);
610 ret = post_sends(&test.nodes[i]);
700 test.connects_left = connections;
702 test.channel = rdma_create_event_channel();
703 if (!test.channel) {
718 printf("test complete\n");
720 rdma_destroy_event_channel(test.channel);
721 if (test.rai)
722 rdma_freeaddrinfo(test.rai);