From patchwork Mon Jul 4 06:00:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Zhijian X-Patchwork-Id: 12904729 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 145FFC433EF for ; Mon, 4 Jul 2022 06:01:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229545AbiGDGBF (ORCPT ); Mon, 4 Jul 2022 02:01:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbiGDGBE (ORCPT ); Mon, 4 Jul 2022 02:01:04 -0400 Received: from esa18.fujitsucc.c3s2.iphmx.com (esa18.fujitsucc.c3s2.iphmx.com [216.71.158.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E181662F1 for ; Sun, 3 Jul 2022 23:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1656914463; x=1688450463; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=ATR+F+Xywgyhac5gAy2Q2mNV2LwvAQP6rGOwnlhjDGc=; b=uElSMF0ENaSh5jV99j+shoIDhpon6ebb6EqevYjFymwsnbKgAZOB+9e3 yCCii97VgIiFME0MhilRpsaglRUx7zXkC2h1cxbNXpYpVwxOeVQVzIoGb fG/AytrIpdLLCFY8Oa5v+ZAyUlni4myfSqOFE4UEJPrZDp5NCXl2xtj6S 280b5yFz8WX/O4GkAahELiFCtXjxiscTmhXd91O712MjeP4TmFJ+OukxN Pw9lTGAiilE99fiqcPrVJhlKopUA5H4SzrA7mfyFMPCd0fC3uQp0gGge3 FCx6B3hOcGtXoNCPcOHaqGPDwrysf1cYnVnseEjlU3IXXTeBx54PyjF7T w==; X-IronPort-AV: E=McAfee;i="6400,9594,10397"; a="60952356" X-IronPort-AV: E=Sophos;i="5.92,243,1650898800"; d="scan'208";a="60952356" Received: from mail-tycjpn01lp2169.outbound.protection.outlook.com (HELO JPN01-TYC-obe.outbound.protection.outlook.com) ([104.47.23.169]) by ob1.fujitsucc.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2022 15:00:59 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SnYQWaAkOiKSkRU/1/Zf5hblJfSWgH9YszV3HzyrV4PxeBRRMi79hvtsUIFdB7AiyPdK8aSnairhF7Pi0P/XLu/QfQGe5VG/uWFN1oUDOQ7TNtGuHpHHZY5Gh+BhZZHgLGiw1MPYxbcB6+xnZVMVYRYrgIoUOSin13Gp4+79D/lBMvHPAlGcftSaJeySPgUxG3wKfbyhbTPENrwTCQYEe6rGl8zfBAc+qm7we1B2HhwXR0WNu5Djs1B5hbdJWOs3MygYX7Ves7jPRTMts9EDvfWLxbel72iLdg7PWZCymOaV+/ld8c80GSWpMhpVkBbOAGE4EcWM1mScPlkjrnJdFw== 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=ATR+F+Xywgyhac5gAy2Q2mNV2LwvAQP6rGOwnlhjDGc=; b=BTRqw8nt5BG79uktPiKqe04RhM8YQnFPoo5yZPXHnnbPgGTF0QaoyVsOB2L+mW4F5QnY1azHeMBY5FUwbFNG97I6N1rb8+omMBdYdUoaiztpybuPrpfwBvBC1JOyOJoUXFOm5lHzAQw6hygvdxBnumr5+JSzUlxcEMHbP+ytb98dppv1eagbZ6dITJIPSUX92a+gmUnZBwPvpggN1NxKSXIqd4S//zpaZMwbvWj9pkIrSeWKoYBJRvwZoG78zsFuAU73Z+ORdY+wUi9q25HRt/G5TZ6CFuBWagw4JN0vCtHyohUoPBTW19VynPPMYP7ihOLvXi2i58zbb8Gawj+7YA== 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=ATR+F+Xywgyhac5gAy2Q2mNV2LwvAQP6rGOwnlhjDGc=; b=GhAA+O7CT1zgUJefP2n9DHjP6k5QTeqalMgLpyMyMUtTEysB0vaZBDuNP7rFmanTfJDrNtE38R0adBcNvlZJjTTjmvUbtSEwkycVn9JneQgFGcF19dRgygbbLe6b9twB5MlpHreQ+wMsPZeXPOxAMWocYQutwWykhuz4ey54y6Y= Received: from TYCPR01MB9305.jpnprd01.prod.outlook.com (2603:1096:400:196::10) by TY1PR01MB1753.jpnprd01.prod.outlook.com (2603:1096:403:1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.18; Mon, 4 Jul 2022 06:00:54 +0000 Received: from TYCPR01MB9305.jpnprd01.prod.outlook.com ([fe80::8d7a:baa8:3b18:cd93]) by TYCPR01MB9305.jpnprd01.prod.outlook.com ([fe80::8d7a:baa8:3b18:cd93%6]) with mapi id 15.20.5395.020; Mon, 4 Jul 2022 06:00:54 +0000 From: "lizhijian@fujitsu.com" To: Yanjun Zhu , Jason Gunthorpe , Haakon Bugge , "linux-rdma@vger.kernel.org" , Bob Pearson CC: Cheng Xu , "lizhijian@fujitsu.com" Subject: [PATCH v5 0/4] RDMA/rxe: Fix no completion event issue Thread-Topic: [PATCH v5 0/4] RDMA/rxe: Fix no completion event issue Thread-Index: AQHYj2tsVqLq8qnUGEa0XJOwJo3ZVw== Date: Mon, 4 Jul 2022 06:00:54 +0000 Message-ID: <20220704060806.1622849-1-lizhijian@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.31.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: b8699d87-59e8-4fe4-7a59-08da5d828eb1 x-ms-traffictypediagnostic: TY1PR01MB1753:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: V3hc/GdgSKkJa+W4g92Fs/U3l8LIQTK2CHyRdO+LQlOob4tnO5/mi7TiT6r2H+grMCZirimOTbyTZjRRjfKFVWPHWBi1wiLl/7DjvlvUP9aFT+8kL16jYx9G99g//JpGNU+RlIRKtnhojLtnNd6JGv1gQww7veClmoCB5KH8YAb6vrElxmLrR32R4pHD/nvaBC7CZAmqPtRCPHZU36qJNhHOjpi1y45Ad9I8iWo6jvqNcpAj/Rf5dF8J2TuexQle05F+gz5e+buNeVrBQaDV+U3GMPI6AwCeEg9dhPNyMuvjDUxXP54ASl2gEwegDBx+fdqhntWmFktcRN6rDdnBIAaxfUwzNpPaISoUkfRNMIDPf6stTuo5v6QPeOHpKpENYBzbQ7BYr/yayHlROc61Xo8UuwZr4LlfJf0KV30JLpjrxKCrxYZ6m57xTwtBDhfbacz4Q+IZ+dED4BTuyqetEJGc5v9n4KWDcUcBfrs3a0Q5KUu2BgNp7f/gqN7H4xG54xAPhMCgXawAh1KcTxS6oXmxUYLLKOfBptdMz7Pzt/ba7/QyZhxGeIJiQI4gyfNa2qlotpwkkvyoAyTQwcgpSTZWgRHd5JVRTGG/K7wSn9WRuAWn6OOp2byUuC04Ce9Gkn63WUB2nj8ZJp3grP3In9SR+31jXpzTIau2wd9FLQch5sQnHxki8nVmWBv8BiM3D8zJEAcK5JYky9OM0Hl+MMZ4H42VT+3c1drzB8UFg8oYBZO9XBrv1TKXNtUg4RsXd8MaGocIEKVYhd4NlZ/iZJM1ZsqxGrbUf74v4zXYvsRLMQEMvVEkYwR0BB3QtBr1 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB9305.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(39860400002)(346002)(136003)(376002)(366004)(396003)(2616005)(107886003)(186003)(1076003)(38070700005)(38100700002)(64756008)(36756003)(71200400001)(8676002)(66446008)(316002)(66476007)(66946007)(76116006)(110136005)(66556008)(83380400001)(85182001)(91956017)(54906003)(4326008)(5660300002)(6512007)(6506007)(478600001)(6486002)(8936002)(82960400001)(122000001)(86362001)(41300700001)(26005)(2906002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?eucgb2312_cn?b?dUJldjRsNU1NVklQbnF5WVRq?= =?eucgb2312_cn?b?OWpBdkc4VDlVLzV2VDRuSkpMQ0NQTGhtRThIRWs2cE1MVEtJUk44d0ZvVitpWm9i?= =?eucgb2312_cn?b?MTBUam44SUNHUklKVndmMlRoVnhEL1c5ZXBaWmpXV3hZdWxsaHNEaHRhTER1UVR0?= =?eucgb2312_cn?b?eGQwbDVRV2JqbDVZbFhDcFAraFhZMEY0OVF5a2V0REdFMkIxVU1uWXBLL3FqN1BD?= =?eucgb2312_cn?b?bVRLY1kwK3JyVjNxZUpWeGZCelZWZVNLODhQVitFUlg3MTZ5aUNOVDdqNEtidmFy?= =?eucgb2312_cn?b?ZHBIeWNKcWFjMUpuVGtZT0Z5SGZHOG1tQk05N2N4NHVUdTJsUE9wVXBIbDNuW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b2312_cn?b?OG9TNWZkWnl1WlZ3M0NYZWplN3YxOUNvdWdiRTFpWjkzQWlLWW9HbW82aXRHWVo5?= =?eucgb2312_cn?b?aVdiY1RQZUlyWFJuYlV4S0dTVzJsOXMrYWtkenM2UEhKSnpzZ2J5Q0YvSS9UK1ds?= =?eucgb2312_cn?b?S21xYzB4Uzl4Si82aFMwU1JaYXc9PQ==?= MIME-Version: 1.0 X-OriginatorOrg: fujitsu.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB9305.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8699d87-59e8-4fe4-7a59-08da5d828eb1 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jul 2022 06:00:54.6849 (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: nvp7w5qudbjCrUWg5ZdbD+kXUiIXQrR9GpDzpWotwKbLqFmSPdtBdKnrZ/6oHNVI88E+CznRa/PcXtaGrDdd+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR01MB1753 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org It's observed that no more completion occurs after a few incorrect posts. Actually, it will block the polling. we can easily reproduce it by the below pattern. a. post correct RDMA_WRITE b. poll completion event while true { c. post incorrect RDMA_WRITE(wrong rkey for example) d. poll completion event <<<< block after 2 incorrect RDMA_WRITE posts } V4 add new patch from Bob where it make requester stop executing qp operation as soon as possible. Both blktests and pyverbs tests are passed fine. Bob Pearson (1): RDMA/rxe: Split qp state for requester and completer Li Zhijian (3): RDMA/rxe: Update wqe_index for each wqe error completion RDMA/rxe: Generate error completion for error requester QP state RDMA/rxe: Fix typo in comment drivers/infiniband/sw/rxe/rxe_comp.c | 6 +++--- drivers/infiniband/sw/rxe/rxe_qp.c | 5 +++++ drivers/infiniband/sw/rxe/rxe_req.c | 16 +++++++++++++++- drivers/infiniband/sw/rxe/rxe_task.c | 2 +- drivers/infiniband/sw/rxe/rxe_verbs.h | 1 + 5 files changed, 25 insertions(+), 5 deletions(-) Signed-off-by: Li Zhijian