[ewg] Re: [PATCH] rdmaoe/libibverbs: handle binary compatibility

Jason Gunthorpe jgunthorpe at obsidianresearch.com
Mon Dec 14 11:14:09 PST 2009


On Mon, Dec 14, 2009 at 10:41:27AM +0200, Eli Cohen wrote:
> On Thu, Dec 10, 2009 at 01:50:00PM -0800, Sean Hefty wrote:
> > >@@ -306,7 +314,7 @@ static struct pingpong_context *pp_init_ctx(struct
> > >ibv_device *ib_dev, int size,
> > > 		return NULL;
> > > 	}
> > >
> > >-	memset(ctx->buf, 0, size);
> > >+	memset(ctx->buf, 0x7b + is_server, size);
> > >
> > > 	ctx->context = ibv_open_device(ib_dev);
> > > 	if (!ctx->context) {
> > >@@ -481,6 +489,7 @@ static void usage(const char *argv0)
> > > 	printf("  -n, --iters=<iters>    number of exchanges (default 1000)\n");
> > > 	printf("  -l, --sl=<sl>          service level value\n");
> > > 	printf("  -e, --events           sleep on CQ events (default poll)\n");
> > >+	printf("  -g, --gid=<remote gid> gid of the other port\n");
> > 
> > It seems easier for the user if the tests discovered its local GID and exchanged
> > it with the remote side like it does with the LID and QPN.
> >  
> 
> Will be changed in the next patch set -- the user will specify the
> index to the GID table of the local port.

It would be nice if the tools would consistently let you choose the
source device based on gid.. I've been meaning to make a patch for
verbs to add a ibv_open_device_by_gid() function or something like
that.

Using gid idx is pretty unfriendly ...

But it is just a test prorgam, no worries.

Jason



More information about the ewg mailing list