[openib-general] [PATCH] add HW specific data to libibverbs modify QP, SRQ response

Ralph Campbell ralphc at pathscale.com
Thu Jun 15 14:41:44 PDT 2006


On Thu, 2006-06-15 at 13:55 -0700, Roland Dreier wrote:
>  > I am working on a ipathverbs.so version of ibv_poll_cq(),
>  > ibv_post_recv(), and ibv_post_srq_recv() which mmaps the
>  > queue into user space.  I found that I needed to modify the
>  > core libibverbs and kernel uverbs code in order to return
>  > the information I need from ib_ipath to the ipathverbs.so
>  > library.
> 
> That's weird, since libmthca operates on userspace queues and doesn't
> need this.  I'd like to see the ipath changes before we merge this,
> because there may be a better way to do things.

libmthca uses a single shared page which is created at driver open time.
I'm mmaping vmalloc memory created at ibv_create_cq(), qp, srq time
so I need a way to return the offset to ipathverbs.so to then pass
to mmap().

>  > Note that I didn't include matching changes to ehca since
>  > I don't have HW to test with but I can try to make a patch
>  > that allows it compile if requested to.
> 
> Yes, please include that.  The changes should be the same obvious ones
> as for mthca.

OK.

> Also, this breaks the ABI, and I don't see any compatibility code for
> libibverbs.

The new kernel drivers work with the old libibverbs and vice versa
since only the cqe entry in struct ibv_resize_cq_resp is used.
The reserved entry is only needed to avoid using "packed"
structs if struct ibv_resize_cq_resp is included in another struct.

>  >  		ibv_cmd_resize_cq;
>  > +		ibv_cmd_resize_cq_resp;
> 
> I guess we need to include a new function if we want to support this
> in libibverbs 1.0.  But for libibverbs 1.1 I would prefer to just
> change the prototype for ibv_resize_cq.

I thought about this trade off too.  Either way is OK with me.

I will post the current HW specific changes soon.
I have code for everything except resizing the QP's receive queue.

>  - R.
-- 
Ralph Campbell <ralphc at pathscale.com>





More information about the general mailing list