linux/drivers/infiniband/core
Michael S. Tsirkin 062dbb69f3 IB: Return qp pointer as part of ib_wc
struct ib_wc currently only includes the local QP number: this matches
the IB spec, but seems mostly useless. The following patch replaces
this with the pointer to qp itself, and updates all low level drivers
and all users.

This has the following advantages:
- Ability to get a per-qp context through wc->qp->qp_context
- Existing drivers already have the qp pointer ready in poll cq, so
  this change actually saves a tiny bit (extra memory read) on data path
  (for ehca it would actually be expensive to find the QP pointer when
  polling a CQ, but ehca does not support SRQ so we can leave wc->qp as
  NULL for ehca)
- Users that need the QP number can still get it through wc->qp->qp_num

Use case:

In IPoIB connected mode code, I have a common CQ shared by multiple
QPs.  To track connection usage, I need a way to get at some per-QP
context upon the completion, and I would like to avoid allocating
context object per work request just to stick a QP pointer into it.
With this code, I can just use wc->qp->qp_context.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-02-04 14:11:55 -08:00
..
addr.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-12-05 14:37:56 +00:00
agent.c IB/mad: Simplify SMI by eliminating smi_check_local_dr_smp() 2006-03-20 10:08:11 -08:00
agent.h [PATCH] missing include in infiniband 2005-10-29 10:35:07 -07:00
cache.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
cm_msgs.h [IB] cm: Add missing break in switch 2005-10-20 12:29:36 -07:00
cm.c RDMA/cma: Allow early transition to RTS to handle lost CM messages 2006-12-12 11:50:21 -08:00
cma.c RDMA/iwcm: iWARP connection timeouts shouldn't be reported as rejects 2007-01-07 20:15:58 -08:00
core_priv.h [PATCH] IB: move include files to include/rdma 2005-08-26 20:37:38 -07:00
device.c IB: Fix typo in kerneldoc for ib_set_client_data() 2006-09-22 15:22:58 -07:00
fmr_pool.c IB/fmr: ib_flush_fmr_pool() may wait too long 2006-12-12 11:50:19 -08:00
iwcm.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-12-05 14:37:56 +00:00
iwcm.h RDMA: iWARP Connection Manager. 2006-09-22 15:22:46 -07:00
mad_priv.h IB/core: Use the new verbs DMA mapping functions 2006-12-12 14:28:30 -08:00
mad_rmpp.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
mad_rmpp.h [IB] Fix MAD layer DMA mappings to avoid touching data buffer once mapped 2005-10-25 10:51:39 -07:00
mad.c IB: Return qp pointer as part of ib_wc 2007-02-04 14:11:55 -08:00
Makefile RDMA/cma: Export rdma cm interface to userspace 2006-12-12 11:50:22 -08:00
packer.c [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
sa_query.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
smi.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00
smi.h IB/mad: Simplify SMI by eliminating smi_check_local_dr_smp() 2006-03-20 10:08:11 -08:00
sysfs.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00
ucm.c IB/ucm: Fix deadlock in cleanup 2006-11-29 15:33:10 -08:00
ucma.c RDMA/ucma: Don't report events with invalid user context 2007-01-07 20:20:08 -08:00
ud_header.c [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
user_mad.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00
uverbs_cmd.c IB: Return qp pointer as part of ib_wc 2007-02-04 14:11:55 -08:00
uverbs_main.c [PATCH] struct path: convert infiniband 2006-12-08 08:28:46 -08:00
uverbs_marshall.c RDMA/cma: Export rdma cm interface to userspace 2006-12-12 11:50:22 -08:00
uverbs_mem.c IB/core: Use the new verbs DMA mapping functions 2006-12-12 14:28:30 -08:00
uverbs.h IB/uverbs: Avoid a crash on device hot remove 2006-08-03 10:56:42 -07:00
verbs.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00