From patchwork Thu Dec 24 14:39:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 7918341 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 79435BEEE5 for ; Thu, 24 Dec 2015 14:44:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 98C1E20386 for ; Thu, 24 Dec 2015 14:44:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A07EF20035 for ; Thu, 24 Dec 2015 14:44:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754191AbbLXOoe (ORCPT ); Thu, 24 Dec 2015 09:44:34 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:37842 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754068AbbLXOod (ORCPT ); Thu, 24 Dec 2015 09:44:33 -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 1aC785-000136-5K; Thu, 24 Dec 2015 14:44:33 +0000 From: Christoph Hellwig To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH 2/6] IB/uapi: expose uverbs send WR flags Date: Thu, 24 Dec 2015 15:39:23 +0100 Message-Id: <1450967967-12479-3-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 send WR flags supported by uverbs as part of the uapi headers. It follows the same scheme as the WR opcodes. Signed-off-by: Christoph Hellwig Reviewed-by: Haggai Eran --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 6 +++--- include/rdma/ib_verbs.h | 14 ++++++-------- include/uapi/rdma/ib_verbs.h | 9 +++++++++ 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h index 2f82a08..6c264f0 100644 --- a/drivers/infiniband/hw/mlx5/mlx5_ib.h +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h @@ -118,9 +118,9 @@ struct mlx5_ib_pd { * enum ib_send_flags and enum ib_qp_type for low-level driver */ -#define MLX5_IB_SEND_UMR_UNREG IB_SEND_RESERVED_START -#define MLX5_IB_SEND_UMR_FAIL_IF_FREE (IB_SEND_RESERVED_START << 1) -#define MLX5_IB_SEND_UMR_UPDATE_MTT (IB_SEND_RESERVED_START << 2) +#define MLX5_IB_SEND_UMR_UNREG IB_SEND_END +#define MLX5_IB_SEND_UMR_FAIL_IF_FREE (IB_SEND_END << 1) +#define MLX5_IB_SEND_UMR_UPDATE_MTT (IB_SEND_END << 2) #define MLX5_IB_QPT_REG_UMR IB_QPT_RESERVED1 #define MLX5_IB_WR_UMR (IB_WR_END + 0) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 94509e0..5dccc6a 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1134,15 +1134,13 @@ enum ib_wr_opcode { }; enum ib_send_flags { - IB_SEND_FENCE = 1, - IB_SEND_SIGNALED = (1<<1), - IB_SEND_SOLICITED = (1<<2), - IB_SEND_INLINE = (1<<3), - IB_SEND_IP_CSUM = (1<<4), + IB_SEND_FENCE = IB_UVERBS_SEND_FENCE, + IB_SEND_SIGNALED = IB_UVERBS_SEND_SIGNALED, + IB_SEND_SOLICITED = IB_UVERBS_SEND_SOLICITED, + IB_SEND_INLINE = IB_UVERBS_SEND_INLINE, + IB_SEND_IP_CSUM = IB_UVERBS_SEND_IP_CSUM, - /* reserve bits 26-31 for low level drivers' internal use */ - IB_SEND_RESERVED_START = (1 << 26), - IB_SEND_RESERVED_END = (1 << 31), + IB_SEND_END = IB_UVERBS_SEND_END, }; struct ib_sge { diff --git a/include/uapi/rdma/ib_verbs.h b/include/uapi/rdma/ib_verbs.h index 330175e..3be3152 100644 --- a/include/uapi/rdma/ib_verbs.h +++ b/include/uapi/rdma/ib_verbs.h @@ -20,4 +20,13 @@ enum ib_uverbs_wr_opcode { IB_UVERBS_WR_END = 9, }; +enum ib_uverbs_send_flags { + IB_UVERBS_SEND_FENCE = (1 << 0), + IB_UVERBS_SEND_SIGNALED = (1 << 1), + IB_UVERBS_SEND_SOLICITED = (1 << 2), + IB_UVERBS_SEND_INLINE = (1 << 3), + IB_UVERBS_SEND_IP_CSUM = (1 << 4), + IB_UVERBS_SEND_END = (1 << 5), +}; + #endif /* _UAPI_RDMA_IB_VERBS_H */