Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp133162imm; Tue, 14 Aug 2018 15:35:24 -0700 (PDT) X-Google-Smtp-Source: AA+uWPz07OyMDyxJpWieimre0kwXGN/z27gXWj7SSgxf/nHVvZUni0m8tye3CPKCp1nv8ygwXG4Q X-Received: by 2002:a63:338e:: with SMTP id z136-v6mr22242793pgz.171.1534286123937; Tue, 14 Aug 2018 15:35:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534286123; cv=none; d=google.com; s=arc-20160816; b=LrQDcAkVnl9J9xgUa1jClR2VvYVWCsGCohB930glbEKSMFSO2jfXPjo4FcFZ9fgAOy 8v66NclW3+Wbv+JNevZ+TdiMzU4lfzKkkNIn3b0zqZek8AUtfLE+JTER/TTP1tjJ/hCK GIYt7JzqTShZhV7M0KWt0Ko1cp2J+MCXmwSJWwZ0OMjo1LQewuARpASX2jWDIVYBcHz4 +9nwKcS08U7Zwx4vM3TZgTgmiCRp4iodmRAyNrG2xziYi7znE4HrLxxjIVUr1lABqksW bbcon2aC87d7lJbg+IGRIziFDNCvy7dR+iJGI7g/+K8X/BFVP87jAJvSNAT1/QED6uAK rdPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:message-id:date:subject:cc:from :arc-authentication-results; bh=Krr6F290H+VMVltPlC1Zp5l2S+wcj6fFp7zT50VivSE=; b=Ch9AmJSveIrv7P32hVDyrs55cykV3U+G2qWVba5TpkRB61g0Czzq+alSP5Pdf4Bjc+ +bu2+Xn9OLIoex1i59dmQMPv1XXNpuUssFmtIyVzC8EK8KId9hhty3QCTggdp/FP2Q4D E+Kw00+pSVF6cZiLVewLP7vCmXJbJlReqQp2Eo/RtaGAv7f2kKEbVSsRhsd04Bx4MvsM YrwYYG7f+tdMkdXgzxHM1FyRwDUYhvU8QPLNa4K8ETGetqc6ot5vYsrnBLoBPntXZca2 ubBcbwFLwtgzrRICYJRi7iWJ0zCWm4b/Ck+JymG9Fm8LXKa6afdprDX1orCVpO5Rl6FS MLYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q14-v6si22167228pgm.512.2018.08.14.15.34.55; Tue, 14 Aug 2018 15:35:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730118AbeHOBWr (ORCPT + 99 others); Tue, 14 Aug 2018 21:22:47 -0400 Received: from mga04.intel.com ([192.55.52.120]:29445 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728103AbeHOBWr (ORCPT ); Tue, 14 Aug 2018 21:22:47 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2018 15:33:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,240,1531810800"; d="scan'208";a="254137267" Received: from sethhowe-desk.ch.intel.com ([143.182.136.105]) by fmsmga005.fm.intel.com with ESMTP; 14 Aug 2018 15:33:25 -0700 From: Seth Howell Cc: benjamin.walker@intel.com, Seth Howell , Doug Ledford , Jason Gunthorpe , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rdma: move the ib_wr_opcode enum to include/uapi Date: Tue, 14 Aug 2018 15:33:02 -0700 Message-Id: <20180814223303.83556-1-seth.howell@intel.com> X-Mailer: git-send-email 2.14.4 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org By making this enum accessible to the userspace API, we can avoid conflicts between the kernel-space ib_wr_opcode and the user-space ibv_wr_opcode enums. When using the rxe software driver interface between kernel and user space, the enum value IBV_WR_SEND_WITH_INV was being improperly translated to IB_WR_READ_WITH_INV causing the userspace application to fail. Signed-off-by: Seth Howell --- include/rdma/ib_verbs.h | 31 ------------------------------- include/uapi/rdma/ib_user_verbs.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 6c003995347a..02fe3960378d 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1295,37 +1295,6 @@ struct ib_qp_attr { u32 rate_limit; }; -enum ib_wr_opcode { - IB_WR_RDMA_WRITE, - IB_WR_RDMA_WRITE_WITH_IMM, - IB_WR_SEND, - IB_WR_SEND_WITH_IMM, - IB_WR_RDMA_READ, - IB_WR_ATOMIC_CMP_AND_SWP, - IB_WR_ATOMIC_FETCH_AND_ADD, - IB_WR_LSO, - IB_WR_SEND_WITH_INV, - IB_WR_RDMA_READ_WITH_INV, - IB_WR_LOCAL_INV, - IB_WR_REG_MR, - IB_WR_MASKED_ATOMIC_CMP_AND_SWP, - IB_WR_MASKED_ATOMIC_FETCH_AND_ADD, - IB_WR_REG_SIG_MR, - /* reserve values for low level drivers' internal use. - * These values will not be used at all in the ib core layer. - */ - IB_WR_RESERVED1 = 0xf0, - IB_WR_RESERVED2, - IB_WR_RESERVED3, - IB_WR_RESERVED4, - IB_WR_RESERVED5, - IB_WR_RESERVED6, - IB_WR_RESERVED7, - IB_WR_RESERVED8, - IB_WR_RESERVED9, - IB_WR_RESERVED10, -}; - enum ib_send_flags { IB_SEND_FENCE = 1, IB_SEND_SIGNALED = (1<<1), diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h index 4f9991de8e3a..7c1132f953d8 100644 --- a/include/uapi/rdma/ib_user_verbs.h +++ b/include/uapi/rdma/ib_user_verbs.h @@ -46,6 +46,37 @@ #define IB_USER_VERBS_ABI_VERSION 6 #define IB_USER_VERBS_CMD_THRESHOLD 50 +enum ib_wr_opcode { + IB_WR_RDMA_WRITE, + IB_WR_RDMA_WRITE_WITH_IMM, + IB_WR_SEND, + IB_WR_SEND_WITH_IMM, + IB_WR_RDMA_READ, + IB_WR_ATOMIC_CMP_AND_SWP, + IB_WR_ATOMIC_FETCH_AND_ADD, + IB_WR_LSO, + IB_WR_SEND_WITH_INV, + IB_WR_RDMA_READ_WITH_INV, + IB_WR_LOCAL_INV, + IB_WR_REG_MR, + IB_WR_MASKED_ATOMIC_CMP_AND_SWP, + IB_WR_MASKED_ATOMIC_FETCH_AND_ADD, + IB_WR_REG_SIG_MR, + /* reserve values for low level drivers' internal use. + * These values will not be used at all in the ib core layer. + */ + IB_WR_RESERVED1 = 0xf0, + IB_WR_RESERVED2, + IB_WR_RESERVED3, + IB_WR_RESERVED4, + IB_WR_RESERVED5, + IB_WR_RESERVED6, + IB_WR_RESERVED7, + IB_WR_RESERVED8, + IB_WR_RESERVED9, + IB_WR_RESERVED10, +}; + enum { IB_USER_VERBS_CMD_GET_CONTEXT, IB_USER_VERBS_CMD_QUERY_DEVICE, -- 2.14.4