From patchwork Thu Dec 24 14:39:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 7918371 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 A4B9D9F32E for ; Thu, 24 Dec 2015 14:44:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D5DCE20386 for ; Thu, 24 Dec 2015 14:44:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E052920035 for ; Thu, 24 Dec 2015 14:44:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754570AbbLXOol (ORCPT ); Thu, 24 Dec 2015 09:44:41 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:37877 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754302AbbLXOok (ORCPT ); Thu, 24 Dec 2015 09:44:40 -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 1aC78B-00014t-Tr; Thu, 24 Dec 2015 14:44:40 +0000 From: Christoph Hellwig To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH 4/6] IB/uapi: expose uverbs WC flags Date: Thu, 24 Dec 2015 15:39:25 +0100 Message-Id: <1450967967-12479-5-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 flags 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 | 14 +++++++------- include/uapi/rdma/ib_verbs.h | 10 ++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 7dce204..337db70 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -835,13 +835,13 @@ enum ib_wc_opcode { }; enum ib_wc_flags { - IB_WC_GRH = 1, - IB_WC_WITH_IMM = (1<<1), - IB_WC_WITH_INVALIDATE = (1<<2), - IB_WC_IP_CSUM_OK = (1<<3), - IB_WC_WITH_SMAC = (1<<4), - IB_WC_WITH_VLAN = (1<<5), - IB_WC_WITH_NETWORK_HDR_TYPE = (1<<6), + IB_WC_GRH = IB_UVERBS_WC_GRH, + IB_WC_WITH_IMM = IB_UVERBS_WC_WITH_IMM, + IB_WC_WITH_INVALIDATE = IB_UVERBS_WC_WITH_INVALIDATE, + IB_WC_IP_CSUM_OK = IB_UVERBS_WC_IP_CSUM_OK, + IB_WC_WITH_SMAC = IB_UVERBS_WC_WITH_SMAC, + IB_WC_WITH_VLAN = IB_UVERBS_WC_WITH_VLAN, + IB_WC_WITH_NETWORK_HDR_TYPE = IB_UVERBS_WC_WITH_NETWORK_HDR_TYPE, }; struct ib_wc { diff --git a/include/uapi/rdma/ib_verbs.h b/include/uapi/rdma/ib_verbs.h index fd7a393..c40c00b 100644 --- a/include/uapi/rdma/ib_verbs.h +++ b/include/uapi/rdma/ib_verbs.h @@ -45,4 +45,14 @@ enum ib_uverbs_wc_opcode { IB_UVERBS_WC_RECV_END = (1 << 7) + 1, }; +enum ib_uverbs_wc_flags { + IB_UVERBS_WC_GRH = (1 << 0), + IB_UVERBS_WC_WITH_IMM = (1 << 1), + IB_UVERBS_WC_WITH_INVALIDATE = (1 << 2), + IB_UVERBS_WC_IP_CSUM_OK = (1 << 3), + IB_UVERBS_WC_WITH_SMAC = (1 << 4), + IB_UVERBS_WC_WITH_VLAN = (1 << 5), + IB_UVERBS_WC_WITH_NETWORK_HDR_TYPE = (1 << 6), +}; + #endif /* _UAPI_RDMA_IB_VERBS_H */