[openib-general] sharing qp between user and kernel

Pete Wyckoff pw at osc.edu
Wed Feb 7 14:31:46 PST 2007


We're writing a kernel module that is an IB verbs consumer.  The
plan was to connect up the QP in userspace and do some preliminary
communication, then hand the QP to the kernel and let it use the QP
directly to do some more communication.  This works fine on ammasso,
but fails on mthca.

In particular, this code in mthca_alloc_wqe_buf():

        /*
         * If this is a userspace QP, we don't actually have to 
         * allocate anything.  All we need is to calculate the WQE
         * sizes and the send_wqe_offset, so we're done now.
         */
        if (pd->ibpd.uobject)
                return 0;

prevents the allocation of space for WQEs required by
kernel-initiated posts.  Just commenting out this section led to
failures elsewhere (local prot error on a userspace cq poll for a
receive).

Before I dig into this anymore, do you expect this to work?  Are
there fundamental problems with QP sharing between user and kernel?
It would sure be nice not to have to stick the connection management
aspects into the kernel.

		-- Pete




More information about the general mailing list