From patchwork Fri Jul 8 04:02:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 12910519 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 B536AC433EF for ; Fri, 8 Jul 2022 04:02:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237116AbiGHECq (ORCPT ); Fri, 8 Jul 2022 00:02:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237099AbiGHECp (ORCPT ); Fri, 8 Jul 2022 00:02:45 -0400 Received: from esa19.fujitsucc.c3s2.iphmx.com (esa19.fujitsucc.c3s2.iphmx.com [216.71.158.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67ED974DD6 for ; Thu, 7 Jul 2022 21:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1657252965; x=1688788965; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=6lB+CDAkaqCasiKK+vbPq9uweogB+JwWab64Lbh9yZA=; b=N8KOu5sas9N/65Gg0G+3vVZNyIek/7CWk5gB27sGhBGUJ2eQWUxJv6C0 bv2p5YddSDVR/PHQRhhhq6gVEoY9GXRl/3oMSkND8rz9x21/FCKej6/i3 mmS+93IC9YAkhCK2LIeUM47xPTAfxQcstHLwaUE7kahyWg3Io1OtZtVdH TyC1bEeX81u8pw6Yg/yS83S7WI0+HW7NRh4UvZSwNkqmp+yssqqOdIfs3 yMPDN73bXaTj3bpgo9ZeXd98N5uS1WTvOFr/PM8YoPORTLiHY/D2SkWny YxbmwkgqkioW+7566kXVY78KkhcbbGurr0K4vYm4QRc2yvw4p/8VgZSkw Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10401"; a="59574133" X-IronPort-AV: E=Sophos;i="5.92,254,1650898800"; d="scan'208";a="59574133" Received: from mail-os0jpn01lp2111.outbound.protection.outlook.com (HELO JPN01-OS0-obe.outbound.protection.outlook.com) ([104.47.23.111]) by ob1.fujitsucc.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2022 13:02:43 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zm+iGDSIeSUJER6tTsJUgO4akBpWLLNvTmbrW2HuF2xJbHnXmpyJHEiCWf77PaZdknU8qaiBYr6afnlEcsRLkJwa7x6Ptc6cj3GDIjlioce/jCPhMwDtmUENPvLxXk1RTNmaf0bik4tx4Lz+EJgFZgwMGuTfyVu/s4sbcb8hy1BluuWNym6QHFaGjBdX3BoxRJKcTUGK4M+YBEJaBUj0LfN0K2hVBL0Md7B/HL2nGTSVfIAkq+Ob8ttiiL+cgLU3YRHrNAOt92G+eLvAR5jtjF1nF7MT6XaanrZSg3fosG0yhEaHouhNjgSwryNAXHCg+FOqO8QLSHIqv+zXxrNvsQ== 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=6lB+CDAkaqCasiKK+vbPq9uweogB+JwWab64Lbh9yZA=; b=QHXkq0jKcxzc5tudXPRS66rJyUq7N2pOTQl2VajfIqpMqqInFacvRxsFF00R4Cm7RY2xzuyZhfU7VgDgFa8Ge2XoJ/yA1rpxd/rUfW5Ndop5Jzd9Vwjy/CETzSwoj2afqz5I1n32CHiOhA3ZGxEVe+U2VeFIIENfOBS5TYqc57dXDPKcqZsNZPwBrsnKHxdjsTmQTwM86XdNuGmkI6e9fFEamqMSAuUDqAR9Q7wmGuRVaUbMCm3DwylKnq5C5vwUGnbiKBI2wTHHr6WWq6bFz2GEX8GtqrZF3XGcqSfr4o2SuBGuxupgZJsO3x265gibVC19ThyQeMh8+oX5FY0B0w== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fujitsu.onmicrosoft.com; s=selector2-fujitsu-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6lB+CDAkaqCasiKK+vbPq9uweogB+JwWab64Lbh9yZA=; b=akVv8XIdH99+wvp3KTfMPAhfOlgxnMR3N6A6D6wteOzapPm7EpyJ0HiqindGgoxuwvjWNwcbijWaaw2Ws+hctWOhIOygTYbSjAcRqm/mSHjW2sLv78faRbcB2oKJ+LsET8od8aR/4ONl0nJb9MAHyB8MjXgX33hrTFwssFduZTw= Received: from OS3PR01MB9499.jpnprd01.prod.outlook.com (2603:1096:604:1c8::5) by TYWPR01MB10346.jpnprd01.prod.outlook.com (2603:1096:400:24a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.16; Fri, 8 Jul 2022 04:02:37 +0000 Received: from OS3PR01MB9499.jpnprd01.prod.outlook.com ([fe80::d8d2:d66f:2f3:846c]) by OS3PR01MB9499.jpnprd01.prod.outlook.com ([fe80::d8d2:d66f:2f3:846c%7]) with mapi id 15.20.5395.022; Fri, 8 Jul 2022 04:02:37 +0000 From: "yangx.jy@fujitsu.com" To: "linux-rdma@vger.kernel.org" CC: "leon@kernel.org" , "jgg@ziepe.ca" , "rpearsonhpe@gmail.com" , "zyjzyj2000@gmail.com" , "lizhijian@fujitsu.com" , "yangx.jy@fujitsu.com" Subject: [RESEND PATCH v5 2/2] RDMA/rxe: Add RDMA Atomic Write attribute for rxe device Thread-Topic: [RESEND PATCH v5 2/2] RDMA/rxe: Add RDMA Atomic Write attribute for rxe device Thread-Index: AQHYkn+Phr1iqUOipUmEY8beoYYcaA== Date: Fri, 8 Jul 2022 04:02:37 +0000 Message-ID: <20220708040228.6703-3-yangx.jy@fujitsu.com> References: <20220708040228.6703-1-yangx.jy@fujitsu.com> In-Reply-To: <20220708040228.6703-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-office365-filtering-correlation-id: ec356f3c-1ecf-4e01-3a4d-08da6096b1e2 x-ms-traffictypediagnostic: TYWPR01MB10346:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: c6cclMjIOsKhKyo+b4exDy+A/ljVoTmnODWjNiR7MH/aJTNgJSd9n3oH/YlMJywt7O7RgwYi6DyYLcNA0flzoMh8S/gRbo3Ob1Z0m9ROL0X0vNSqzQkUsmt3VtptPYERZWMJ+egl1vOw2cXwxKs4VNY/gsGB+oTGAgj9Xy7Hvw4/FrDxFQwjaYiLXEu0k4MfVleZyubnG99Gyqa4882MoJuylKuQQYg3LwriVgpgghYXorn16PBL9Tv0i8esSqB9R4CgPoG3OAYMcdUPF4E+54wzHez9IwuNhrPceQNS1e5Ggqu4JjqZTqZxQxzJYUnpz4cTxHBWrd436qacwrjoe3JruFJQpnR2vqfBCebYqhGY8iFO2sFR7tpa5Q8x81azQiBLTcKa50THdKjc5UdcOYHYRBtdAq10ks9ASJYXWgFGdxsKPWRDrevbnlhMLN5xURDOSOoyjORQ5ltc0MzWcbqW0pwVXO0M1IAp5qvzCbWBOPqnTfWhpkVxtIPOAvWXfVw2cWG7h7Ed9EAU/O/95Y9UP79WZeZoXTgjvLzveGEpTNAHLv4o0rFct7+9jxLEmjqug+qpQfWsvPSCsm0zsHdZrQlC+r+gKKEUCxeFg0V3HqT9nwlH0CkWskhHn9r60XOgFNf3NNQGwMAIOHXJTj8TmQowJSUMbCtrR4WdCn/ybCmqzcmFdernzCb17aAuF1GNGGgDWb/VgyF4yRdBya+B7Pn3cs93+Ich49Rl5JcXptUp2UwFfB1naVZtLL7Iys0OWYPnmNEmGxNMdd0yw6A1AOnEQRyVVTEOkipeyQztJzv8aC1tYNfl0UTfraqC 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:(13230016)(4636009)(376002)(346002)(396003)(136003)(39860400002)(366004)(107886003)(38070700005)(6512007)(8676002)(316002)(1076003)(54906003)(186003)(6916009)(4326008)(2616005)(36756003)(5660300002)(41300700001)(6506007)(478600001)(26005)(91956017)(6486002)(82960400001)(66946007)(66556008)(86362001)(2906002)(71200400001)(122000001)(8936002)(66446008)(76116006)(66476007)(64756008)(85182001)(38100700002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?eucgb2312_cn?b?VStZVDVjMWNsbnFZYnNiZUtS?= =?eucgb2312_cn?b?d2pJT2dqSDh0bVZhTlQ0anRsNHFmcjY0dVJ3a1g3OWJyZGZibWRBalFwQXIwZmkw?= =?eucgb2312_cn?b?K2F0S2Q0eklyVU56eUhrTkFsMmszd1VIaWNEQW8vUWN3U3JvOVlSZjhnd0NsSURn?= =?eucgb2312_cn?b?UHNteE82WEE0bHlaSUF1VzlLNHVwSFFITDlxY1ZHeE5PVUZBK2tkVDFOREZGcFdQ?= =?eucgb2312_cn?b?VUdNR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n?b?bEZZaDBaTGFOZ2FhRTNvQnQ5ajVYUWJPMDVLQnMycW9YZjNkdnpsMmZLV1o2VkZE?= =?eucgb2312_cn?b?TnR2Vkowc3JHS2lWaXBYWnRxZ1BoeUZDVkkzN2dhSExha0QzcERmeGhZS1phMFlW?= =?eucgb2312_cn?b?TklxR045ZlRrUlhhQnAzRzJvaXByVWZXSXJweHJxaEZwZ0pUQUxGNVhNTUFadDNo?= =?eucgb2312_cn?b?eFFRUis3VGlCOVdRVG5BS1cvWjJHenVzL1J1MlFQY3JsRTdRT2kvdndOalZKUUcv?= =?eucgb2312_cn?b?OFNSSzR0dDJrcHd0b1VXZC9GeEE9PQ==?= 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: ec356f3c-1ecf-4e01-3a4d-08da6096b1e2 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jul 2022 04:02:37.1475 (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: K8UeMxNj4ryCvnjyb2NvQHFNLIz/xhSvalR6bFJ0OeaQMMiTMl64U8YaI/ATePr05IgZRwhjEy4OL2qCMLfUjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10346 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org The attribute shows that rxe device supports RDMA Atomic Write operation. Signed-off-by: Xiao Yang --- drivers/infiniband/sw/rxe/rxe_param.h | 5 +++++ include/rdma/ib_verbs.h | 1 + include/uapi/rdma/ib_user_verbs.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/drivers/infiniband/sw/rxe/rxe_param.h b/drivers/infiniband/sw/rxe/rxe_param.h index 568a7cbd13d4..05796f4007cb 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, diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 7834285c8498..a519c2ff949f 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 { diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h index 175ade79e358..4a7dbabf1792 100644 --- a/include/uapi/rdma/ib_user_verbs.h +++ b/include/uapi/rdma/ib_user_verbs.h @@ -1333,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 {