From patchwork Wed Jun 22 12:33:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jackm X-Patchwork-Id: 904902 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5MCTfU8017442 for ; Wed, 22 Jun 2011 12:29:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755582Ab1FVM3k (ORCPT ); Wed, 22 Jun 2011 08:29:40 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:57508 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753924Ab1FVM3k (ORCPT ); Wed, 22 Jun 2011 08:29:40 -0400 Received: by wyb38 with SMTP id 38so518568wyb.19 for ; Wed, 22 Jun 2011 05:29:39 -0700 (PDT) Received: by 10.216.242.205 with SMTP id i55mr2174817wer.66.1308745779167; Wed, 22 Jun 2011 05:29:39 -0700 (PDT) Received: from mtldesk006.lab.mtl.com ([82.166.227.17]) by mx.google.com with ESMTPS id r20sm276531wec.31.2011.06.22.05.29.35 (version=SSLv3 cipher=OTHER); Wed, 22 Jun 2011 05:29:36 -0700 (PDT) From: Jack Morgenstein Organization: Mellanox To: Sean Hefty Subject: [PATCH] mlx4: Non-xrc SRQs need an xrcd which will never be used by xrc Date: Wed, 22 Jun 2011 15:33:40 +0300 User-Agent: KMail/1.9.1 Cc: linux-rdma@vger.kernel.org, dotanb@mellanox.co.il MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201106221533.41053.jackm@dev.mellanox.co.il> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 22 Jun 2011 12:29:42 +0000 (UTC) Non-xrc SRQs should be created with a domain number which will never be assigned to an XRC TGT QP. This is so there is no possibility of such an SRQ inadvertently receiving an XRC transmission. XRC Domain number allocations begin with (dev->dev->caps.reserved_xrcds + 1); Domain number (dev->dev->caps.reserved_xrcds) has been set aside to be used for this purpose. Signed-off-by: Jack Morgenstein srq_type == IB_SRQT_XRC) ? to_mcq(init_attr->ext.xrc.cq)->mcq.cqn : 0; xrcdn = (init_attr->srq_type == IB_SRQT_XRC) ? - to_mxrcd(init_attr->ext.xrc.xrcd)->xrcdn : 0; + to_mxrcd(init_attr->ext.xrc.xrcd)->xrcdn : + (u16) dev->dev->caps.reserved_xrcds; err = mlx4_srq_alloc(dev->dev, to_mpd(pd)->pdn, cqn, xrcdn, &srq->mtt, srq->db.dma, &srq->msrq); if (err)