From patchwork Thu Dec 24 14:39:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 7918381 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7F3D49F32E for ; Thu, 24 Dec 2015 14:44:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A192720035 for ; Thu, 24 Dec 2015 14:44:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 910CA203E3 for ; Thu, 24 Dec 2015 14:44:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754302AbbLXOoo (ORCPT ); Thu, 24 Dec 2015 09:44:44 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:37888 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753259AbbLXOon (ORCPT ); Thu, 24 Dec 2015 09:44:43 -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 1aC78F-00015h-6a; Thu, 24 Dec 2015 14:44:43 +0000 From: Christoph Hellwig To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH 5/6] IB/uapi: expose uverbs WC status codes Date: Thu, 24 Dec 2015 15:39:26 +0100 Message-Id: <1450967967-12479-6-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, UPPERCASE_50_75 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 status codes 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 | 44 ++++++++++++++++++++++---------------------- include/uapi/rdma/ib_verbs.h | 25 +++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 22 deletions(-) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 337db70..48bfcf5 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -792,28 +792,28 @@ struct ib_ah_attr { }; enum ib_wc_status { - IB_WC_SUCCESS, - IB_WC_LOC_LEN_ERR, - IB_WC_LOC_QP_OP_ERR, - IB_WC_LOC_EEC_OP_ERR, - IB_WC_LOC_PROT_ERR, - IB_WC_WR_FLUSH_ERR, - IB_WC_MW_BIND_ERR, - IB_WC_BAD_RESP_ERR, - IB_WC_LOC_ACCESS_ERR, - IB_WC_REM_INV_REQ_ERR, - IB_WC_REM_ACCESS_ERR, - IB_WC_REM_OP_ERR, - IB_WC_RETRY_EXC_ERR, - IB_WC_RNR_RETRY_EXC_ERR, - IB_WC_LOC_RDD_VIOL_ERR, - IB_WC_REM_INV_RD_REQ_ERR, - IB_WC_REM_ABORT_ERR, - IB_WC_INV_EECN_ERR, - IB_WC_INV_EEC_STATE_ERR, - IB_WC_FATAL_ERR, - IB_WC_RESP_TIMEOUT_ERR, - IB_WC_GENERAL_ERR + IB_WC_SUCCESS = IB_UVERBS_WC_SUCCESS, + IB_WC_LOC_LEN_ERR = IB_UVERBS_WC_LOC_LEN_ERR, + IB_WC_LOC_QP_OP_ERR = IB_UVERBS_WC_LOC_QP_OP_ERR, + IB_WC_LOC_EEC_OP_ERR = IB_UVERBS_WC_LOC_EEC_OP_ERR, + IB_WC_LOC_PROT_ERR = IB_UVERBS_WC_LOC_PROT_ERR, + IB_WC_WR_FLUSH_ERR = IB_UVERBS_WC_WR_FLUSH_ERR, + IB_WC_MW_BIND_ERR = IB_UVERBS_WC_MW_BIND_ERR, + IB_WC_BAD_RESP_ERR = IB_UVERBS_WC_BAD_RESP_ERR, + IB_WC_LOC_ACCESS_ERR = IB_UVERBS_WC_LOC_ACCESS_ERR, + IB_WC_REM_INV_REQ_ERR = IB_UVERBS_WC_REM_INV_REQ_ERR, + IB_WC_REM_ACCESS_ERR = IB_UVERBS_WC_REM_ACCESS_ERR, + IB_WC_REM_OP_ERR = IB_UVERBS_WC_REM_OP_ERR, + IB_WC_RETRY_EXC_ERR = IB_UVERBS_WC_RETRY_EXC_ERR, + IB_WC_RNR_RETRY_EXC_ERR = IB_UVERBS_WC_RNR_RETRY_EXC_ERR, + IB_WC_LOC_RDD_VIOL_ERR = IB_UVERBS_WC_LOC_RDD_VIOL_ERR, + IB_WC_REM_INV_RD_REQ_ERR= IB_UVERBS_WC_REM_INV_RD_REQ_ERR, + IB_WC_REM_ABORT_ERR = IB_UVERBS_WC_REM_ABORT_ERR, + IB_WC_INV_EECN_ERR = IB_UVERBS_WC_INV_EECN_ERR, + IB_WC_INV_EEC_STATE_ERR = IB_UVERBS_WC_INV_EEC_STATE_ERR, + IB_WC_FATAL_ERR = IB_UVERBS_WC_FATAL_ERR, + IB_WC_RESP_TIMEOUT_ERR = IB_UVERBS_WC_RESP_TIMEOUT_ERR, + IB_WC_GENERAL_ERR = IB_UVERBS_WC_GENERAL_ERR, }; const char *__attribute_const__ ib_wc_status_msg(enum ib_wc_status status); diff --git a/include/uapi/rdma/ib_verbs.h b/include/uapi/rdma/ib_verbs.h index c40c00b..fbadb29 100644 --- a/include/uapi/rdma/ib_verbs.h +++ b/include/uapi/rdma/ib_verbs.h @@ -55,4 +55,29 @@ enum ib_uverbs_wc_flags { IB_UVERBS_WC_WITH_NETWORK_HDR_TYPE = (1 << 6), }; +enum ib_uverbs_wc_status { + IB_UVERBS_WC_SUCCESS, + IB_UVERBS_WC_LOC_LEN_ERR, + IB_UVERBS_WC_LOC_QP_OP_ERR, + IB_UVERBS_WC_LOC_EEC_OP_ERR, + IB_UVERBS_WC_LOC_PROT_ERR, + IB_UVERBS_WC_WR_FLUSH_ERR, + IB_UVERBS_WC_MW_BIND_ERR, + IB_UVERBS_WC_BAD_RESP_ERR, + IB_UVERBS_WC_LOC_ACCESS_ERR, + IB_UVERBS_WC_REM_INV_REQ_ERR, + IB_UVERBS_WC_REM_ACCESS_ERR, + IB_UVERBS_WC_REM_OP_ERR, + IB_UVERBS_WC_RETRY_EXC_ERR, + IB_UVERBS_WC_RNR_RETRY_EXC_ERR, + IB_UVERBS_WC_LOC_RDD_VIOL_ERR, + IB_UVERBS_WC_REM_INV_RD_REQ_ERR, + IB_UVERBS_WC_REM_ABORT_ERR, + IB_UVERBS_WC_INV_EECN_ERR, + IB_UVERBS_WC_INV_EEC_STATE_ERR, + IB_UVERBS_WC_FATAL_ERR, + IB_UVERBS_WC_RESP_TIMEOUT_ERR, + IB_UVERBS_WC_GENERAL_ERR +}; + #endif /* _UAPI_RDMA_IB_VERBS_H */