[ofa-general] [PATCH librdmacm] rping: Transfer rkey/addr/len information in network byte order.
Steve Wise
swise at opengridcomputing.com
Tue May 1 16:03:16 PDT 2007
Sean,
This patch regresses rping. I failed to test it on AMD64<->AMD64 (ie
like endian systems). I will provide another patch shortly, or we can
undo the broken rping patch for -rc3. Whatever you think is best.
Sorry for this!
Steve.
On Wed, 2007-04-25 at 10:34 -0500, Steve Wise wrote:
> Sean,
>
> This patch enables rping between a BE and LE system. Tested on IBM
> PPC64 <-> AMD64.
>
> Transfer rkey/addr/len information in network byte order.
>
> Signed-off-by: Steve Wise <swise at opengridcomputing.com>
> ---
>
> examples/rping.c | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/examples/rping.c b/examples/rping.c
> index 0441300..17b0000 100644
> --- a/examples/rping.c
> +++ b/examples/rping.c
> @@ -47,6 +47,7 @@ #include <pthread.h>
> #include <inttypes.h>
>
> #include <rdma/rdma_cma.h>
> +#include <infiniband/arch.h>
>
> static int debug = 0;
> #define DEBUG_LOG if (debug) printf
> @@ -239,9 +240,9 @@ static int server_recv(struct rping_cb *
> return -1;
> }
>
> - cb->remote_rkey = cb->recv_buf.rkey;
> - cb->remote_addr = cb->recv_buf.buf;
> - cb->remote_len = cb->recv_buf.size;
> + cb->remote_rkey = ntohl(cb->recv_buf.rkey);
> + cb->remote_addr = ntohll(cb->recv_buf.buf);
> + cb->remote_len = ntohl(cb->recv_buf.size);
> DEBUG_LOG("Received rkey %x addr %" PRIx64 "len %d from peer\n",
> cb->remote_rkey, cb->remote_addr, cb->remote_len);
>
>
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
More information about the general
mailing list