Message ID | 20221015063648.52285-6-yangx.jy@fujitsu.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-rdma-owner@kernel.org> 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 <linux-rdma@archiver.kernel.org>; Sat, 15 Oct 2022 07:00:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229622AbiJOHAj (ORCPT <rfc822;linux-rdma@archiver.kernel.org>); 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 <rfc822;linux-rdma@vger.kernel.org>); 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 <linux-rdma@vger.kernel.org>; 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" <yangx.jy@fujitsu.com> To: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>, "jgg@nvidia.com" <jgg@nvidia.com>, "rpearsonhpe@gmail.com" <rpearsonhpe@gmail.com> CC: "leon@kernel.org" <leon@kernel.org>, "lizhijian@fujitsu.com" <lizhijian@fujitsu.com>, "y-goto@fujitsu.com" <y-goto@fujitsu.com>, "zyjzyj2000@gmail.com" <zyjzyj2000@gmail.com>, "yangx.jy@fujitsu.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)(375104004);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?eucgb2312_cn?b?YjV3Qi9Wa3Avdm5tcTA0dWE5?= =?eucgb2312_cn?b?dlhEY0Qxb3hLVmlzQXBvRWc4TFlQNzJQV2tmd0JtSnZGbzNFemtQdFFhaHhXeUlk?= =?eucgb2312_cn?b?R3d6amZmVEZ2OUd6NVJlZ1FhdFZMWTZuRlVIbW5lUmlVL09LOXlNdjBQZG0vdjRX?= =?eucgb2312_cn?b?Ry9aMXJLcXBlWTNHRmVTU2E0SHZidVNMMVJncVBCR1ljWVczTTV6VTRTVFkrdGdD?= =?eucgb2312_cn?b?REN1bGNIR2lvOWxuaHE1RndBVVRyc0F2YUlnQ2psTCs5YXgreHZZQ2VNYTlTUUhF?= =?eucgb2312_cn?b?anNrM0pUYkxqaTJSQmVhNWJwNFlZdXUrTERmamhTZGJ2Q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hcEhsdm4wdDkwK2tybW1a?= =?eucgb2312_cn?b?S1pTVUNIa05mamtQQXFaL0N2VHF0S2RyMElsQkJFN2c2Z0gvYjkyeDVyY0lwMkxs?= =?eucgb2312_cn?b?TDMwZHJ6SEsxS3ZTbE5KcTlCYW92WG41Zzc4QkV0ekRHYzhnWU1aZ3NuTnczb2xU?= =?eucgb2312_cn?b?cmRyZ1hXSGd6dkMybEhIc3dxUEE9PQ==?= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 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: <linux-rdma.vger.kernel.org> X-Mailing-List: linux-rdma@vger.kernel.org |
Series |
RDMA/rxe: Add atomic write operation
|
expand
|
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
Make requester process and send an atomic write request on RC service. Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com> --- drivers/infiniband/sw/rxe/rxe_req.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)