From patchwork Wed Jul 2 06:11:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hefty, Sean" X-Patchwork-Id: 4463591 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D307CBEEAA for ; Wed, 2 Jul 2014 06:12:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 02AD420225 for ; Wed, 2 Jul 2014 06:12:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E8D5D20211 for ; Wed, 2 Jul 2014 06:12:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752583AbaGBGMC (ORCPT ); Wed, 2 Jul 2014 02:12:02 -0400 Received: from mga01.intel.com ([192.55.52.88]:11007 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751998AbaGBGMC (ORCPT ); Wed, 2 Jul 2014 02:12:02 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 01 Jul 2014 23:11:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,586,1400050800"; d="scan'208";a="563985209" Received: from cst-linux.jf.intel.com ([10.23.221.72]) by fmsmga002.fm.intel.com with ESMTP; 01 Jul 2014 23:11:32 -0700 From: sean.hefty@intel.com To: linux-rdma@vger.kernel.org Cc: Sean Hefty Subject: [PATCH 2/8] librdmacm: Use SRQ in rdma_create_qp Date: Tue, 1 Jul 2014 23:11:13 -0700 Message-Id: <1404281479-6755-3-git-send-email-sean.hefty@intel.com> X-Mailer: git-send-email 1.7.3 In-Reply-To: <1404281479-6755-1-git-send-email-sean.hefty@intel.com> References: <1404281479-6755-1-git-send-email-sean.hefty@intel.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Hefty If an application has allocated an SRQ on an rdma_cm_id, use it when creating a QP. Signed-off-by: Sean Hefty --- src/cma.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/cma.c b/src/cma.c index 1a88e5c..192d9ed 100644 --- a/src/cma.c +++ b/src/cma.c @@ -1303,6 +1303,8 @@ int rdma_create_qp(struct rdma_cm_id *id, struct ibv_pd *pd, qp_init_attr->send_cq = id->send_cq; if (!qp_init_attr->recv_cq) qp_init_attr->recv_cq = id->recv_cq; + if (id->srq && !qp_init_attr->srq) + qp_init_attr->srq = id->srq; qp = ibv_create_qp(pd, qp_init_attr); if (!qp) { ret = ERR(ENOMEM);