From patchwork Thu Dec 24 14:39:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 7918361 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 86BB7BEEED for ; Thu, 24 Dec 2015 14:44:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B17B4204D2 for ; Thu, 24 Dec 2015 14:44:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE5D220386 for ; Thu, 24 Dec 2015 14:44:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754381AbbLXOoh (ORCPT ); Thu, 24 Dec 2015 09:44:37 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:37861 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754297AbbLXOoh (ORCPT ); Thu, 24 Dec 2015 09:44:37 -0500 Received: from p4ff2eea3.dip0.t-ipconnect.de ([79.242.238.163] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1aC788-00013g-Hh; Thu, 24 Dec 2015 14:44:37 +0000 From: Christoph Hellwig To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH 3/6] IB/uapi: expose uverbs WC opcodes Date: Thu, 24 Dec 2015 15:39:24 +0100 Message-Id: <1450967967-12479-4-git-send-email-hch@lst.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450967967-12479-1-git-send-email-hch@lst.de> References: <1450967967-12479-1-git-send-email-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html 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, 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 This exposes the WC opcodes supported by uverbs as part of the uapi headers. It follows the same scheme as the WR opcodes. Signed-off-by: Christoph Hellwig --- include/rdma/ib_verbs.h | 29 +++++++++++++---------------- include/uapi/rdma/ib_verbs.h | 16 ++++++++++++++++ 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 5dccc6a..7dce204 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -819,22 +819,19 @@ enum ib_wc_status { const char *__attribute_const__ ib_wc_status_msg(enum ib_wc_status status); enum ib_wc_opcode { - IB_WC_SEND, - IB_WC_RDMA_WRITE, - IB_WC_RDMA_READ, - IB_WC_COMP_SWAP, - IB_WC_FETCH_ADD, - IB_WC_LSO, - IB_WC_LOCAL_INV, - IB_WC_REG_MR, - IB_WC_MASKED_COMP_SWAP, - IB_WC_MASKED_FETCH_ADD, -/* - * Set value of IB_WC_RECV so consumers can test if a completion is a - * receive by testing (opcode & IB_WC_RECV). - */ - IB_WC_RECV = 1 << 7, - IB_WC_RECV_RDMA_WITH_IMM + IB_WC_SEND = IB_UVERBS_WC_SEND, + IB_WC_RDMA_WRITE = IB_UVERBS_WC_RDMA_WRITE, + IB_WC_RDMA_READ = IB_UVERBS_WC_RDMA_READ, + IB_WC_COMP_SWAP = IB_UVERBS_WC_COMP_SWAP, + IB_WC_FETCH_ADD = IB_UVERBS_WC_FETCH_ADD, + IB_WC_LSO = IB_UVERBS_WC_SEND_END, + IB_WC_LOCAL_INV = IB_UVERBS_WC_SEND_END + 1, + IB_WC_REG_MR = IB_UVERBS_WC_SEND_END + 2, + IB_WC_MASKED_COMP_SWAP = IB_UVERBS_WC_SEND_END + 3, + IB_WC_MASKED_FETCH_ADD = IB_UVERBS_WC_SEND_END + 4, + + IB_WC_RECV = IB_UVERBS_WC_RECV, + IB_WC_RECV_RDMA_WITH_IMM = IB_UVERBS_WC_RECV_END, }; enum ib_wc_flags { diff --git a/include/uapi/rdma/ib_verbs.h b/include/uapi/rdma/ib_verbs.h index 3be3152..fd7a393 100644 --- a/include/uapi/rdma/ib_verbs.h +++ b/include/uapi/rdma/ib_verbs.h @@ -29,4 +29,20 @@ enum ib_uverbs_send_flags { IB_UVERBS_SEND_END = (1 << 5), }; +enum ib_uverbs_wc_opcode { + IB_UVERBS_WC_SEND = 0, + IB_UVERBS_WC_RDMA_WRITE = 1, + IB_UVERBS_WC_RDMA_READ = 2, + IB_UVERBS_WC_COMP_SWAP = 3, + IB_UVERBS_WC_FETCH_ADD = 4, + IB_UVERBS_WC_SEND_END = 5, + + /* + * Set value of IB_WC_RECV so consumers can test if a completion is a + * receive by testing (opcode & IB_WC_RECV). + */ + IB_UVERBS_WC_RECV = 1 << 7, + IB_UVERBS_WC_RECV_END = (1 << 7) + 1, +}; + #endif /* _UAPI_RDMA_IB_VERBS_H */