[ofw] patch: [send_bw] minor changes to allow the program to run on RoCE.
Tzachi Dar
tzachid at mellanox.co.il
Tue Jan 4 06:09:57 PST 2011
Index: B:/users/tzachid/projinf5/trunk/tools/perftests/user/send_bw/send_bw.c
===================================================================
--- B:/users/tzachid/projinf5/trunk/tools/perftests/user/send_bw/send_bw.c (revision 7160)
+++ B:/users/tzachid/projinf5/trunk/tools/perftests/user/send_bw/send_bw.c (revision 7161)
@@ -596,7 +596,7 @@
my_dest[i].lid = ctx->ca_attr->p_port_attr[ib_port-1].lid;
my_dest[i].psn = cl_hton32(rand() & 0xffffff);
- if (!my_dest[i].lid) {
+ if (ctx->ca_attr->p_port_attr[ib_port-1].transport == RDMA_TRANSPORT_IB && !my_dest[i].lid) {
fprintf(stderr, "Local lid 0x0 detected. Is an SM running?\n");
return 1;
}
@@ -620,6 +620,11 @@
rem_dest[i].lid, rem_dest[i].qpn, rem_dest[i].psn,
rem_dest[i].rkey, rem_dest[i].vaddr);
+ if(ctx->ca_attr->p_port_attr[ib_port-1].transport == RDMA_TRANSPORT_RDMAOE && user_parm->use_grh == 0) {
+ printf("Using grh is forced due to the use of RoCE\n");
+ user_parm->use_grh = 1;
+ }
+
if (pp_connect_ctx(ctx, ib_port, my_dest[i].psn, &rem_dest[i], user_parm, i))
return INVALID_SOCKET;
/* An additional handshake is required *after* moving qp to RTR.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20110104/5ffc195b/attachment.html>
More information about the ofw
mailing list