From patchwork Mon Mar 25 14:45:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 10869427 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 8B2C41575 for ; Mon, 25 Mar 2019 14:46:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77EE2293F7 for ; Mon, 25 Mar 2019 14:46:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BB4A293FC; Mon, 25 Mar 2019 14:46:24 +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,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 11015293F7 for ; Mon, 25 Mar 2019 14:46:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729031AbfCYOqX (ORCPT ); Mon, 25 Mar 2019 10:46:23 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:59065 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726010AbfCYOqX (ORCPT ); Mon, 25 Mar 2019 10:46:23 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 25 Mar 2019 16:46:16 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [10.7.2.17]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x2PEkGwd027253; Mon, 25 Mar 2019 16:46:16 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [127.0.0.1]) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8) with ESMTP id x2PEkGIX014132; Mon, 25 Mar 2019 16:46:16 +0200 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id x2PEkGJr014131; Mon, 25 Mar 2019 16:46:16 +0200 From: Yishai Hadas To: linux-rdma@vger.kernel.org Cc: yishaih@mellanox.com, artemyko@mellanox.com, jgg@mellanox.com, majd@mellanox.com Subject: [PATCH rdma-core 2/4] verbs: Introduce IBV_WR/WC_DRIVER opcodes Date: Mon, 25 Mar 2019 16:45:49 +0200 Message-Id: <1553525151-14005-3-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1553525151-14005-1-git-send-email-yishaih@mellanox.com> References: <1553525151-14005-1-git-send-email-yishaih@mellanox.com> 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 Introduce IBV_WR/WC_DRIVER1 opcode to be used/defined per driver for its use case. Reviewed-by: Artemy Kovalyov Signed-off-by: Yishai Hadas --- libibverbs/man/ibv_poll_cq.3 | 2 ++ libibverbs/man/ibv_post_send.3 | 2 ++ libibverbs/verbs.h | 2 ++ providers/rxe/rxe.c | 1 + 4 files changed, 7 insertions(+) diff --git a/libibverbs/man/ibv_poll_cq.3 b/libibverbs/man/ibv_poll_cq.3 index 12d1a76..957fd15 100644 --- a/libibverbs/man/ibv_poll_cq.3 +++ b/libibverbs/man/ibv_poll_cq.3 @@ -82,6 +82,8 @@ The user should consume work completions at a rate that prevents CQ overrun from occurrence. In case of a CQ overrun, the async event .B IBV_EVENT_CQ_ERR will be triggered, and the CQ cannot be used. +.PP +IBV_WC_DRIVER1 will be reported as a response to IBV_WR_DRIVER1 opcode. .SH "SEE ALSO" .BR ibv_post_send (3), .BR ibv_post_recv (3) diff --git a/libibverbs/man/ibv_post_send.3 b/libibverbs/man/ibv_post_send.3 index e6514d0..4fb99f7 100644 --- a/libibverbs/man/ibv_post_send.3 +++ b/libibverbs/man/ibv_post_send.3 @@ -166,6 +166,8 @@ request is fully executed and a work completion has been retrieved from the corresponding completion queue (CQ). However, if the IBV_SEND_INLINE flag was set, the buffer can be reused immediately after the call returns. +.PP +IBV_WR_DRIVER1 is an opcode that should be used to issue a specific driver operation. .SH "SEE ALSO" .BR ibv_create_qp (3), .BR ibv_create_ah (3), diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h index a2bae25..cb2d843 100644 --- a/libibverbs/verbs.h +++ b/libibverbs/verbs.h @@ -497,6 +497,7 @@ enum ibv_wc_opcode { IBV_WC_TM_SYNC, IBV_WC_TM_RECV, IBV_WC_TM_NO_TAG, + IBV_WC_DRIVER1, }; enum { @@ -1057,6 +1058,7 @@ enum ibv_wr_opcode { IBV_WR_BIND_MW, IBV_WR_SEND_WITH_INV, IBV_WR_TSO, + IBV_WR_DRIVER1, }; enum ibv_send_flags { diff --git a/providers/rxe/rxe.c b/providers/rxe/rxe.c index 4c21a4a..909c3f7 100644 --- a/providers/rxe/rxe.c +++ b/providers/rxe/rxe.c @@ -585,6 +585,7 @@ static void convert_send_wr(struct rxe_send_wr *kwr, struct ibv_send_wr *uwr) case IBV_WR_BIND_MW: case IBV_WR_SEND_WITH_INV: case IBV_WR_TSO: + case IBV_WR_DRIVER1: break; } }