From patchwork Sat Oct 15 06:37:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 13007610 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B61D1C43217 for ; Sat, 15 Oct 2022 07:00:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229512AbiJOHAg (ORCPT ); Sat, 15 Oct 2022 03:00:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229622AbiJOHAb (ORCPT ); Sat, 15 Oct 2022 03:00:31 -0400 Received: from esa10.fujitsucc.c3s2.iphmx.com (esa10.fujitsucc.c3s2.iphmx.com [68.232.159.247]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFF04326ED for ; Sat, 15 Oct 2022 00:00:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1665817228; x=1697353228; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=TC3brXOBKbvVhqzY2+L4amp7pcHMvTxFZ7JqdwIrQJ8=; b=MdZ4cIB0HDSH9nvE0wv36mJ2leQLeYNaJKe+L+e5CURNz7sOzb9Zs2YD i0Ua64qr1xYmQ4tLf6VCcguVeQL8Rpc4pEKrcwdPyiEVs2iWuWTsgPHjA n1VpQ+7h35IresoQrT3NyAUVdN/7sObg8EsHuA00qgijO/+rCYzWOy3Hz sbIMeNqHJHFpWggiD2y03QgxBrTxZxnDjZ90BWewBMHOEfgsIqsPx1Yic GPwVnkdDSaas4cHT0KE7x7nYoh8uRbX9Si8quXB6zXHzHiUM1P41oyH7G CLtBcm0KwRpaQdhTYG/66pKFXBgE5zUkb5zy7DLv5Fqi2nbsJfw+zEnDB g==; X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="67689748" X-IronPort-AV: E=Sophos;i="5.95,186,1661785200"; d="scan'208";a="67689748" Received: from mail-tycjpn01lp2170.outbound.protection.outlook.com (HELO JPN01-TYC-obe.outbound.protection.outlook.com) ([104.47.23.170]) by ob1.fujitsucc.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2022 15:37:09 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l+Ld/rGfBnVJgyXwbAjtlt6Npmd446BlJ6EKet7x6KJxz8k/I77nLAALfiKGrIslub5udGnlvRZ7Q+Y4zgkL9v+PvU6sxmLPuDuhB4AEqSE/3lUyi1Tx2rh+91NUYZ6H5TNonCt9XJJDdOb7rbOStqUYxD01Y5bv8Hw/GhWVk8PLyYpodymJd8UEGs9pgyImtxA8taqSqI+qZ654W2lzzHpAskeP8Q/U7rKUSYSo256+vJQqh+gPa+SXiZxIHhqOtFU8MU49AUqTICSS3fUoowsa0BqCPYUGEE6j+KGAIUFswz70YSZDsmTJ3yOymeJaoXQVqe8P/4qR2lrpt5Sy+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TC3brXOBKbvVhqzY2+L4amp7pcHMvTxFZ7JqdwIrQJ8=; b=m3PWi492iMV+J2c18AxzMvFUmfJeDCoXodlK6lSRcml1vyiAmedgnolcNiK8947n3PKnOnsG2o0cLdg1VD4DwU0IC5ujPSXvOE6EoIu8qRFfjny/YB/qjrEHnFj2+91w6J1gAvpYwlYxAywmVz3GNKPTW3fC+I53N1JQ7yY780uxJaBvtBnXfAFhVvPJ+iSpAqmjG+bj/wEnaglVMUkBu2HUIu0FJTii7a1PZOYbzF6y6cWR+ELaEa3gHLwjPDoprVX1qudFxSJ1t6Z9jFY+H7Tg6qQHHM5XNk9rTZZUY75HgC4IeQcyXWpmHWSSg5Sk2nNIRGFiewaNPhsFuoj9Mw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fujitsu.com; dmarc=pass action=none header.from=fujitsu.com; dkim=pass header.d=fujitsu.com; arc=none Received: from OS3PR01MB9499.jpnprd01.prod.outlook.com (2603:1096:604:1c8::5) by OSZPR01MB8661.jpnprd01.prod.outlook.com (2603:1096:604:185::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Sat, 15 Oct 2022 06:37:05 +0000 Received: from OS3PR01MB9499.jpnprd01.prod.outlook.com ([fe80::5989:c90d:abf4:e100]) by OS3PR01MB9499.jpnprd01.prod.outlook.com ([fe80::5989:c90d:abf4:e100%6]) with mapi id 15.20.5723.029; Sat, 15 Oct 2022 06:37:05 +0000 From: "yangx.jy@fujitsu.com" To: "linux-rdma@vger.kernel.org" , "jgg@nvidia.com" , "rpearsonhpe@gmail.com" CC: "leon@kernel.org" , "lizhijian@fujitsu.com" , "y-goto@fujitsu.com" , "zyjzyj2000@gmail.com" , "yangx.jy@fujitsu.com" Subject: [PATCH v6 1/8] RDMA: Extend RDMA user ABI to support atomic write Thread-Topic: [PATCH v6 1/8] RDMA: Extend RDMA user ABI to support atomic write Thread-Index: AQHY4GCKxTsFRb7Tc06aZ2LJogXQMw== Date: Sat, 15 Oct 2022 06:37:04 +0000 Message-ID: <20221015063648.52285-2-yangx.jy@fujitsu.com> References: <20221015063648.52285-1-yangx.jy@fujitsu.com> In-Reply-To: <20221015063648.52285-1-yangx.jy@fujitsu.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.34.1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=fujitsu.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: OS3PR01MB9499:EE_|OSZPR01MB8661:EE_ x-ms-office365-filtering-correlation-id: d5d7f7a1-e8de-40df-16af-08daae77ace2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fnP65/7i5BeRgHkcCxENv9kVVVKLacMa8/0k7KvUj8RfmhRHLJAo2rl+xo30Bv0jQ3V27U0oCE8t4XN92UD0Dnf7aLSkfxOBvKXdi8EyNH9axu/Wrjxk4eBtaspmq9Wqp21ILXLbOhkajwPsw3L4Xsw0k+5C3Y43sEUFVrev968xYF/R3xFhx4wff5mStsO0vwLYEQD9XU+CnET2V4SfpUcwHMr8SLr4mM7CvtggPqMySJ9ew2Bx67fCKlIWUuNCS8xvQ53Okwfakm0DY+5qs1jFetRT7L1m0k9DFr1Cls8CUZP3o8NUCbot1aYQiG01pVEM8+V/6iIie75WtRmm8UV9zYFEA7TRJDJ5lp9BA/fKs4yofD9fdqOgD3kKUZmPiEz61Hm4AQAUw5ikiI8bZK7FjbgbZxfVTbQAIx08j2PIPf8ydZixfa4cp8PdeqJp4sUN1+/sfqLMZBzAPkXDfMYNg8r212PRH1iVqRmZIESrJIlCGXJDbOPbYdsTMWA75oRK6fp08aQXCmnwvrUGn5YS/8V6oGvZG1Mmu74cPgKnc9DUbLDLjaVvO3l3NglC6SupgQkWhfb6xlG5U6xyoFDlAxuro8owqdoKm1rx5PYN+0fDydxh6B1EF9BwscQeHpGUq20pqOEiqlpQB5xB75SPX0OwBUZ6TqnP+gMJm7sGz6cYH3gOl7qxyDyQzGe0BJ6lIjre73DENK3hC6c6dx1K5mDuMVW1J0M8VppRUNY/rWEBKCBpNg3RX2tPNBw+9HRVTPHljO/JdV83IENHRlKKKLBHpnVjU4MNLWLA82c= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB9499.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(136003)(346002)(376002)(366004)(396003)(451199015)(1590799012)(6486002)(85182001)(316002)(86362001)(38100700002)(36756003)(5660300002)(110136005)(26005)(6512007)(54906003)(478600001)(122000001)(83380400001)(8936002)(82960400001)(91956017)(1580799009)(66946007)(76116006)(2616005)(107886003)(66556008)(66476007)(38070700005)(41300700001)(71200400001)(6506007)(66446008)(64756008)(8676002)(2906002)(4326008)(1076003)(186003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?eucgb2312_cn?b?eXdBVDVaa0o3NFJxRzh3ZGFS?= =?eucgb2312_cn?b?Mjd1S2hkdHRLL2RnTklPZEVrLzgxVGI0bEhPZTdjK0ZhZUduVi9nNm9JblRMKzdQ?= =?eucgb2312_cn?b?MU9HdGVjM2d3NjE2QlZCTUYxWGhlaUkvSkVFb2JlN1ZwZzAvQmlYNVhnWVpQWjN2?= =?eucgb2312_cn?b?ZzVXdXdYVFdpV2d1aXkydzZ5c09Ealh2K0tMTHFWazdiaWFreTRNbTVWQS9BWGFQ?= =?eucgb2312_cn?b?VlhWRG9yR0s1T0Q5cnB2VTdUMTVNNkxzVERRbXdscjhSbmt6dXd6TmpBbklIcVFJ?= =?eucgb2312_cn?b?RHBiNElzVE05a2FBRThoZ0kyb0VVSGFKUmNkeW5mNEdpWmQrekh1cCtocDJzb0Ra?= =?eucgb2312_cn?b?cGd4KzNnTTZlTDdzdkl2VVFwOU9FdFYweUJHWjlXTERCTkNVNGFYVmZ0MmZ3SXUz?= =?eucgb2312_cn?b?aUpyUUFUZ0VFT2F5Z0NDcjVKNTZXSHl6OEpDUTBzQzA5TFRTR0hSTTRvUkswelQr?= =?eucgb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c9PQ==?= MIME-Version: 1.0 X-OriginatorOrg: fujitsu.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB9499.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d5d7f7a1-e8de-40df-16af-08daae77ace2 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2022 06:37:04.5249 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a19f121d-81e1-4858-a9d8-736e267fd4c7 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xZigelg/3cMemEBzKhgCN84QBMtKNYLAnFfJ1IuuGorrRENo85xalXFtndwTKXNC/NoBFGLm3CaKUZ05i2rfsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB8661 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 1) Define new atomic write request/completion in userspace. 2) Define new atomic write capability in userspace. Signed-off-by: Xiao Yang --- include/uapi/rdma/ib_user_verbs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h index 43672cb1fd57..237814815544 100644 --- a/include/uapi/rdma/ib_user_verbs.h +++ b/include/uapi/rdma/ib_user_verbs.h @@ -466,6 +466,7 @@ enum ib_uverbs_wc_opcode { IB_UVERBS_WC_BIND_MW = 5, IB_UVERBS_WC_LOCAL_INV = 6, IB_UVERBS_WC_TSO = 7, + IB_UVERBS_WC_ATOMIC_WRITE = 9, }; struct ib_uverbs_wc { @@ -784,6 +785,7 @@ enum ib_uverbs_wr_opcode { IB_UVERBS_WR_RDMA_READ_WITH_INV = 11, IB_UVERBS_WR_MASKED_ATOMIC_CMP_AND_SWP = 12, IB_UVERBS_WR_MASKED_ATOMIC_FETCH_AND_ADD = 13, + IB_UVERBS_WR_ATOMIC_WRITE = 15, /* Review enum ib_wr_opcode before modifying this */ }; @@ -1331,6 +1333,8 @@ enum ib_uverbs_device_cap_flags { /* Deprecated. Please use IB_UVERBS_RAW_PACKET_CAP_SCATTER_FCS. */ IB_UVERBS_DEVICE_RAW_SCATTER_FCS = 1ULL << 34, IB_UVERBS_DEVICE_PCI_WRITE_END_PADDING = 1ULL << 36, + /* Atomic write attributes */ + IB_UVERBS_DEVICE_ATOMIC_WRITE = 1ULL << 40, }; enum ib_uverbs_raw_packet_caps {