#include "../optgroup.h"
#include <rdma/rdma_cma.h>
-#include <infiniband/arch.h>
#define FIO_RDMA_MAX_IO_DEPTH 512
rd->rmt_nr = ntohl(rd->recv_buf.nr);
for (i = 0; i < rd->rmt_nr; i++) {
- rd->rmt_us[i].buf = ntohll(rd->recv_buf.rmt_us[i].buf);
+ rd->rmt_us[i].buf = be64_to_cpu(rd->recv_buf.rmt_us[i].buf);
rd->rmt_us[i].rkey = ntohl(rd->recv_buf.rmt_us[i].rkey);
rd->rmt_us[i].size = ntohl(rd->recv_buf.rmt_us[i].size);
unsigned int nr)
{
struct rdmaio_data *rd = td->io_ops_data;
- struct timeval now;
+ struct timespec now;
unsigned int i;
if (!fio_fill_issue_time(td))
rd->send_buf.nr = htonl(td->o.iodepth);
if (ibv_post_send(rd->qp, &rd->sq_wr, &bad_wr) != 0) {
- log_err("fio: ibv_post_send fail: %m");
+ log_err("fio: ibv_post_send fail: %m\n");
return 1;
}
ret = rdma_poll_wait(td, IBV_WC_RECV) < 0;
if (ibv_post_send(rd->qp, &rd->sq_wr, &bad_wr) != 0) {
- log_err("fio: ibv_post_send fail: %m");
+ log_err("fio: ibv_post_send fail: %m\n");
return 1;
}
|| (rd->rdma_protocol ==
FIO_RDMA_MEM_READ))) {
if (ibv_post_send(rd->qp, &rd->sq_wr, &bad_wr) != 0) {
- log_err("fio: ibv_post_send fail: %m");
+ log_err("fio: ibv_post_send fail: %m\n");
return 1;
}
}
rd->send_buf.rmt_us[i].buf =
- htonll((uint64_t) (unsigned long)io_u->buf);
+ cpu_to_be64((uint64_t) (unsigned long)io_u->buf);
rd->send_buf.rmt_us[i].rkey = htonl(io_u->mr->rkey);
rd->send_buf.rmt_us[i].size = htonl(max_bs);