From patchwork Thu Sep 1 06:59:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Knut Omang X-Patchwork-Id: 9308413 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 192E9607D2 for ; Thu, 1 Sep 2016 07:00:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05571291E9 for ; Thu, 1 Sep 2016 07:00:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE316291F6; Thu, 1 Sep 2016 07:00:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D25B291E9 for ; Thu, 1 Sep 2016 07:00:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754113AbcIAHA3 (ORCPT ); Thu, 1 Sep 2016 03:00:29 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:40437 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752817AbcIAHA0 (ORCPT ); Thu, 1 Sep 2016 03:00:26 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u8170M68011441 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Sep 2016 07:00:23 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u8170MIK012704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Sep 2016 07:00:22 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u8170MtD026941; Thu, 1 Sep 2016 07:00:22 GMT Received: from abi.no.oracle.com (/10.172.144.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 01 Sep 2016 00:00:22 -0700 From: Knut Omang To: Doug Ledford Cc: linux-rdma@vger.kernel.org, Mukesh Kacker , Knut Omang Subject: [PATCH libibverbs 3/3] Provide remote XRC SRQ number in kernel post_send. Date: Thu, 1 Sep 2016 08:59:53 +0200 Message-Id: <1472713193-22397-4-git-send-email-knut.omang@oracle.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1472713193-22397-1-git-send-email-knut.omang@oracle.com> References: <1472713193-22397-1-git-send-email-knut.omang@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Also proper end align the ibv_kern_send_wr struct. Requires a corresponding kernel change. Signed-off-by: Knut Omang Reviewed-by: Mukesh Kacker --- include/infiniband/kern-abi.h | 1 + src/cmd.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/infiniband/kern-abi.h b/include/infiniband/kern-abi.h index 8bdeef5..7b1d310 100644 --- a/include/infiniband/kern-abi.h +++ b/include/infiniband/kern-abi.h @@ -800,6 +800,7 @@ struct ibv_kern_send_wr { union { struct { __u32 remote_srqn; + __u32 reserved; } xrc; } qp_type; }; diff --git a/src/cmd.c b/src/cmd.c index a418ee1..a4e2f75 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1293,6 +1293,8 @@ int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr, tmp->wr.ud.remote_qpn = i->wr.ud.remote_qpn; tmp->wr.ud.remote_qkey = i->wr.ud.remote_qkey; } else { + if (ibqp->qp_type == IBV_QPT_XRC_SEND) + tmp->qp_type.xrc.remote_srqn = i->qp_type.xrc.remote_srqn; switch (i->opcode) { case IBV_WR_RDMA_WRITE: case IBV_WR_RDMA_WRITE_WITH_IMM: