From patchwork Tue Sep 25 23:28:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nikolova, Tatyana E" X-Patchwork-Id: 10614971 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F137C913 for ; Tue, 25 Sep 2018 23:28:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D79AA2A625 for ; Tue, 25 Sep 2018 23:28:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC0832A687; Tue, 25 Sep 2018 23:28:27 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 749542A625 for ; Tue, 25 Sep 2018 23:28:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726119AbeIZFiU (ORCPT ); Wed, 26 Sep 2018 01:38:20 -0400 Received: from mga02.intel.com ([134.134.136.20]:51679 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726010AbeIZFiU (ORCPT ); Wed, 26 Sep 2018 01:38:20 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 16:28:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,304,1534834800"; d="scan'208";a="265709082" Received: from tenikolo-mobl.amr.corp.intel.com ([10.122.74.51]) by fmsmga005.fm.intel.com with ESMTP; 25 Sep 2018 16:28:23 -0700 From: Tatyana Nikolova To: jgg@ziepe.ca, dledford@redhat.com, leonro@mellanox.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH rdma-core] providers/i40iw: Add SEND_WITH_INVAL support Date: Tue, 25 Sep 2018 18:28:11 -0500 Message-Id: <20180925232811.13288-1-tatyana.e.nikolova@intel.com> X-Mailer: git-send-email 2.14.2 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 From: Shiraz Saleem The SEND_WITH_INVAL operation is supported in i40iw driver but accidentally missed out in user-space. Add the support in libi40iw. Reported-by: Benjamin Walker Signed-off-by: Shiraz Saleem Signed-off-by: Tatyana Nikolova --- providers/i40iw/i40iw_uverbs.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/providers/i40iw/i40iw_uverbs.c b/providers/i40iw/i40iw_uverbs.c index a213d8f..9d407c7 100644 --- a/providers/i40iw/i40iw_uverbs.c +++ b/providers/i40iw/i40iw_uverbs.c @@ -811,21 +811,30 @@ int i40iw_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr, struct ibv switch (ib_wr->opcode) { case IBV_WR_SEND: - if (ib_wr->send_flags & IBV_SEND_SOLICITED) - info.op_type = I40IW_OP_TYPE_SEND_SOL; - else - info.op_type = I40IW_OP_TYPE_SEND; + /* fall-through */ + case IBV_WR_SEND_WITH_INV: + if (ib_wr->opcode == IBV_WR_SEND) { + if (ib_wr->send_flags & IBV_SEND_SOLICITED) + info.op_type = I40IW_OP_TYPE_SEND_SOL; + else + info.op_type = I40IW_OP_TYPE_SEND; + } else { + if (ib_wr->send_flags & IBV_SEND_SOLICITED) + info.op_type = I40IW_OP_TYPE_SEND_SOL_INV; + else + info.op_type = I40IW_OP_TYPE_SEND_INV; + } if (ib_wr->send_flags & IBV_SEND_INLINE) { info.op.inline_send.data = (void *)(uintptr_t)ib_wr->sg_list[0].addr; info.op.inline_send.len = ib_wr->sg_list[0].length; ret = iwuqp->qp.ops.iw_inline_send(&iwuqp->qp, &info, - ib_wr->wr.rdma.rkey, false); + ib_wr->invalidate_rkey, false); } else { info.op.send.num_sges = ib_wr->num_sge; info.op.send.sg_list = (struct i40iw_sge *)ib_wr->sg_list; ret = iwuqp->qp.ops.iw_send(&iwuqp->qp, &info, - ib_wr->wr.rdma.rkey, false); + ib_wr->invalidate_rkey, false); } if (ret) {