[ofa-general] [PATCH 2/4] RDMA/nes: Change CQ allocation for performance applications

Chien Tung ctung at neteffect.com
Thu Oct 2 07:39:30 PDT 2008


From: Vadim Makhervaks <vmakhervaks at neteffect.com> 

Change CQ allocation scheme for performance applications.

Signed-off-by: Vadim Makhervaks <vmakhervaks at neteffect.com>
Signed-off-by: Sweta Bhatt <sweta.bhatt at einfochips.com>
Signed-off-by: Chien Tung <ctung at neteffect.com>
--
 drivers/infiniband/hw/nes/nes_verbs.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index cd09493..cd79780 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -1600,7 +1600,9 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
 		nes_ucontext->mcrqf = req.mcrqf;
 		if (nes_ucontext->mcrqf) {
 			if (nes_ucontext->mcrqf & 0x80000000)
-				nescq->hw_cq.cq_number = nesvnic->nic.qp_id + 12 + (nes_ucontext->mcrqf & 0xf) - 1;
+				nescq->hw_cq.cq_number =
+					nesvnic->nic.qp_id + 28 +
+					2*((nes_ucontext->mcrqf & 0xf) - 1);
 			else if (nes_ucontext->mcrqf & 0x40000000)
 				nescq->hw_cq.cq_number = nes_ucontext->mcrqf & 0xffff;
 			else



More information about the general mailing list