acrn-kernel/drivers/infiniband/hw/mthca
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
..
Kconfig
Makefile
mthca_allocator.c
mthca_av.c
mthca_catas.c
mthca_cmd.c IB: Return qp pointer as part of ib_wc 2007-02-04 14:11:55 -08:00
mthca_cmd.h
mthca_config_reg.h
mthca_cq.c IB: Return qp pointer as part of ib_wc 2007-02-04 14:11:55 -08:00
mthca_dev.h
mthca_doorbell.h
mthca_eq.c
mthca_mad.c
mthca_main.c IB/mthca: Use DEFINE_MUTEX() instead of mutex_init() 2006-12-15 20:55:28 -08:00
mthca_mcg.c
mthca_memfree.c IB/mthca: Fix off-by-one in FMR handling on memfree 2007-01-04 19:46:32 -08:00
mthca_memfree.h
mthca_mr.c
mthca_pd.c
mthca_profile.c
mthca_profile.h
mthca_provider.c [PATCH] IB/mthca: Fix FMR breakage caused by kmemdup() conversion 2006-12-30 10:55:55 -08:00
mthca_provider.h
mthca_qp.c IB/mthca: Don't execute QUERY_QP firmware command for QP in RESET state 2007-01-09 14:14:28 -08:00
mthca_reset.c
mthca_srq.c [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
mthca_uar.c
mthca_user.h
mthca_wqe.h