diff options
author | Ralph Campbell <ralph.campbell@qlogic.com> | 2007-09-07 19:54:01 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-10-09 23:52:23 -0400 |
commit | 6cff2faaf135b602c914710f3414630c3fc1ee83 (patch) | |
tree | a63266c7640b5739a6ab948194da0c7283229f96 /drivers/infiniband/hw/ipath/ipath_verbs.h | |
parent | d42b01b584b6f55f70c56f6a3dabc26f4982d30d (diff) |
IB/ipath: Optimize completion queue entry insertion and polling
The code to add an entry to the completion queue stored the QPN which is
needed for the user level verbs view of the completion queue entry but
the kernel struct ib_wc contains a pointer to the QP instead of a QPN.
When the kernel polled for a completion queue entry, the QPN was lookup
up and the QP pointer recovered. This patch stores the CQE differently
based on whether the CQ is a kernel CQ or a user CQ thus avoiding the
QPN to QP lookup overhead.
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_verbs.h')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.h b/drivers/infiniband/hw/ipath/ipath_verbs.h index a1972295bffd..9be9bf91f4f0 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.h +++ b/drivers/infiniband/hw/ipath/ipath_verbs.h | |||
@@ -191,7 +191,11 @@ struct ipath_mmap_info { | |||
191 | struct ipath_cq_wc { | 191 | struct ipath_cq_wc { |
192 | u32 head; /* index of next entry to fill */ | 192 | u32 head; /* index of next entry to fill */ |
193 | u32 tail; /* index of next ib_poll_cq() entry */ | 193 | u32 tail; /* index of next ib_poll_cq() entry */ |
194 | struct ib_uverbs_wc queue[1]; /* this is actually size ibcq.cqe + 1 */ | 194 | union { |
195 | /* these are actually size ibcq.cqe + 1 */ | ||
196 | struct ib_uverbs_wc uqueue[0]; | ||
197 | struct ib_wc kqueue[0]; | ||
198 | }; | ||
195 | }; | 199 | }; |
196 | 200 | ||
197 | /* | 201 | /* |