linux-rdma/perftest

OFED - perftest - perftest_communication.c - rdma_write_keys and rdma_read_keys: Pointer to address bug

Opened this issue · 0 comments

memcpy(comm->rdma_ctx->buf[0], &my_dest, sizeof(struct pingpong_dest));

Hey, in both the write and read keys functions, usually the HAVE_ENDIAN is on so the code goes down that path. But if HAVE_ENDIAN is off, then the memcpy has a bug because the source argument is &my_dest in the write function and &rem_dest in the read function, but this will be a pointer to the address instead of the address since my_dest and rem_dest are already the address since they were sent from earlier in the stack in the hand_shake as &my_dest[0]