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 { 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: 13007611 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 07174C43219 for ; Sat, 15 Oct 2022 07:00:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229577AbiJOHAh (ORCPT ); Sat, 15 Oct 2022 03:00:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbiJOHAb (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 37D4832B82 for ; Sat, 15 Oct 2022 00:00:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1665817229; x=1697353229; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nvZLWYauKX1IRWwLxOrcarGC3WnfU7D+NGxtIx/y0Wo=; b=dPrOLiHQDB7b/oKb/qPWVCHQp/MBT69HNQLOROHDAGude0IV0SVYykw+ M/6UPFjC4/nfFOkb+4NgugAieE4xfUC3oBOGfDIdYM1f1pYHqLQnTGAa1 t91kvcNxRCPRXis4nv3S3xYolCnZpXAGlb59mt8pFQUhmuOhYqi0x+rMh MTftkeKRvmICn68oBq7XIXGrrdAZf0VuTfsoIQ5v/gLn/iyKzD+w8Pvrb A3f8vsS+TmjvX5m1EZeai7lu1UGpu2gnok51iJBib6q3h+J9n+b0dB28p PADv7uySxEnr840Qtcja4X6nvw3cRqi421Qw5UDbqbv3WQob8gP3MGF4P A==; X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="67689750" X-IronPort-AV: E=Sophos;i="5.95,186,1661785200"; d="scan'208";a="67689750" 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:11 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jm92INuT8A+16bArBZFCMASAAVQu3lBjimAHS8AmoKCuOW6WH1n2GY5Mu1ecJj/uo6GKgn5+j0V+pfvoYLHCnrcHs7G38ahfjBveM8b4EMyk3JeuTckmdjaYjdApjsrKHwaRGYF3v1q+hLKo8vnrpEzxAQMYDWzEKjo3BmDm0Q7vD7mVRYsl1tVw3FF20fcX6xx3bRPPKqg16HIHp0TQgdBxgnzaT81VEGhemNWnl0YvYSFuwcGCy991s6L/x7GttFiRgopGHwaIMllOh0s2nuyWIV1MY4iV3kMOcPx+XqfM8gdlUu5bx0DMpcTwNB13tPjcDjwqIWmPKvT++HfigQ== 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=nvZLWYauKX1IRWwLxOrcarGC3WnfU7D+NGxtIx/y0Wo=; b=UP5mHcgZrhO0y+O2dqXSvf+Vgiai/tqLPhOVytLy/qEqDWXjuNml866iCFbIib91N53QK1XaXSevnPn84m/NNpoqQ1/VyIwHMo7Eyqq9HyI8puXPVYJiOLU6mSXnu9i2ZyiaOsigJ2futsWLITNoge0TlmiZFU1CisA2TDmqkeyK1NH1slgPbdnK7MNpAK7AGKM++XOZ/Q7y6i9RRotOi9N1uipBpQh1+/+zEJHLWEFaUOecs+u5u0nnyWwpmsPMLe9ST5RS+bTz0glz8QdWqiMPsBDeB3Z0Ghh2qW4QzHEd6Og3X+ihtNlX2RGpRLlfPqTadnBdK4K60WBwQ+yLZg== 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 2/8] RDMA: Extend RDMA kernel ABI to support atomic write Thread-Topic: [PATCH v6 2/8] RDMA: Extend RDMA kernel ABI to support atomic write Thread-Index: AQHY4GCK8z/n8XKDxECJBUE9Y21x9g== Date: Sat, 15 Oct 2022 06:37:04 +0000 Message-ID: <20221015063648.52285-3-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: e7bf29b2-5fb4-453e-21ab-08daae77ad52 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CzS75lsotChH8azRCEJQCp4X5kZ0VoZ0oZer8DbeHcQxyH2opxv0QyDCfrmjiRknnvQR93ozMY/VEAygMX4nxoofotAcb6UNI0R2SgjcCQwcfMoYfS0947uJ9gzAsreqf+MS5TVrR4zt6RJl+PJgy7YnEmpSpPKjdqaYNVWQV55UhdYHfLEUmGcWaC2MgFjFKEb+iHZbSmZ+AwuCW9nK9FybCm0V15/egyWW5m6S4c8VIP9sdQKFvVTqUkevee44yRl6js9oN9PQ5Z1y1eyej+VkbsCrXoNMIxOSHHaHnjeql/wz/u3s9GdQ92Q+GZu2ZMdrmPHX8XuJ3QYhK2rWt4kX5ll4niJhstzzzBlj1Klr1Vhht9lV9z+gD40Qjt3icANebEfXmRL7/qp59op/P42gEppqyhIcaEjkCoYoue7r6oEWQI5e7Ng+n51YA9Yhd11uHqS9EhEvTsUQR8lomdyZbuf4gbxX8aW1s0kEVQlH0xuFCLMSrMrF67etVa+3LNOX4gEfVPTmvezIUwYvfMgegIJV0EvN7olkrxG/dVfRrHIx496LtzCzCBNRwIDHX/lPdSHDRyeloI4ItayH1F9s1KaTbxBfZTsSVVskfhcsp/PSC8bFRG2cpYTfl3WBxsAw8IYQ4/X2N5BxnpWOCebQ2hNz2s+WPqt1Z385GUliEdL3Z5fQ/CZqRFZLlwMhGteog3pLAARyId3zql/TM/Jhr6GKzsVTUDaqrjmVeRyzQ37MV+cSaT1K3+b4w0WVz6IDUVCM5xe3NV3xQ24cqfA+pDtGXSMSX4C3TrzuKBA= 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?TmZNeEp5cVpWcUxKOTN6azI0?= =?eucgb2312_cn?b?U3pBNXZLRk90T0gxYWNneG9zWHRzZExpRXg2Q1cyRjNzbEJidXhBRHZqTkxSa0lq?= =?eucgb2312_cn?b?OHlVaHNxUGd0L2libGVXVk5weUJxY2YyQUVGbFZKUDlGbHlIZ2ZLMit2QVFOUTN6?= =?eucgb2312_cn?b?cWRJanBmdHZEcjdhanpXTk5XS3UvRTJHOGVwZ2lBQXFPbXE2NDczWTVqaE5xUUh5?= =?eucgb2312_cn?b?Q0ZTc05DWFc3Ym14dWtab1kzeTE4cnhWSnZMWmYxdTd2VzluaHgvREtiZ0dnT3Mr?= =?eucgb2312_cn?b?ZSs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dDZYNStPaFo2VkluUzlMSXVSemtZZmRRK0ptMnFyK1BTcjMzREg4?= =?eucgb2312_cn?b?Y3AweWh4ajlSalB0RWpJZ2tsRWpYUDNxdzA4SEdxRkhFR054ZGdMY0o4TlNlVE9H?= =?eucgb2312_cn?b?S2Z3djg5S2JEMnVtbDVzY3RtRUlJQkVMVHJCVmhIYnh1Sjk4ZUtUQm9KWkVSYXRy?= =?eucgb2312_cn?b?L055M0cvaFRMSkI0NmJQbEcxa1E9PQ==?= 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: e7bf29b2-5fb4-453e-21ab-08daae77ad52 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2022 06:37:04.9936 (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: P4cPhW9oAarIAUn07ulQwW5Rar04LLlnLWCkS1CYGFqAjMWOdijzO/TCD9X7O1Ky/gwW9WzTAk6DE5N220t4JA== 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 kernel. 2) Define new atomic write capability in kernel. 3) Define new atomic write opcode for RC service in packet. Signed-off-by: Xiao Yang --- include/rdma/ib_pack.h | 2 ++ include/rdma/ib_verbs.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/rdma/ib_pack.h b/include/rdma/ib_pack.h index a9162f25beaf..f932d164af63 100644 --- a/include/rdma/ib_pack.h +++ b/include/rdma/ib_pack.h @@ -84,6 +84,7 @@ enum { /* opcode 0x15 is reserved */ IB_OPCODE_SEND_LAST_WITH_INVALIDATE = 0x16, IB_OPCODE_SEND_ONLY_WITH_INVALIDATE = 0x17, + IB_OPCODE_ATOMIC_WRITE = 0x1D, /* real constants follow -- see comment about above IB_OPCODE() macro for more details */ @@ -112,6 +113,7 @@ enum { IB_OPCODE(RC, FETCH_ADD), IB_OPCODE(RC, SEND_LAST_WITH_INVALIDATE), IB_OPCODE(RC, SEND_ONLY_WITH_INVALIDATE), + IB_OPCODE(RC, ATOMIC_WRITE), /* UC */ IB_OPCODE(UC, SEND_FIRST), diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 975d6e9efbcb..19bed1fb8e55 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -270,6 +270,7 @@ enum ib_device_cap_flags { /* The device supports padding incoming writes to cacheline. */ IB_DEVICE_PCI_WRITE_END_PADDING = IB_UVERBS_DEVICE_PCI_WRITE_END_PADDING, + IB_DEVICE_ATOMIC_WRITE = IB_UVERBS_DEVICE_ATOMIC_WRITE, }; enum ib_kernel_cap_flags { @@ -985,6 +986,7 @@ enum ib_wc_opcode { IB_WC_REG_MR, IB_WC_MASKED_COMP_SWAP, IB_WC_MASKED_FETCH_ADD, + IB_WC_ATOMIC_WRITE = IB_UVERBS_WC_ATOMIC_WRITE, /* * Set value of IB_WC_RECV so consumers can test if a completion is a * receive by testing (opcode & IB_WC_RECV). @@ -1325,6 +1327,7 @@ enum ib_wr_opcode { IB_UVERBS_WR_MASKED_ATOMIC_CMP_AND_SWP, IB_WR_MASKED_ATOMIC_FETCH_AND_ADD = IB_UVERBS_WR_MASKED_ATOMIC_FETCH_AND_ADD, + IB_WR_ATOMIC_WRITE = IB_UVERBS_WR_ATOMIC_WRITE, /* These are kernel only and can not be issued by userspace */ IB_WR_REG_MR = 0x20, From patchwork Sat Oct 15 06:37:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 13007602 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 DA65CC433FE for ; Sat, 15 Oct 2022 06:38:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229470AbiJOGiX (ORCPT ); Sat, 15 Oct 2022 02:38:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbiJOGiW (ORCPT ); Sat, 15 Oct 2022 02:38:22 -0400 X-Greylist: delayed 70 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 14 Oct 2022 23:38:20 PDT Received: from esa5.fujitsucc.c3s2.iphmx.com (esa5.fujitsucc.c3s2.iphmx.com [68.232.159.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF6D763857 for ; Fri, 14 Oct 2022 23:38:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1665815900; x=1697351900; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=KeXePYeIaul2A5wGX9HpugWWfq3Xbbo6VKhMq4yVs7s=; b=idLWQ8Ov1DDC0AnwVStJK12hSpBDGwDxlmabDLLY3J5w/ZjYaT2Ep0Kj Chs79BEW6On6pERbPdZeGbfjo/AYc9qDwlxg4Q+W1ut5cSZHwdzmlpj0j 5REtd7HE6K4QCVxHyjNcECrKgAqaFlQkyrJdUqxOYI478Fc6e1RR7knnS vjBqn2pKePDqcm4YAWXRiW+5rLjP+DnOlWTyg5frcsxWH36TtFvrOWrMS DSOBhTOfRwcJqZuhHf3O5L6fKZTXJ9WaPSdabaSNsPPExQEVe7tpuio4n OxWhOBLe7u1eQoTEiNFr7JGrPzbUbNShrfVhYshA+3+y+kq3RlpQS2Eht w==; X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="67758725" X-IronPort-AV: E=Sophos;i="5.95,186,1661785200"; d="scan'208";a="67758725" Received: from mail-tycjpn01lp2172.outbound.protection.outlook.com (HELO JPN01-TYC-obe.outbound.protection.outlook.com) ([104.47.23.172]) by ob1.fujitsucc.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2022 15:37:13 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KIdchzXorGNqencFxsrmWpCD2dQpsYK3BzlVbsiuL2t/S/4BnN/bjrUd8omtVPYUTe267hEPM2WKc5PrdfHiBsTD1nrdFeL6BFlUaxl0uLISJXyncHElkLsGykntUDbmYeraHPAzdw3AhxW90uveLwA/pHK/ALG+X+YFLTC4Pz65f2Ec4quxpfmM0JemNbgKI8uOAwzxREnDSks4PKAKqHRzw0QRAMwKy0uR2sISCVaeRmxuuqL/EoPgugTZXSOwdkmAT3ZTl1cZttxNn3Fai6yUHLGwdz92LyeljHoER5wrvsxUJeLu6ToiUuL3RM+cKArSAfFBo3NWJWHssFEnOA== 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=KeXePYeIaul2A5wGX9HpugWWfq3Xbbo6VKhMq4yVs7s=; b=cXUXR3qenFdyuwCaMe+G70m2IeBsrLuSBThzO6aQ4FjYt2mnKVrjaajN0mqi7ZMIOUTy5GnMyl3hOsWpNAkL//8RWy6yKPr7EYikk7x+SdY1P8Jx9CL+W+QA/jNTNld7bspliTL+DioJXLfO12QAUYOYNF6z68t4sVaD3YYB1UyxdNgl2Twh2CxoIFnq9CUK1YUOsSA7BfR/QwZEp9hA+ZPgTLRDSmiSwoSUw0u+wzkeK67M8J2NG6oq+9r5W2gEsjgOP/tO/vgJCWIZ4UOPd1siHWrtzIBgSdafMaOhMeiZVNA6oqu/JHlkXhBjSKy7uE3dWCoQS59tIQyrYFdZzw== 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:06 +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:06 +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 3/8] RDMA/rxe: Extend rxe user ABI to support atomic write Thread-Topic: [PATCH v6 3/8] RDMA/rxe: Extend rxe user ABI to support atomic write Thread-Index: AQHY4GCKq0h7+6p+dkuko51BHClBmw== Date: Sat, 15 Oct 2022 06:37:05 +0000 Message-ID: <20221015063648.52285-4-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: b478c291-0667-4323-4579-08daae77ad78 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ebF6QMm5uKjIXubPDv7CdtqJA1UFHr+sI+NbekrwQLL7Yy+BYSG0iZonjNUplxBX/73qhKJRVnaPGmmsxPwNh3WofZbkRhDAAzDh2Ah9+s3uUIVGjQ2XAOE4a0HpXvRN7kLRgDcwo+T1c/J9OpBDycJRGtf5LVQpeE5IeLoAY2uZ9nZjA92T8Bc8obi/ZY2zlSJpXY3wqUJFghiGt8UUdvNrrWIwX6QiDCT/JBSoEGltEHt5oiyYmXJ+eSjV3+qHRqPPqS+mWZmtLMnAFtmwTIQtna5oLLIKdhMA8G2oXfiJf0d7oSO+LVTOwxNbj4oUPx3xa6ro+9Sn7U9AfjyV4F6VGhu3xCR1FpvabXMdWaOXNmgFz+P9dNn2UDTrN97HCZpYa/Nzfks7Db10S5c72A9L2WkIi94+Q0VOTyG62eqJgwiC7WlCfa7nTWtLS65P2hbZkqIBuyKLAuzXQIi6mtXvuUDjanHnk4IId/9VqzLIG+Y9Inl7YS81saW1VmuvMRCaZee/oGp874/q60K9/nmPLiu2p3UOsHg2SoT58Dl4Lq/5XODDTAdGD/0tiBTx034Qzhi3rzsjvqhag7YZaVzlmZy7iSHcFG1bBIbu2nVqKZjuY8VWszKDQnw+Re9vnSNqqX74/nkNp8WmtxKWmGTzZ5lN7cyu+K82B5VS/ChrkC6HkGi0rcfYd+TWcYHU5eVeCRT0Ksm6wFGdc1JacOvwhZ+CpnoN7puTvIFHElaDhJXw2x8b/E2M8MUTgzcXZCCVZpoJlt9+KvNksA5Q0yAAhPu0eNQ4J9xjIysZd2E= 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)(8936002)(4744005)(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?dUFwRTcyNW9kam1ybitTTHJZ?= =?eucgb2312_cn?b?bzJZMzlGVVJMMlVLL2U1RTRsd2NGeXEvd3pJYVRKdlFIb251djNmamlGZ0NDUGNk?= =?eucgb2312_cn?b?WmhoRVRXTW5UendMRkM1SjBWajk2NW4zZmxYOTRBdmFKN0xSTEZyNWdCQm1pSTQv?= =?eucgb2312_cn?b?Yy9rVlVXVFM4cFZaNXF5T0txVkJVQlBrKzgzQzlGYWtHK2E5aGFHK28rZkdxR2dJ?= =?eucgb2312_cn?b?cDdCQjNtbmE0bURzeWkveW5GZzdWcDdSU01DeWZHUFpvcDh3dlJPazVHTDRDVldI?= =?eucgb2312_cn?b?TU1QVXYyZE9hS281QS92UEl6c2UwZWR0TWFmTENOd2pQM3BScVZVU3NwckY0MUR5?= =?eucgb2312_cn?b?K1BPWVhRdnpJbVg3Z2RPRU5lL1l2THJ3NG53MmZ3T21RNlIybktVUC9UbUZ5eGlO?= =?eucgb2312_cn?b?Mi9PeG4wSU16aE1EWXBxZGZ0Rmh1S0Z5RGRBQVNZelAwZXV4OTNibVdZNTVscjFR?= =?eucgb2312_cn?b?ckxsc3prTEdRME0wYkZCMUxUeGIreUVUOFRyeXJWK284dEEwYkZjV2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riginatorOrg: 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: b478c291-0667-4323-4579-08daae77ad78 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2022 06:37:05.8216 (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: WocYyh7qcVVRSsWSJ3IQM1Z092dLuzlcurilQuNpHgjfeDZ7zBTqDDG1H9W2ePDybc3WHPlIsVI1mY9M89JeTg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB8661 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Define an atomic_wr array to store 8-byte value. Signed-off-by: Xiao Yang --- include/uapi/rdma/rdma_user_rxe.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/rdma/rdma_user_rxe.h b/include/uapi/rdma/rdma_user_rxe.h index 73f679dfd2df..d20d1ecf046f 100644 --- a/include/uapi/rdma/rdma_user_rxe.h +++ b/include/uapi/rdma/rdma_user_rxe.h @@ -146,6 +146,7 @@ struct rxe_dma_info { __u32 reserved; union { __DECLARE_FLEX_ARRAY(__u8, inline_data); + __DECLARE_FLEX_ARRAY(__u8, atomic_wr); __DECLARE_FLEX_ARRAY(struct rxe_sge, sge); }; }; From patchwork Sat Oct 15 06:37:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 13007612 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 11B4BC4332F for ; Sat, 15 Oct 2022 07:00:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229583AbiJOHAi (ORCPT ); Sat, 15 Oct 2022 03:00:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbiJOHAc (ORCPT ); Sat, 15 Oct 2022 03:00:32 -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 5E1503385D for ; Sat, 15 Oct 2022 00:00:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1665817230; x=1697353230; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=rpfd3dATwf8wwzOdanxEXgJttSLO3f1VP+pMLCZ/XFg=; b=s2AnHKE3MRGGpkrCCcAsYuCuq+hRZdbub1Lh/XCQSZvVN22vtt3WWgF2 6D4b36M0Q0G20RjeWdR31ufiF4WDhKnTkebDrQCwAuA4hWpc1jD3tPMFL SpBS739mpcoWRqSCHLAX8sCYgcu34nq1w0gSxWmjCii7BR/kMvOdovCq+ ECGyYtSD4gT7J4aQgJAFAgmFpvwQ/3iZ/t1WYmlzPUGfhOdBvRvZY3uO9 kdUEYSUxaeqN/9FCFv8xSRJsaHXkfzCRSHy92SC9RD459Nd5YVaoFJTMZ e6Dw2sZhElimxhfKonEe2eA+0gCB+NATV8DBh/O9iIpEKo0VARcVmw04B g==; X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="67689751" X-IronPort-AV: E=Sophos;i="5.95,186,1661785200"; d="scan'208";a="67689751" 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:13 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HYkdpH2NcqMIoOEJe7Dms/cxFBSCIM+DffUZcFbzlU6U5fToBBy02ZjY5vq2dNDm3ylez4An4+PyQsZhqHKPorUQogV7Tbx+028AHzHYPhRASDjWLF1LStYhltc0Le7020To5OBEx2x3lTZ2MFoqX+f6hueXsaa/9siTZskJ15ZarfNuv6h99gFmEu0jUNI0vv1ZolF5br3TT6WjCuANAQ+ChSYQGIUdKqvkPZ7nsttUgGB8xBuc/Z32oA3rngQd1zruIpemsn4oJ+6fibo8uvnWJMqFXnvVVIaKByLi4fK7WrHrNJnrjyKFrafRwQ/rMwhxmVzFo+aMXONwkCWprg== 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=rpfd3dATwf8wwzOdanxEXgJttSLO3f1VP+pMLCZ/XFg=; b=CdptjgNzlzdDiqTUFXnRGKudTnJyQenOfGNjPxKBskdloiqWF3CIWIJJPYtCvW3ztiroxTGYfwIo+UQZOOPllurNZEDPDW8Wjr2Iv7E+CO7vBrzFCNyd6v82yL5uo3uym1XKYCnFep8nDNauD8iwoKOc4ztkDGyGbT1III7qevqlugPJlSftnR6z1o1sAQRKBOY65tK4DXTNcgnlH6BGMiKAglFgzgziCh0vPhgeQtXkWIuWEKJdzI8hEyUq7xXbr/NcKnOLyJZKn1sP70cuhxmkZljrvl1iVJxCbjVtOTamQzaBil4ijigaZ7+PgCwFymR1oSGqWzDyHIwluiw+MA== 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:06 +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:06 +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 4/8] RDMA/rxe: Extend rxe packet format to support atomic write Thread-Topic: [PATCH v6 4/8] RDMA/rxe: Extend rxe packet format to support atomic write Thread-Index: AQHY4GCLKhDKVKdpKUKvKn+dDxj/2g== Date: Sat, 15 Oct 2022 06:37:06 +0000 Message-ID: <20221015063648.52285-5-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: 3f54ab66-5588-469b-d473-08daae77adde x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Zy92E97ugZ933fJWHou8V/SVciG4mQW+T6bqp7m0fv0NJtxxIB5A5XfnBOVSQ+Qk2iuRyh4HSLgh6EpFHAH5pP+/JAigkXexW6xvt4cFN56tEc37rJAD+F6FKhUjdU6cbAIgJbvVfD6pOQbzhR5fMjVmS2CuaeXvOpxIM19QJGJazEGTGuO8ozL7CB1MLMR3aVO8DgClTFQ2hFO453YFLvTa057bx6QMByXm276e82/BtWMH+4+DcNTPkRNG+4xHlj8VRxNwTYXjJgXyDo+A08IMybkTtBfvWtrHRrgM/71sQjNq6cMwXhTx6AivXzCpTV5HEK3aueXwzLix5TPpMrnrm040j+3qlXN8yz0Ro8vuu/PriBPXKaQyYX7rgWacEfuUkTUgF7Z8XRL6h7xV0tQliacDh/vX8hrH7l94k3A5FBsZWD5mocqn11WiNE/au/PU7rz1T/89uzsy5QUKABkShinFFuWl5KQ1NpMoPiT2012Ari3Cmpr6MXGKYpgFW44+V4TKvGGLCDyurttq8jUb93pBnHbK4MAlOJQ6kK/w0B9W+7GL2MZ0K1uJmDvi0wjTQtMb1h8OiCbSC7Y4EwflYz9J1En4bcnFBj8YP9jYob0CKzkT4yjKNNEm1qukaSQOSGYu6NFTvEdHT11ugsquqBOnQMzchkIgwNshcwzIdQI4y0sZ9K4VMK5mLdncCwIjppdiEMSoiF5UUxk1F+XXmlOQeSRJ/IBrr7Th40VIKlI1RhJo1KueKT+Eq11GovC88Y03xJG8s6c4yk6ZvKCrVqhsxoXbuzbujwn1hAc= 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)(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?UHJFYk5mOFFmY014KzJQOXh3?= =?eucgb2312_cn?b?YXhZTE9yRTZ5RHlHWWJvN25JanJUaVNkNDIrOFdaNHdQU3dBZ2JCdkNoZzF2NzQv?= =?eucgb2312_cn?b?OFlZU1ZMcmp3QjZ0bGpBd29PQ2lES1VFUlhNTStOWVlvMWRiZ1dEZFIvT3c2Zm1p?= =?eucgb2312_cn?b?QisxbU9hMFQ4amU2b1NFaDJQcDBISnBoK0VXYVR1OFZ3NlpteW1KNWh6Tmd1anJU?= =?eucgb2312_cn?b?YnJjNzFoa3BxUFhjaUpVaWtMVjFDeTI1czlsWkMzbnA5QjhKVlk5bXBsNm9EQlJT?= =?eucgb2312_cn?b?L0xiNExJUEwvMFlLUEhCMkVMeDNTMitvU3JjRmFpN0UxR2hZTGJ2blFFK20zRHhG?= =?eucgb2312_cn?b?OHo0bG9UVVZOWVMzQlJHWWFKd0dWWXJ3NmdVaEN0VnVhWHBIMlUxQWVJNHFRUGNz?= =?eucgb2312_cn?b?SURvSE5XUitpaE0vR2hRYlFINVBwSysvTmtXbG5raFg1ZS9zTVNEMnNmMHgxeEV6?= =?eucgb2312_cn?b?N0NzR1VZc3diV3F6TndBbFd4S29HNW5pU2F2VGYyS2h3TTlsQzIrNkpCMUJUbmph?= =?eucgb2312_cn?b?UUdaL3Z1dStKUTJDNGtWdmVheFRHY0NubExlSGkvTWRxdUl1a1hMSTRFMHZRQ01H?= =?eucgb2312_cn?b?VzM5RTI3NW44ZmRLUE1LUVZsME1xNGI2L0FOQ1ZCM0ZNTmpUUTkrVWZ1Yk5aTWVr?= =?eucgb2312_cn?b?eDZoc3BuTUJLR3RMcy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ubHJNSHFkTStVUXVFYkJPNGlaNWhvLytDZFpHRXl3?= =?eucgb2312_cn?b?bmxwd2hYVkxxcHQ2cEFpWUcxNVppS1dVb0pRY3JqSmRxZnp0UEl0Q3p5SGNqZWFN?= =?eucgb2312_cn?b?cDhyMmpLQmxHekF0bzJEOUtzT29HMklTMVBMd3FWK2dZZWsvZDdtaWhGQW4xK2pD?= =?eucgb2312_cn?b?VXBTRkp2T295NDhzVnZIRzZxQUJHS2swRzVBT01CVUpXZWQ4dUtTMGROTGtPMGl4?= =?eucgb2312_cn?b?WExYZXNuUW5mYXhrek0vS2I4enlVaXVNczcyYW9tc0ViNUkwRzdzaGZEYUNXZks3?= =?eucgb2312_cn?b?R3QyUkhjQ2JzOUZUdERTMTh1azJTZkR3Z21ZUzlGeHhuTittamowanRKSzJvSmtW?= =?eucgb2312_cn?b?R3JXWWpwODgrZ0NySnUvMkkrUXR6NEZ2ekxMYmRJM3lKNHpHMEFnNXNKdHBDaWZC?= =?eucgb2312_cn?b?dEtSKy9VOUFjdHhpajc1MkF6cGRxL3VnWlpMZE1meUQyM3Btc2QyMU11dGV1Y2Zp?= =?eucgb2312_cn?b?NFBZYWVKZ2xUeDZ5TjZDc1J5Smx6WmNacEpWVDUxUldrc3J3TFd4TjJkQ2Z6Mlhz?= =?eucgb2312_cn?b?c1kzMHA3NFgyOTR3Rm9BSEZUaHY4bEduKytVM3JEL085RjRvWGJqTEFiSHg1S1JJ?= =?eucgb2312_cn?b?QWNuZGlacnozT3FSRTJPZko3bUE9PQ==?= 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: 3f54ab66-5588-469b-d473-08daae77adde X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2022 06:37:06.2434 (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: A49gBHt9JEtF2q3YXfBO1mnmNlJiN6mVTLQpKM3L0F1bSqVF32+A/BjnvWZoYpSS/6Y2ymtvt3i1LbJEuFLvzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB8661 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Extend rxe_wr_opcode_info[] and rxe_opcode[] for new atomic write opcode. Signed-off-by: Xiao Yang --- drivers/infiniband/sw/rxe/rxe_opcode.c | 18 ++++++++++++++++++ drivers/infiniband/sw/rxe/rxe_opcode.h | 3 +++ 2 files changed, 21 insertions(+) diff --git a/drivers/infiniband/sw/rxe/rxe_opcode.c b/drivers/infiniband/sw/rxe/rxe_opcode.c index d4ba4d506f17..fb196029048e 100644 --- a/drivers/infiniband/sw/rxe/rxe_opcode.c +++ b/drivers/infiniband/sw/rxe/rxe_opcode.c @@ -101,6 +101,12 @@ struct rxe_wr_opcode_info rxe_wr_opcode_info[] = { [IB_QPT_UC] = WR_LOCAL_OP_MASK, }, }, + [IB_WR_ATOMIC_WRITE] = { + .name = "IB_WR_ATOMIC_WRITE", + .mask = { + [IB_QPT_RC] = WR_ATOMIC_WRITE_MASK, + }, + }, }; struct rxe_opcode_info rxe_opcode[RXE_NUM_OPCODE] = { @@ -378,6 +384,18 @@ struct rxe_opcode_info rxe_opcode[RXE_NUM_OPCODE] = { RXE_IETH_BYTES, } }, + [IB_OPCODE_RC_ATOMIC_WRITE] = { + .name = "IB_OPCODE_RC_ATOMIC_WRITE", + .mask = RXE_RETH_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK | + RXE_ATOMIC_WRITE_MASK | RXE_START_MASK | + RXE_END_MASK, + .length = RXE_BTH_BYTES + RXE_RETH_BYTES, + .offset = { + [RXE_BTH] = 0, + [RXE_RETH] = RXE_BTH_BYTES, + [RXE_PAYLOAD] = RXE_BTH_BYTES + RXE_RETH_BYTES, + } + }, /* UC */ [IB_OPCODE_UC_SEND_FIRST] = { diff --git a/drivers/infiniband/sw/rxe/rxe_opcode.h b/drivers/infiniband/sw/rxe/rxe_opcode.h index 8f9aaaf260f2..a470e9b0b884 100644 --- a/drivers/infiniband/sw/rxe/rxe_opcode.h +++ b/drivers/infiniband/sw/rxe/rxe_opcode.h @@ -20,6 +20,7 @@ enum rxe_wr_mask { WR_READ_MASK = BIT(3), WR_WRITE_MASK = BIT(4), WR_LOCAL_OP_MASK = BIT(5), + WR_ATOMIC_WRITE_MASK = BIT(7), WR_READ_OR_WRITE_MASK = WR_READ_MASK | WR_WRITE_MASK, WR_WRITE_OR_SEND_MASK = WR_WRITE_MASK | WR_SEND_MASK, @@ -81,6 +82,8 @@ enum rxe_hdr_mask { RXE_LOOPBACK_MASK = BIT(NUM_HDR_TYPES + 12), + RXE_ATOMIC_WRITE_MASK = BIT(NUM_HDR_TYPES + 14), + RXE_READ_OR_ATOMIC_MASK = (RXE_READ_MASK | RXE_ATOMIC_MASK), RXE_WRITE_OR_SEND_MASK = (RXE_WRITE_MASK | RXE_SEND_MASK), RXE_READ_OR_WRITE_MASK = (RXE_READ_MASK | RXE_WRITE_MASK), From patchwork Sat Oct 15 06:37:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 13007613 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 812CFC4332F for ; Sat, 15 Oct 2022 07:00:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229622AbiJOHAj (ORCPT ); Sat, 15 Oct 2022 03:00:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbiJOHAf (ORCPT ); Sat, 15 Oct 2022 03:00:35 -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 997D23473C for ; Sat, 15 Oct 2022 00:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1665817231; x=1697353231; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Po1nUBP5T/xqof1SNVoGuv9Iwblse8pMCUb4kKM5/r4=; b=UctbBuFg9iWIs+DCNm1645pbPUR1iaAsLf+tGdtRuD1IoniRSo+rlNuI C3NF6L1tluySEV2LqvaRYeNFHnuUXNCmhqLGOMK/B1gdAAgkCGUjxmfoe J3NDjbOJ4hR47keew4zvYPlg4Ke118zXnSCxFDdiPrGndVm37DOdRk2gq Iw8GPA7J1fyeAq3tnSp+tcqiICvvPGXjA3FOmckJoeetPWIuk+ONeU48b uYqMErDq9Wpjut8Bo5oS2vfmnpcWYRlSxAif79hrIkQOUfjryP/NifgqT 3l/GamKe05gfO9eM1+q2nlBs1crCdyUmolQMGdUfzZA37eRhlWFdfle5Y g==; X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="67689753" X-IronPort-AV: E=Sophos;i="5.95,186,1661785200"; d="scan'208";a="67689753" 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:15 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zp+vP4zrRkggKHIqDeeU1eBQfGm4H7+1CPhoqwxwwLR7VgQHUgpmfV5GvfU8MHxEq99uyR+0kx6zgRMD5tqP3BSRM5nkTq+DM3+QWFypOL8oeo6fwgrhmNfcbm/xr8nY91FP7/nixqMAE3QG1vervoJdi1M7OWxbSzMQ4cZwPbydkWIqWknGRRyQU51lMdp5UZCk/I10SjPMrrDMyxHp7GA6VxLZefKMOC4RXC+VTbGiXGIRPn4fA2NF56wTwczBRxXmmwfGrZTZCLlilmCs0wiR/UYryrAMAkVvQuWafWpwkmhhfTGEZL/kVA2zEbfy6SfMwNevzbLOLTNrzhj3Jg== 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=Po1nUBP5T/xqof1SNVoGuv9Iwblse8pMCUb4kKM5/r4=; b=QfIHBeNUjkLt2aQ675TRL8gecXoGp6CmE7b08QoE82QS7uHVYI74uqZ5Nzt+BtESfBW6nqWSGXLxYsdo3q2/iRMPd1A3Vv4IXq8FeKGGOwgrSRIV/y65MNz/AmJqrg/mo4xxO/dJTjxL4efJmBbB+FJjmwkIdxPi08jzzg9so9JbEAsTsMxY1LosN5UrrI3j5oQBUUljKnch5P7DBDZreBIDJZsl60J4MKyXQbI12oe4FYnz3BhVsSQnTsVsI2Zc43JLUqwYjBt5DUM3G1Vm3636X+ixoLEIVsEriBrPJgo0fDdvyd7X7dg9eTvztD6mCnQadMaRc+91DtDQNpuK+w== 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:07 +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:07 +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 5/8] RDMA/rxe: Make requester support atomic write on RC service Thread-Topic: [PATCH v6 5/8] RDMA/rxe: Make requester support atomic write on RC service Thread-Index: AQHY4GCLwS0zgfjsPUu2hvsrSYqV8A== Date: Sat, 15 Oct 2022 06:37:07 +0000 Message-ID: <20221015063648.52285-6-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: 3dbc3261-ceb8-4b85-30f3-08daae77ae1f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WoRTva9QJt6YsWxCq0g5Nd9k750uIdlBs376DyPbBv7C0Wtti0DUEX0w6syr2uHl3bQFap6deBn051dBcTPxdv31HwJlYnmGvcKabyRD8b1AGh9sh/fpnIBMYWGafjtK0pU2cdc7i1cWSJyC63W51oKOmb/4BxmX+iLhzDrxKnXdk7j3j2k2s2QCFREK8WYVC7Uqph8deoTrQmZ2iem5nvas8G9rXw395pCNKsTPNiaO7+/nf+Py0HUqtZIFsTqvCHpFm4rN6eqStmG6o2s+nmpDIx8tJTxMDft1MPXOfwvrULKKO/p1GhtZ1o0D7rnW1GSk9oozw72JjzUP3XOQI71K/+7ah7VEsONEkcXCKLpHTcH9v0Bqa6H/AtV+4CvkDLkinYsWd7mPHvvcpdlCpsFpsWTceYsumM6ys5wDTO7z/jzCof5aNvltF7MkElR+OEXO+WANECt5yUDQYneCobTMAQPUK8bJEye+I632wv3vvmLEeyhlUC0nfg3vVt/YcJRIIDSX85GmyIMuOk/leEnTEmb7TQce1vUVUqExVEtANBt1MigXxVaS5TKDkJr/1cDxC20CBG1To9Tg8qZYkV2gcBQeDqb2Wu+yeqCMuEDsd+gRIfb52nTw90ABEeoP/qmr1a5jk1di3+U1zSFzNtBiNJvq45N3p16aymY6KB9XNv6nRozC4/VtzcPwAGQvVMMegB1qOy4D0Z7oML3mk/cbUqjFSAszEeTqLz8hWRydd+E+N/dKLDHpevqD23BNjRAQ8TFd3T5OqyI6uqi7kxfx/wHFcsnE/4GAYAF1aHG0XMPxUIReE52OpP1AKkSoxKb7pQJlTXVY7ECgU5lQ9A== 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)(375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XV3amczbXpWamJ0MVZPNjRzcVhUTGV1bmw2?= =?eucgb2312_cn?b?eHpiM0xpekJUL1Z6cEE3bENXWW8wZXZkTlp4ZFoxNzBsLzRxTmhFNHQrWXpKU2JF?= =?eucgb2312_cn?b?Nk1JMytPVFovdGh4WXNSUTZ0bzgyV1hwTXBZNGlyWHB5UWozN2srR3g3dCtzMXoy?= =?eucgb2312_cn?b?ZEdDQkVyNXV1WGtUc3BkQWFHY29TZ2lzRVkxSGU1bDlWNndmNzdILzdFeGJtc3Zw?= =?eucgb2312_cn?b?ZEc0SXRJeitWcXRuclBsditSVDhsRy9yN1hMNjRzLzZsVlNVRFBNaXpBd3JtMHEv?= =?eucgb2312_cn?b?a3JDT2FTVVNoZEZSQVB1V2FSOFVCUElzR25kRGF4QUp0L1B5WEhGNXNwckZTR09p?= =?eucgb2312_cn?b?bEZGWEpWaVpIeG15R29ycWtXemc0QTdmTGdKU0dDY1VhcEhsdm4wdDkwK2tybW1a?= =?eucgb2312_cn?b?S1pTVUNIa05mamtQQXFaL0N2VHF0S2RyMElsQkJFN2c2Z0gvYjkyeDVyY0lwMkxs?= =?eucgb2312_cn?b?TDMwZHJ6SEsxS3ZTbE5KcTlCYW92WG41Zzc4QkV0ekRHYzhnWU1aZ3NuTnczb2xU?= =?eucgb2312_cn?b?cmRyZ1hXSGd6dkMybEhIc3dxUEE9PQ==?= 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: 3dbc3261-ceb8-4b85-30f3-08daae77ae1f X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2022 06:37:07.1810 (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: ol2G+6cT0yDbxUH0tt76DqBHc4/PbFH7mRaLzHN6lCTDLkVa1xjHnVvNQsNHkN2V31CcwMUX+hweiFH3r+JbqQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB8661 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Make requester process and send an atomic write request on RC service. Signed-off-by: Xiao Yang --- drivers/infiniband/sw/rxe/rxe_req.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c index f63771207970..50d794910a3f 100644 --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -258,6 +258,10 @@ static int next_opcode_rc(struct rxe_qp *qp, u32 opcode, int fits) else return fits ? IB_OPCODE_RC_SEND_ONLY_WITH_INVALIDATE : IB_OPCODE_RC_SEND_FIRST; + + case IB_WR_ATOMIC_WRITE: + return IB_OPCODE_RC_ATOMIC_WRITE; + case IB_WR_REG_MR: case IB_WR_LOCAL_INV: return opcode; @@ -486,6 +490,11 @@ static int finish_packet(struct rxe_qp *qp, struct rxe_av *av, } } + if (pkt->mask & RXE_ATOMIC_WRITE_MASK) { + memcpy(payload_addr(pkt), wqe->dma.atomic_wr, payload); + wqe->dma.resid -= payload; + } + return 0; } @@ -709,13 +718,15 @@ int rxe_requester(void *arg) } mask = rxe_opcode[opcode].mask; - if (unlikely(mask & RXE_READ_OR_ATOMIC_MASK)) { + if (unlikely(mask & (RXE_READ_OR_ATOMIC_MASK | + RXE_ATOMIC_WRITE_MASK))) { if (check_init_depth(qp, wqe)) goto exit; } mtu = get_mtu(qp); - payload = (mask & RXE_WRITE_OR_SEND_MASK) ? wqe->dma.resid : 0; + payload = (mask & (RXE_WRITE_OR_SEND_MASK | RXE_ATOMIC_WRITE_MASK)) ? + wqe->dma.resid : 0; if (payload > mtu) { if (qp_type(qp) == IB_QPT_UD) { /* C10-93.1.1: If the total sum of all the buffer lengths specified for a From patchwork Sat Oct 15 06:37:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 13007603 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 6A1CEC4332F for ; Sat, 15 Oct 2022 06:38:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbiJOGiZ (ORCPT ); Sat, 15 Oct 2022 02:38:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbiJOGiX (ORCPT ); Sat, 15 Oct 2022 02:38:23 -0400 Received: from esa5.fujitsucc.c3s2.iphmx.com (esa5.fujitsucc.c3s2.iphmx.com [68.232.159.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63D77638D5 for ; Fri, 14 Oct 2022 23:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1665815902; x=1697351902; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=bHF9YOc8aqmkl9KahjSnBQtYtFzT3N3NqxHz4aq1LHE=; b=PyrgvYW9rJAgjXGxmKaM0OOvLTwJ5CEtBnGUevGF9JQtmDD/8gEJ7CHu yC5RNvI+IjJyUhl3lJDhHkALuF9diaSGXgFj8njECFB2k5Ien25uRChfy InIaFBtaxigQVggJNhLXSlGU0CAESZ7eEJiF874YKxntEYPCiSFmqdygd KObNckkmXCoKwHxb1OBjvyw3wjm5Mo/CeYJ/VgARl6FiPFVnKhzs+I998 5T+EE9bGUJHuxDN8MVvK514mqoDwIdLV6hCrotYdBdOqJPC0nSSUQxpzH rXcA9AzFArWTWqig1/nN424hrDbeX8Jfp6S88TeviFiK2kk2Q+v32o9k6 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="67758726" X-IronPort-AV: E=Sophos;i="5.95,186,1661785200"; d="scan'208";a="67758726" Received: from mail-tycjpn01lp2172.outbound.protection.outlook.com (HELO JPN01-TYC-obe.outbound.protection.outlook.com) ([104.47.23.172]) by ob1.fujitsucc.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2022 15:37:15 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WNHF97Pxxgc1K7fUK2ix7JO00Aic5YmZwXxC68eC9PK/J2BZxKdLJk3OJ3PhO+3OYU1GisXSRNvJzm9Uq/zN14rpnU+PNoKpEVWn23tXo1vIR4XTLvMjtsnuVxkzNY9lxIfItIzcLZKf/4x6Op57sthyKavvHFJeMvZZnuCcecheXennfqEEzBK+kCNUhByOJOLwOC4QPMfvNZ3HMZ/Tl+pJ8ImDEnR4CXiPTlokBLyqcOCfp8Uvol7G2jrnfVLGU7+sThhpoc5thxLh9JLrtSRA72NgvZUD7H8dn5evPG5qH/nGnlklHh27xAy22n5LbS9aIrFhGPOjbSmlwn6yAg== 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=bHF9YOc8aqmkl9KahjSnBQtYtFzT3N3NqxHz4aq1LHE=; b=b/oBULsUdcA9Xx/ZGzPFtIL7a5OcI7vDoD+qq7yt3j25NHNQJVyrP+BjXRRrsdWKJ+WfGQJKwm+HCfu8UxlRRoLq8lgg4Ey0CTfRqlQbZX6AswN0lH6py4qCECxf/ZJaUQeb/K43YyiCzIgppkGVHevuYH8L9lk2GTzBE5AOGU/DDFQerplBqNclNGESxWLQtcwFspj81Zu2ckl4vW1Qqn74MDT+/0wT1VmWskVDJ73+4mFkfW5fymhiK5cjAyTKdLIHq9wBf9MlBhCjvsCrSZMxUlqHfLRIBI5F6k114sYgCyQ1KQt3EWoHDlMF2Z8x500/pkq85ZPNtbFW9lGdLg== 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:08 +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:08 +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 6/8] RDMA/rxe: Make responder support atomic write on RC service Thread-Topic: [PATCH v6 6/8] RDMA/rxe: Make responder support atomic write on RC service Thread-Index: AQHY4GCLjMFWuCMSS0q/oYGR4F4sjg== Date: Sat, 15 Oct 2022 06:37:07 +0000 Message-ID: <20221015063648.52285-7-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: b38c8cb3-e52b-4473-bd49-08daae77aeb7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: K7l8yqPGaCTqGA6aj+OyUuDNTbTy6rQPJ0jjGzbEoeTuXV8jft0/1NX3oXnGI61Ty0tP2meT3uSlqNAro60mvtveDm2v/fOauubzm0QqNiEtxFlzEJ/CxCG7zVXn42azvET+u5D1TxUh/etm/y92FZiXvUvXqtih5eJU3yeE20OEW5g/JofXaigqLItCXN54PwKkPAJK5PfH2DT8gtlsVVcewwKq3rn3grR7oUYLT3t4yiQPaMcjYwepHvHd2M/oNi9HJtN3WvLzFVzpK+RrbErvxktK33s9Lt9Be79uMo6B9RTlfkpsrRkWz5UuHofWEdEt10dCqq5X35LBa3iubjIqgEkeygg98ltcOML9m3z/UqqbJBqPem51xayBZuhpf+vtEdL8Y9c50sSIZEP+iUFbN5W6w6tMr2VZ+6pHyT8VoZhSJz/kYrazBL38I/Tw1SvgC+Ss5DRDvmIvhDJKuvGCgtReTFQEsaVk6UlaOL1nC8X26PmSgGFQQg536mfo6nQrbqLAgFtI4A65X3cs0dm4ufW92pRdL0Hpk0JBwqyPLauaAjHHcJmyR+KzehiowDTgFQ/ukinxC9pL5ZN6u0mdoEYggAxde2bO2d7z2fRvDYfCFzy2nONdMXpKaCo06dvosOzcycZbulKPc8a+NaUkW61GkTAZxLEU3FppeDzsJsg7u+IaCkT05ovx6gFCJzwELegwewfBxyayBTyg/jRSpHfT70enyt0puyIJBW35aF1jrOdvHo+cKYCgvI+uAa+MhO9Lzu7N9ru//2ijqs+8SlbiyeiuBJ40FUnSUeo= 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)(45080400002)(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?aDN2TExJTWhMMDhDMy9XZmFp?= =?eucgb2312_cn?b?WVhYUlk4TW1pWnFiamxoN2VtcjRPTG00VldnTlZZYUNJSzhWOXQ2c280eno5Wmts?= =?eucgb2312_cn?b?Q3Q4NndzRG9RM2l4R2tVVEY1cDJFMnRTS2t3ZFRUek53THNmbXdKaXcvUnhyd0JS?= =?eucgb2312_cn?b?aEM4SUMyVzAreWFDUnV0Z2RBZG5ER3dxbStQc3RocUt6U0MrWFNrS3pYSnUyU2NJ?= =?eucgb2312_cn?b?c0tCVXZpVFFLc21UZWMySkxPRUJ3NE9GbXFRSnVDMW5vcU1Mb0VPanZNM3NEa053?= =?eucgb2312_cn?b?bTZUZHJpVjFsQUFyMUFoTmxKY2liQmxpRkcrUGljZWRGOENVZFp0VVNlQTVDZkcw?= =?eucgb2312_cn?b?clpwYUhDdjFxUHV4SFFDUlZ5akRtY2pwT1EzanN6MmhuZkM0SmtHemN4UUlEdk5O?= =?eucgb2312_cn?b?cGtWQWpZM2I4dEJNYys2eTRmSWlmK1AvTVBsRU01VE1BWWNsQ3F2cFo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= =?eucgb2312_cn?b?OERDcTc1L3RBbkxYemlwbWRkNlE9PQ==?= 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: b38c8cb3-e52b-4473-bd49-08daae77aeb7 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2022 06:37:08.1496 (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: tIifPGBnY/LN8xWk8tH5q28cxKSy9Ut8LFQReGV0+I8WpdBWiJdp16DW6wDbjqWbiOCuQIP/GhdOUdG2m51yrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB8661 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Make responder process an atomic write request and send a read response on RC service. Signed-off-by: Xiao Yang --- drivers/infiniband/sw/rxe/rxe_resp.c | 84 ++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c index ed5a09e86417..7d313d9a8d88 100644 --- a/drivers/infiniband/sw/rxe/rxe_resp.c +++ b/drivers/infiniband/sw/rxe/rxe_resp.c @@ -22,6 +22,7 @@ enum resp_states { RESPST_EXECUTE, RESPST_READ_REPLY, RESPST_ATOMIC_REPLY, + RESPST_ATOMIC_WRITE_REPLY, RESPST_COMPLETE, RESPST_ACKNOWLEDGE, RESPST_CLEANUP, @@ -57,6 +58,7 @@ static char *resp_state_name[] = { [RESPST_EXECUTE] = "EXECUTE", [RESPST_READ_REPLY] = "READ_REPLY", [RESPST_ATOMIC_REPLY] = "ATOMIC_REPLY", + [RESPST_ATOMIC_WRITE_REPLY] = "ATOMIC_WRITE_REPLY", [RESPST_COMPLETE] = "COMPLETE", [RESPST_ACKNOWLEDGE] = "ACKNOWLEDGE", [RESPST_CLEANUP] = "CLEANUP", @@ -260,7 +262,7 @@ static enum resp_states check_op_valid(struct rxe_qp *qp, case IB_QPT_RC: if (((pkt->mask & RXE_READ_MASK) && !(qp->attr.qp_access_flags & IB_ACCESS_REMOTE_READ)) || - ((pkt->mask & RXE_WRITE_MASK) && + ((pkt->mask & (RXE_WRITE_MASK | RXE_ATOMIC_WRITE_MASK)) && !(qp->attr.qp_access_flags & IB_ACCESS_REMOTE_WRITE)) || ((pkt->mask & RXE_ATOMIC_MASK) && !(qp->attr.qp_access_flags & IB_ACCESS_REMOTE_ATOMIC))) { @@ -364,7 +366,7 @@ static enum resp_states check_resource(struct rxe_qp *qp, } } - if (pkt->mask & RXE_READ_OR_ATOMIC_MASK) { + if (pkt->mask & (RXE_READ_OR_ATOMIC_MASK | RXE_ATOMIC_WRITE_MASK)) { /* it is the requesters job to not send * too many read/atomic ops, we just * recycle the responder resource queue @@ -415,7 +417,7 @@ static enum resp_states check_rkey(struct rxe_qp *qp, enum resp_states state; int access; - if (pkt->mask & RXE_READ_OR_WRITE_MASK) { + if (pkt->mask & (RXE_READ_OR_WRITE_MASK | RXE_ATOMIC_WRITE_MASK)) { if (pkt->mask & RXE_RETH_MASK) { qp->resp.va = reth_va(pkt); qp->resp.offset = 0; @@ -483,7 +485,7 @@ static enum resp_states check_rkey(struct rxe_qp *qp, goto err; } - if (pkt->mask & RXE_WRITE_MASK) { + if (pkt->mask & (RXE_WRITE_MASK | RXE_ATOMIC_WRITE_MASK)) { if (resid > mtu) { if (pktlen != mtu || bth_pad(pkt)) { state = RESPST_ERR_LENGTH; @@ -583,6 +585,7 @@ static struct resp_res *rxe_prepare_res(struct rxe_qp *qp, res->state = rdatm_res_state_new; break; case RXE_ATOMIC_MASK: + case RXE_ATOMIC_WRITE_MASK: res->first_psn = pkt->psn; res->last_psn = pkt->psn; res->cur_psn = pkt->psn; @@ -652,6 +655,55 @@ static enum resp_states atomic_reply(struct rxe_qp *qp, return ret; } +static enum resp_states atomic_write_reply(struct rxe_qp *qp, + struct rxe_pkt_info *pkt) +{ + u64 src, *dst; + struct resp_res *res = qp->resp.res; + struct rxe_mr *mr = qp->resp.mr; + int payload = payload_size(pkt); + + if (!res) { + res = rxe_prepare_res(qp, pkt, RXE_ATOMIC_WRITE_MASK); + qp->resp.res = res; + } + + if (!res->replay) { +#ifdef CONFIG_64BIT + if (mr->state != RXE_MR_STATE_VALID) + return RESPST_ERR_RKEY_VIOLATION; + + memcpy(&src, payload_addr(pkt), payload); + + dst = iova_to_vaddr(mr, qp->resp.va + qp->resp.offset, payload); + /* check vaddr is 8 bytes aligned. */ + if (!dst || (uintptr_t)dst & 7) + return RESPST_ERR_MISALIGNED_ATOMIC; + + /* Do atomic write after all prior operations have completed */ + smp_store_release(dst, src); + + /* decrease resp.resid to zero */ + qp->resp.resid -= sizeof(payload); + + qp->resp.msn++; + + /* next expected psn, read handles this separately */ + qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK; + qp->resp.ack_psn = qp->resp.psn; + + qp->resp.opcode = pkt->opcode; + qp->resp.status = IB_WC_SUCCESS; + + return RESPST_ACKNOWLEDGE; +#else + return RESPST_ERR_UNSUPPORTED_OPCODE; +#endif /* CONFIG_64BIT */ + } + + return RESPST_ACKNOWLEDGE; +} + static struct sk_buff *prepare_ack_packet(struct rxe_qp *qp, struct rxe_pkt_info *ack, int opcode, @@ -888,6 +940,8 @@ static enum resp_states execute(struct rxe_qp *qp, struct rxe_pkt_info *pkt) return RESPST_READ_REPLY; } else if (pkt->mask & RXE_ATOMIC_MASK) { return RESPST_ATOMIC_REPLY; + } else if (pkt->mask & RXE_ATOMIC_WRITE_MASK) { + return RESPST_ATOMIC_WRITE_REPLY; } else { /* Unreachable */ WARN_ON_ONCE(1); @@ -1061,6 +1115,19 @@ static int send_atomic_ack(struct rxe_qp *qp, u8 syndrome, u32 psn) return ret; } +static int send_read_response_ack(struct rxe_qp *qp, u8 syndrome, u32 psn) +{ + int ret = send_common_ack(qp, syndrome, psn, + IB_OPCODE_RC_RDMA_READ_RESPONSE_ONLY, + "RDMA READ response of length zero ACK"); + + /* have to clear this since it is used to trigger + * long read replies + */ + qp->resp.res = NULL; + return ret; +} + static enum resp_states acknowledge(struct rxe_qp *qp, struct rxe_pkt_info *pkt) { @@ -1071,6 +1138,8 @@ static enum resp_states acknowledge(struct rxe_qp *qp, send_ack(qp, qp->resp.aeth_syndrome, pkt->psn); else if (pkt->mask & RXE_ATOMIC_MASK) send_atomic_ack(qp, AETH_ACK_UNLIMITED, pkt->psn); + else if (pkt->mask & RXE_ATOMIC_WRITE_MASK) + send_read_response_ack(qp, AETH_ACK_UNLIMITED, pkt->psn); else if (bth_ack(pkt)) send_ack(qp, AETH_ACK_UNLIMITED, pkt->psn); @@ -1182,7 +1251,9 @@ static enum resp_states duplicate_request(struct rxe_qp *qp, res->replay = 1; res->cur_psn = pkt->psn; qp->resp.res = res; - rc = RESPST_ATOMIC_REPLY; + rc = pkt->mask & RXE_ATOMIC_MASK ? + RESPST_ATOMIC_REPLY : + RESPST_ATOMIC_WRITE_REPLY; goto out; } @@ -1320,6 +1391,9 @@ int rxe_responder(void *arg) case RESPST_ATOMIC_REPLY: state = atomic_reply(qp, pkt); break; + case RESPST_ATOMIC_WRITE_REPLY: + state = atomic_write_reply(qp, pkt); + break; case RESPST_ACKNOWLEDGE: state = acknowledge(qp, pkt); break; From patchwork Sat Oct 15 06:37:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 13007609 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 1E5E1C4332F for ; Sat, 15 Oct 2022 07:00:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229550AbiJOHAe (ORCPT ); Sat, 15 Oct 2022 03:00:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbiJOHA3 (ORCPT ); Sat, 15 Oct 2022 03:00:29 -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 5CFEB2C138 for ; Sat, 15 Oct 2022 00:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1665817222; x=1697353222; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=NeCYmGxkqhrYiF2XPUliL7Jy4PA73vbLQMF31snSS24=; b=vPtg2VGRQyVLaorx3nG37zjn49QmGmaH5RqcM95WBRFuz1KAtk0Mk8Ck F5GB9IgJncFJ6vw8MmLD1m2Cy+Uv25V2VO03omNxKrXNWvrUzA4BZsvGg iFNWa0qMyT/kPnSXZUMu3+VkLMMqZ26GtnGrHPRyJrD2ZHFddueVq3GcR ZqubfbVP1HpaCoFjbMfyBhcn+3gpzw7M+EN+QeDsDS/zlY/Zrdzb9qXEL DRVX7G31MYPskeHB2kqWLBfFPe93yf2KcCoSxNrF3MAwq+2K1dosxZ3Xj 03uV5o8FEfx/SJNISvTwkItJk7pVU137XiO/9L24oDNHUinsr/R2xY9Z7 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="67689755" X-IronPort-AV: E=Sophos;i="5.95,186,1661785200"; d="scan'208";a="67689755" 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:17 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c499JLi6TG5Rre3T8Eb7HQW218kT6NJSBsEAEEX6YRYOjCKKKQ9XlALqrHtsSbnQ8jsEKk3kQj1y2XE8Tu+tZnzetQXaeUFcR4/JEfWt0dwcwHDWovLoDksNxWOClupKlATz2PQyCeYXkSn0Ed0ZA7YysdigVkuvglhf09w7zwDbjTCd7+VNtdB6LjOwD7A9ufpEtN7tiXZBM2d8M+UKnPnmYZNlrZXYlkEGm1eytvJ/e7SiDN0jp5MWx8Iq9TU5IWI7yolkvoBqjcvIcJXOCBDxKXnmnIAsydxqiMy0IKN018Olj/6FEZSkbl7i+KesmxQ+aKyFODmCTs8d6nTKQw== 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=NeCYmGxkqhrYiF2XPUliL7Jy4PA73vbLQMF31snSS24=; b=lVSzTNjHqpNLAsBhtFV5SSI6QO+0brjbUbEffGwg/kpfGdiyJt2J/HiqIiMITk7DQAzRSSpXSwAIOukvVW+zIKdkkLUq7Exu6fYqDS0yzeB6wl/RvEPWD/+ukJ/wKFweW3nZa5UKRVndvcPuZ7HOSUCFo6VKAfG06uFRwWN5BGgAckm/vRuwZHZA5xV8+LRLN6t12KAcKkMzuKnt1taPoj1m9HQyMKfgN22ji6MfplH1rjSNNidLUp8H5z4DjUPJwZpd55ItUpBaeqAuP5DsAfbaCUXpm2jugLOxqBjSYvymCM0l/pTAgcta6QtwofrxBcZX3hNLjlL6s5lxloDp6g== 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:08 +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:08 +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 7/8] RDMA/rxe: Implement atomic write completion Thread-Topic: [PATCH v6 7/8] RDMA/rxe: Implement atomic write completion Thread-Index: AQHY4GCMCOXD8vqMvE2EvZQxyfbfXQ== Date: Sat, 15 Oct 2022 06:37:08 +0000 Message-ID: <20221015063648.52285-8-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: ca26f850-1ee1-42a8-bf9d-08daae77af0d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: qroStfwo0u4yXYQxMvsGES41oySS0Lcs8hP71X/9VzUFYfIh1L0YlkwXJPe4YK87mp84yWhkLET1zDsZvTC4jXIPbMid0IRTWgthsmDgrBwIpK/YpPp/8HwwD8ip8PaHIRhtyP7g5Zj8MDPArhQJ4VkVpxpF1KccuItK+vW49QU1unfgOlt8pFJqWAbNDCI3irlIUHYKzWVR79iwRxvXxQ/cnzLzViqQ0mRLaC1ueEHdOpSh83NW7a9e2w99L4ZTjPIv7+P49A7Ih3WfRVeBa7MAtYK+BXtY0qRRfJo8wqDmrA18/nBukAvjID6guHlWFDN9vYPmHF4xgY0fqj6s1zvhi1IE+0yWHAd0ksEG2D8fGvJ9hV6L3tG7fpCiOnam7lazv7IzEAZidL2Cc0yfTMxx0Iggh/sjJxdDtI2ApsTZHmThIn5GXTEKjXC7hP5M5dy3GOS+ltv91EtT6m+Ifd1DYFpdbUpH9131z0j9880pgzbATeNNKyr+r4EMs1QUhmw1shZFgPlSyou7X5EzvlkTmWyBiEO1ftqiOfCnnVDy7Ok89acHLv8vYGNCYwfh8z96gdpMBw+44I0Dyagdt78/umYtHbgFbWEfpJuig0W3WXFXxYrNnLtVbuIVS4iHBKMRrORkVtuudYwBvgdFxcQjiNRskuJ/g5hW41I9hiKnTueJjFx9Px+xxc72b/NvUitT+0nsDm4grvHeoB5n5Nmu42b4Yk2pQZZTh79S/ouPQNOH60IIF/We6Nucv+DosTY3cawZDsUfLYIfAxjZFQYbSEe482Slw1W6FKZLzj8= 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?NTIvQjYvOXNOd0gxQVdqa1Br?= =?eucgb2312_cn?b?dzlQTlZGakdXaWMrdzUySEFwaitqZU1nTjQvSFNGem5aOWNRMlJkTThMalRDcFor?= =?eucgb2312_cn?b?RUc2MmdjR045bGNVajVUZXFrWW5GdlU5MnFjMmJtUHhWeGRpdVloNTYwYzdISUZJ?= =?eucgb2312_cn?b?TElzMDBOTThsbXI4YkMrR0JxQnQvZndTRGt5a0ZmemlQb000YzB4ajlCeG9hNjM0?= =?eucgb2312_cn?b?SE5HNmhzenp4NFpxbyt5cTlySDFFMi9VWVV0Rk9QRGNrK01LcUZ1TWtua1FJeGVH?= =?eucgb2312_cn?b?MDNzUzJpR0c1TVJ6MW1xdGhjbEl5YTM3T2V5dzZQdEw1Z0o3aEx2eVAxTGRlT3RO?= =?eucgb2312_cn?b?RU5SWVhTdjFJT0tNS1lNMml1bmMvUnlnVzZQaUxWV3NOKytXZkp3aEF2SmhmeTVB?= =?eucgb2312_cn?b?QWlIb1hrNGJnZnFQaitiZVdicEV4MXRmZzVkMjd2MS8yQ2ltZ2ZOYkdUZjhQSXRu?= =?eucgb2312_cn?b?TDFRdXVqSXUyZ1h5NFphWXBNcWtpZElnNEZ1c0U4WVJ1eStkZjl4YTRWWVhZK3dY?= =?eucgb2312_cn?b?Z1drQmZ6bG1TSG9sTFNzM3VnRVB4QjhBcnJkazNyWHNnWDZzUkJoOGhNTGl3aVRL?= =?eucgb2312_cn?b?ZVVRNFRDNVp1eHB2dkxaTjRoL3JkVzNEWUY1eER1TWM4SzdlbU42d2RwUlZseFlO?= =?eucgb2312_cn?b?bmVocU5ZTDR5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nNOY0lDc01PWlFTQVVVZE4vUmRjK1N2dkZoTEozMlhYcUdqNEdDMU9CdFh4?= =?eucgb2312_cn?b?NGlTUmhvRW9uU0RreVEwQW0rOGNnNG5KMktUcXFFQWhjc1NsTHZLMXJKOUFyL2pu?= =?eucgb2312_cn?b?WnNvUTVtZDZqcmlrekhGQ0VHVnFqNGoxeFVhcGhwKzRmZklrNmd1bmMrSGMxaTJE?= =?eucgb2312_cn?b?U3BUeEMvWWZ5WDg4Zlc5YzRaNjVDWTFmeUlWajU4UDV5eGk3MW9LYUNsQXRXRWhr?= =?eucgb2312_cn?b?d3N2YTBXbVlkM0FXQ1M4aWsvMzFxbGFKQWNrbC8vQXVzOE80VVF4MHJVZTVWclNt?= =?eucgb2312_cn?b?SlFVUkd6Y3dBTnVFZWRjYUlDMHJqRUE3bjN2NWNSc2d2U0Z6SlNldjNrYTNBZHBF?= =?eucgb2312_cn?b?b1lDRDRsOVNpZ1BEMWNkTWhQT3lIeTlFN3paWDIxOWFmNDJhSkpLNENSU3FOOWNN?= =?eucgb2312_cn?b?MHAwNEp0NnNvWHdBZnZIZTZNU05lQ2NSano4b2tDVW5jejZYL1hKZVMwaytvZmhL?= =?eucgb2312_cn?b?K3BvOXFzbjdOZmFpQnhqdjMxTXovc0Jtb3U4M1ZKTkRpMGd6NTBDT1ovZlZqY2RW?= =?eucgb2312_cn?b?UVkxT0FNYUdSYVdtSTA1TnlVSjhhaVIvdzRKU3VaVlF2MG9nU0g3N29YU0RRdW1y?= =?eucgb2312_cn?b?ekYreHpzV2lWY3ZvUWZUTGhmVGc9PQ==?= 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: ca26f850-1ee1-42a8-bf9d-08daae77af0d X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2022 06:37:08.6976 (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: BXCJVRsYxdIEsZOOTJtDZnaB78Bf5yFXBtQ2puH3JNMGJVJ6Patgp+PmjLY5WoFNc1sjBPIw+iiZIZb7n9VoAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB8661 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Generate an atomic write completion when the atomic write request has been finished. Signed-off-by: Xiao Yang --- drivers/infiniband/sw/rxe/rxe_comp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c index fb0c008af78c..46dba6f163ca 100644 --- a/drivers/infiniband/sw/rxe/rxe_comp.c +++ b/drivers/infiniband/sw/rxe/rxe_comp.c @@ -104,6 +104,7 @@ static enum ib_wc_opcode wr_to_wc_opcode(enum ib_wr_opcode opcode) case IB_WR_LOCAL_INV: return IB_WC_LOCAL_INV; case IB_WR_REG_MR: return IB_WC_REG_MR; case IB_WR_BIND_MW: return IB_WC_BIND_MW; + case IB_WR_ATOMIC_WRITE: return IB_WC_ATOMIC_WRITE; default: return 0xff; @@ -258,6 +259,9 @@ static inline enum comp_state check_ack(struct rxe_qp *qp, if ((syn & AETH_TYPE_MASK) != AETH_ACK) return COMPST_ERROR; + if (wqe->wr.opcode == IB_WR_ATOMIC_WRITE) + return COMPST_WRITE_SEND; + fallthrough; /* (IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE doesn't have an AETH) */ From patchwork Sat Oct 15 06:37:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 13007604 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 CE44FC43217 for ; Sat, 15 Oct 2022 06:38:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229556AbiJOGiZ (ORCPT ); Sat, 15 Oct 2022 02:38:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbiJOGiX (ORCPT ); Sat, 15 Oct 2022 02:38:23 -0400 Received: from esa5.fujitsucc.c3s2.iphmx.com (esa5.fujitsucc.c3s2.iphmx.com [68.232.159.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D005D638F5 for ; Fri, 14 Oct 2022 23:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1665815902; x=1697351902; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=9qocX0N5/qQ8PglDkDfyStoKYdhlbgF54dljWaP0UzI=; b=APU/iN0Khgh4Fc9E/TrrlXy8gnTsiDFhQofgmErtW+tr2wmwn8UIQSXt gdpWdLbgRaQYGeOr9Wu253WMO2SsRHi1NIRgaaeie2LeJhTuS0tKaa/VW zK2EuQBMpUsuZF55zgDlUy1n/woEz8+Y0463KWyy94kRaeF/GpWFdYFli 9r9PX31rdHshZWGxWL9+dp+gIKbxSnSVTAxqK87BOcfwHplVESERno7uR Bgm8qHTHTRuK3S38wfjGLM+mROwHpmFb1XMWcqkc1L17unwq4ouFdvGGq gZXujRI7fqQ3xeg5RYHO/FnPYAkGP1bpndpDuM5VtWdBuvJHT9pzDWo9K Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="67758728" X-IronPort-AV: E=Sophos;i="5.95,186,1661785200"; d="scan'208";a="67758728" Received: from mail-tycjpn01lp2172.outbound.protection.outlook.com (HELO JPN01-TYC-obe.outbound.protection.outlook.com) ([104.47.23.172]) by ob1.fujitsucc.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2022 15:37:17 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O1Ok+4skJpByrZ5cJl8HHHnKIOxNDowx6KCjAjT/EyjdULkasPgfLw/J27fd8E0moFJbElBdi4LGmXC+H+bC5H8yhkMlUHYJx33ptwQNfZrl7256s38Xpi7fg2SOOS3cOzjakMRfcgFbLorgciQb3UMCRppgz/QiyugfgF+xWGEaJYQj+bIyjscOdn0qXwdT+1JmPAIXitIMSUyS7SEVW2KCS+SwmbdTNxo3dIXdqd3/OyKQoTcJkNk0/oT/dl3wYS8Vix96oC3BOe1aN+3jeASyBHq171i6HQWWE7kmbfEKp4vllWcX3HtFfg5k1CNDNaOtMOurztdWT4vzcnyEeA== 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=9qocX0N5/qQ8PglDkDfyStoKYdhlbgF54dljWaP0UzI=; b=I00CTdj8QL1I8Q6Q24cM3i8fp0tMsfXyqDXAvNz3PuWI/bdh5pOZnRcyYN/j1k86upBkeEfWjF6L6K5kMsBdu66UygfcRMDsObLvpLwaXIP0QqwhPDMuWNfWx8Q1rrrOVSfNF8uxmaU5/+2opGBLz69OLm008JVUT3ACwSJ/pGzEav6QWlWAWSpkx0AFep75EO60ntbfzb+8rfTtjvhBi/4ocFeFtHvTSZ8dFZoaDl29pl15AhyhprZzrLGFFnPXELs7g+pgSl3CnHuUtTD9jpEAJ1xZzZdoaj+lZIg6PccJNpRjneFjA6SDKbxD8JL/hfzu0KQZtzJUbMmJlLYhRQ== 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:09 +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:09 +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 8/8] RDMA/rxe: Enable atomic write capability for rxe device Thread-Topic: [PATCH v6 8/8] RDMA/rxe: Enable atomic write capability for rxe device Thread-Index: AQHY4GCMZQMABIytdkCk4JhboIV3nQ== Date: Sat, 15 Oct 2022 06:37:09 +0000 Message-ID: <20221015063648.52285-9-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: d3b9499f-aac9-4ee9-f560-08daae77af46 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: qJFSgEYQedPAoCj7BEAn1Aqc6TmPdhC6YQo1VPMSTDtvvB6bTDcrZKs/g/w3pp6sJ2ClASjgZjjpBYv2cObnQ2GoDBHZgM47/Qbjxe69hGQOGnNbjVzTt2GjqWMUrx0YdCxUp6S0XusuUQf5ZnI7fogyqUYv6cYk/qL3eCbgbg3MtmBi3Etaj3+qrLwMvXspINR3+EzM+xB2loe2V9TbMESNJ4ZU2f33JMKFMQ9SdOnsbc9+Hw/rX37GTqATo21j8cEZJ2IHf36imyIPdRR5wF4mGhZv4XkBe0X9Em3DX0TL3pYD6fyM4+WntQ7hqsj3CqezRaqMKqiDs/aNo9c9IyihVwGYK/IWNKn0+NFNx8STGU8aFI1jPAQFBc8uIgGB72g6CAOIAotcJlkTY9Ygs1mSWZkwjisVBMNhL5EK8rQ2jzh1g20bqlbQVNvV+iXFu/BVMlITx/JBxuUmsT8fLSU1JfZFJZNZrGUXi3YGh4LvwANYJKjg/qeniNyv8PW/Go4DFlWLY3r0oxtcqGaw/83M3CGx/Xox2zqYMP6VwNZ/Baw9+gKczt0SoKzRT7949qJjoTil5+xCBkxgycCmeRYGXYMbFgh7KaUkUwlnrRMNmtwXiA/YBuHNMsYh0F/DHxOAEZ4tXOydz7OHchz4k7Ttv3Tzt5dT3FFcKel1MQyatlpFAHSiYIb5KmTSpXblZkK0DTPFUwHd+bQaFByZIUYwxidtwtmPFwpmDvawJYRRJ5AySxlq5sVQdns/g7k8UyXeGrvua5aGOjgGlFNCVgA70098UtGnvr3WfCz6pSs= 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)(8936002)(4744005)(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?aVAxQmRRUUJheUxWQUdxdytW?= =?eucgb2312_cn?b?Sk5wbTRaR0RXeUNHNkZsSkhLMXUzNmhOR1JNZm1ObllkMVZ4RW0rdFFVZWdtYXpM?= =?eucgb2312_cn?b?NnpPQXEzSzRSYXUyb1plTzdabHdGaEtHWlp4ZENPODNCLzArMHJwTFJHeGxjK2Nu?= =?eucgb2312_cn?b?ZkxRK0RkRXBUcWgrWUxYRzA0QXRpaXN1VnJ4MjU2RVFRaGp1WDZjVEQ3WGx0ZE80?= =?eucgb2312_cn?b?N1ZLMWZhblZCdHFDbjNxVmF0SjB0WTFWbmkyd296T3FIUGFHTFdDTXBuY0EvaGVz?= =?eucgb2312_cn?b?VXJQV2I0STlicVROVlpaTjByRGFvc2lObEJjUXIzcEI3cWtCRzlJMGoycTBTc3NU?= =?eucgb2312_cn?b?bGo4Z2MrSmlNNWdLZ2hXNE5CRW9tUGMwbWdaeDMvbDdzMEtrZEV4djdvRWFRZEhs?= =?eucgb2312_cn?b?WGZSVzBja0l0aUJUOG5IODRvSTd6WjkvQi9BUVAxR2swYWVoc2dxdHBua1dvSUZr?= =?eucgb2312_cn?b?TXRhVWVKeUx1UWczRlpkZy8wOFVnbWtUMDlkTlBiSklCNUhTY1ByS2xtTWswUlVm?= =?eucgb2312_cn?b?ZWxudndpVE5oVDNFdCtWVmlyOEMvOXFZQ1RZemM5SFdmZHhUNXVlTkhJaWN3ODBD?= =?eucgb2312_cn?b?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ExHQnBMTmthazQ5SHFsUEs0YnQxanFIU08vcFlXQkVOUDIyUTA3aURw?= =?eucgb2312_cn?b?NjZkQW96dFhVYksyZ0o0cEpCb2RFQ3NaMVk2RisvZXFJcFdIK1EvTWxrRVFxOEVr?= =?eucgb2312_cn?b?VlRTRU1DVFZLbHFrRWtFM2UvK2FLNk1VQldUbUFQYnlBdmRLVTN4UEMveUdtakJP?= =?eucgb2312_cn?b?WWxWUGJ4N0E4T0VHWHdUcUdiN3dJZnkxdTI2eldqcjJzWDRYNHpNaGVkbmV1VkR0?= =?eucgb2312_cn?b?VXpaaytnRjVkQUNEb3Q4ZWxhWmNVdGM2ZnNHdEFpdy9JbzBubDZYR1R3dmNUdkRk?= =?eucgb2312_cn?b?Tm15TTNDVHFWZWlQMDFmSEt3ZHM3TnhhNUlPbzd3bjhwdGdEbFZiTHRHWUJrTUhj?= =?eucgb2312_cn?b?Nlptd01TYmJURGpRUWxDNjRDeERDYWw5WDFFZGQvQm8zWmR1RnFIbTNLaElFQ0lD?= =?eucgb2312_cn?b?ejZmUEVHUFpvZkFDRGx0UXlLczNqWVZpNkVkK2pSTXBxRkZ1ODljYXRSUTFyd0M1?= =?eucgb2312_cn?b?TS9mTUVvdGREdG53STFUZVdOVVBvbGh6czIwVElGWW5nN2FtcEVBZ2NQNDliVTd2?= =?eucgb2312_cn?b?bXBCK0hUYllWUGJxdzZOUkpMVHpDVWlEVmNBVkY1OXhNck81VkpIQ01aNEdmUE5n?= =?eucgb2312_cn?b?akl0S2lrV2NWMDdyNUs2MUIwdG1lc0E2cytUOUg5WXk1cHRKVUtIeUdwcVBPWXZo?= =?eucgb2312_cn?b?VVgyVDgyMVh5bmc2dFp3Q0VKWlE9PQ==?= 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: d3b9499f-aac9-4ee9-f560-08daae77af46 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2022 06:37:09.1038 (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: hNH5CBP8624SE7TYBldA9mZng4Cru3RoKpQlkWCqDVZPDtv8MOf7CLeSXq5GgU2b/DGLw28qn4tzWv9KsfvAPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB8661 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org The capability shows that rxe device supports atomic write operation. Signed-off-by: Xiao Yang --- drivers/infiniband/sw/rxe/rxe_param.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/infiniband/sw/rxe/rxe_param.h b/drivers/infiniband/sw/rxe/rxe_param.h index 86c7a8bf3cbb..bbc88cd71d95 100644 --- a/drivers/infiniband/sw/rxe/rxe_param.h +++ b/drivers/infiniband/sw/rxe/rxe_param.h @@ -51,7 +51,12 @@ enum rxe_device_param { | IB_DEVICE_SRQ_RESIZE | IB_DEVICE_MEM_MGT_EXTENSIONS | IB_DEVICE_MEM_WINDOW +#ifdef CONFIG_64BIT + | IB_DEVICE_MEM_WINDOW_TYPE_2B + | IB_DEVICE_ATOMIC_WRITE, +#else | IB_DEVICE_MEM_WINDOW_TYPE_2B, +#endif /* CONFIG_64BIT */ RXE_MAX_SGE = 32, RXE_MAX_WQE_SIZE = sizeof(struct rxe_send_wqe) + sizeof(struct ib_sge) * RXE_MAX_SGE,