Re: [PATCH 14/16] IB uverbs: add mthca user CQ support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



    >> + int is_kernel;

    Andrew> I assume we have one body of code which is capable of
    Andrew> handling data structures in either kenrel memory of user
    Andrew> memory?  (guess).

    Andrew> If so, that's a fairly sensitive thing to be doing.  Tell
    Andrew> us more, please.

It's actually not that bad.  A completion queue (CQ) is a basically a
chunk of memory where completion information is written when a work
request completes.  The hardware can handle many CQs (64K is not an
unreasonable number), and we always do things like allocation of CQ
numbers, programming HW for CQ context, etc. in the kernel.

Both the kernel and userspace can do data path operations like looking
for a new CQ entry.  This means that for userspace CQs, the actual
memory where entries are written should be in userspace.  However the
struct mthca_cq will always be in the kernel.

If you look at how the is_kernel flag is used, you can see that all it
does is control whether we allocate/free the actual buffer and a few
other things in the kernel, or just use the stuff that userspace has
already allocated.

 - R.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux