Message ID | 20220704060806.1622849-3-lizhijian@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 669D5CCA47F for <linux-rdma@archiver.kernel.org>; Mon, 4 Jul 2022 06:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229499AbiGDGBG (ORCPT <rfc822;linux-rdma@archiver.kernel.org>); Mon, 4 Jul 2022 02:01:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbiGDGBF (ORCPT <rfc822;linux-rdma@vger.kernel.org>); Mon, 4 Jul 2022 02:01:05 -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 B1CD56433 for <linux-rdma@vger.kernel.org>; Sun, 3 Jul 2022 23:01:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1656914466; x=1688450466; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=cJgZQhIP6MPcOU4k1L03TGgHtegNLKWOHb0Lb/G3AAI=; b=iBDbtPVKOHVZATKI86Ad+sZqX//vY7lSlB01duUFiZI2nXxHsYbDbzKF ELMbsVLiGI1YqZEaqP+KSYntDKiARpTG2V4kGB5KBlcNO5il0xceDI1cL z5wEPxbA4MPXr0DKMqedbrAKuTzcW5rK4DfVtMd4pHv4W2z7SDg2EsGqX yFm3C3WOE3ULeIrUkCBID2zB3OkMZgDkBXIccwVEMXC0OQK7asaba+5Az rdWQOGp0CXgrbJpkORwJJ0I7LdIBBEADwhOtdGC0h/km0oVhTnDHgAAiq XJlxASMYKFTaYgkG+VZVkVG+BiiGSnkcckzM3Tf558HYIo3WTMo8iRzDI Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10397"; a="60952365" X-IronPort-AV: E=Sophos;i="5.92,243,1650898800"; d="scan'208";a="60952365" 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:01:03 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H/yYa3sDGJ6L8F2z19BNxeVAozyxwD3bC/ofRqv3J98lJWCDH/7dcDmBQ3lxiRlGEtgmyTgVEWeukPIqEINnIx/9Hr7YrmbzYvNc8eB2ZSYj3+73CjR1bmQYwJZNTq7TJs47IeVkbt1ln84Wyo5+Re8P2d62oJDrCDVUydbtn8gEMAb2HsyvfhVCf2GnnmvoGWx2dDIoWSTSgH8LJndu5tq2gCsPps79RodC4F4O3Nl9M6l9XK7YZ5B8dpUTVvczXf5a5xrj7wwG07RN+AzQhEPi6geP8RSRzz6lS8UTslGIslXDOoDIh2c4Cb1eWgG+5Qd52f7vXhFEk5ZhMXNy0A== 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=cJgZQhIP6MPcOU4k1L03TGgHtegNLKWOHb0Lb/G3AAI=; b=S1Dgu1cNRgIpsgBiOOZi0lJFPAGfoS5OewuWMDvdcuBKFqq7gYv+yE/Kq0jOwhw2zq5shPnFh3HX1/mb3M1Ofz0dBWOKq9OQ6Kt8n7anuWDXdbjhT4mGjq7Z0oXZD5sKnX0mjk3qzGo0/w278kiFmAl+iWsPi5zQMtf9HXpyYXFUO2cO6xMk5bfb7YrTr06Zhocur8CFpbS9ngVatO40sIVqi16MUq0mizNJTSlL9ryanEfxnvhS5wnLUFylEVQyDZYatElgNFTBSE/PXqM8dYx+4c0m/3KP8BAt1sO9XTCa2LgoxS1HzwN94Uy2f14/VXGb5Ox40ha7hlvFoVbXgQ== 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=cJgZQhIP6MPcOU4k1L03TGgHtegNLKWOHb0Lb/G3AAI=; b=X28ABmrcApDLqxqBGAHp4RsLBe/bphKR02pR17wx1DvRKbeCesD9ggvJE6LTmGk9kz6sxbJjnDqVSikPzigcrtmHahYp4iHwSc8Iz+7G5+koioICQIhjKSi+hcHQfH2wQUU4ZqKXEFXVtG/EKRzj2VrvOWoiPQN4zMMQTk14E3s= 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:55 +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:55 +0000 From: "lizhijian@fujitsu.com" <lizhijian@fujitsu.com> To: Yanjun Zhu <yanjun.zhu@linux.dev>, Jason Gunthorpe <jgg@ziepe.ca>, Haakon Bugge <haakon.bugge@oracle.com>, "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>, Bob Pearson <rpearsonhpe@gmail.com> CC: Cheng Xu <chengyou@linux.alibaba.com>, "lizhijian@fujitsu.com" <lizhijian@fujitsu.com> Subject: [PATCH v5 2/4] RDMA/rxe: Generate error completion for error requester QP state Thread-Topic: [PATCH v5 2/4] RDMA/rxe: Generate error completion for error requester QP state Thread-Index: AQHYj2tsunb57pWpjEaH7gsJl9i/sQ== Date: Mon, 4 Jul 2022 06:00:55 +0000 Message-ID: <20220704060806.1622849-3-lizhijian@fujitsu.com> References: <20220704060806.1622849-1-lizhijian@fujitsu.com> In-Reply-To: <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: 1d7111f2-c0c4-4c91-24a5-08da5d828f45 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: M+odvSh1i8Rpzed6JA9rabnEeKwVkXIVmHirVx8LqId2k2umRr3dGh2lHz8oMJcCjiwkpEzE3YU8Se9eLeetJeQ4fTz3fUG1kMicTuXSkjv1XZ6CoHVxikQ/5/I//lCEIavyAwzgXpXWPXSrXHj/2UITbkdvCvrN0TgFm1UiFZTkKNvjO0fIczmaHdUpQZf/pI7RUx3a7U/xTVdjztC//WW1hzy88dc38HEiJB2L1UFuSWrgc4N+e6yDNYZZYUTEx7usud9KgRE5CVRFAxrZjDYan73w3oXHbo3GzloX0gGxM07iqVn77FVjklo9qAzCWVdAWNxZ7DnACq8Z0JZi8ya6Za3YYQ5E2qndYlO5xHyfroZx62HyRBnKxffVbpWhPh6Ujdhh9a3thQOiOfFS5RjaU1XTmrRopSlQIDMJsxC17cKS/7Y1mqFwI2qgt7MP7Qlpqkjq730oIbpVg0KNCLEVRLlMZjPwfWOFP7cLq2ntcafzx+R7n4Zn25khrPeOhaBdCVDYWRf9rVm+exRm9AFvqmCNxuWXf2ZHFs/93TFLI1fA96DNGFfmApxjGYsPCIY1OarKtF5gvFf9OFViyBb109o7yaR2H/+rZ0rx9Qbsfhv+staHVSRVHMKBNECBYN9VtsuxZKhrBir4iksUTuRSfN9Hp/22zU2+OD46rI9DE5VqlF/Vfdw7gNpqrB/oJn4lyXggSbbgxgQJm8avScAHKOVE66De9/ea1JUmshjqpHKooO80GkBygLX9pAkbxlb5Waa47Kk1nt70UTcJLhU0khTUyEw8hIEv/M1AAh4GoYaNXKvub6IIu8szvV2N 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?UVZkZmVSZkE5TCtIYUhHK0tE?= =?eucgb2312_cn?b?WmVqWXlGWTRXVWNqb0JBaWxtZTEvMy8zUTF6Y0FRdVJmVkEvNVBYVHkzT25ESEN5?= =?eucgb2312_cn?b?Y080clJ2bTc1SkFpb1k4SGpqWXZiWEJ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0hHZllGb0pwNFpUeXkr?= =?eucgb2312_cn?b?YzJVZlNFaCs2eTNadmRmTUREdmswTDMweTU4eGtNbkZDN0hpeERiVElBRWxSUEdG?= =?eucgb2312_cn?b?bkVjMmx5QXNNWFJaN1ZtKzc4V0lSY1lxYktvSWd1ZVpHc0s3bnNrbUF1b3Y4UURM?= =?eucgb2312_cn?b?YzdVN0Z1UUVmaWJ6Mk9VYTNvRHN6UDVNNnBHTTZ0a2FleWtSbUowcHdHQzc4L1Fv?= =?eucgb2312_cn?b?NjhSZVFoN05TYktBYkd1Unh4VjhIUnVycGdlM3ZzMllCK25qM3RHS0pmOVVRQ1hL?= =?eucgb2312_cn?b?KzF0RHJyTVJNS2hKaHJDaUVTa1Bud2E5cE1GODF0KzBQZWM2cUQzWnd6cHFaSEFi?= =?eucgb2312_cn?b?UktYb1FXSVVPa1hjWW9NUitxa0E9PQ==?= 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: TYCPR01MB9305.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d7111f2-c0c4-4c91-24a5-08da5d828f45 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jul 2022 06:00:55.6995 (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: qEKS3TTMp6KYw+hz9H6B4M4GLM+RG0QjAY7T+uo9riLhxm+H47hORIGydAWV2GoLEkbatzduqeuLLTUVRKPIrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR01MB1753 Precedence: bulk List-ID: <linux-rdma.vger.kernel.org> X-Mailing-List: linux-rdma@vger.kernel.org |
Series |
RDMA/rxe: Fix no completion event issue
|
expand
|
diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c index 4ffc4ebd6e28..6d2742997e1b 100644 --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -610,9 +610,20 @@ int rxe_requester(void *arg) return -EAGAIN; next_wqe: - if (unlikely(!qp->valid || qp->req.state == QP_STATE_ERROR)) + if (unlikely(!qp->valid)) goto exit; + if (unlikely(qp->req.state == QP_STATE_ERROR)) { + wqe = req_next_wqe(qp); + if (wqe) + /* + * Generate an error completion for error qp state + */ + goto err; + else + goto exit; + } + if (unlikely(qp->req.state == QP_STATE_RESET)) { qp->req.wqe_index = queue_get_consumer(q, QUEUE_TYPE_FROM_CLIENT);
As per IBTA specification, all subsequent WQEs while QP is in error state should be completed with a flush error. Here we check QP_STATE_ERROR after req_next_wqe() so that rxe_completer() has chance to be called where it will set CQ state to FLUSH ERROR and the completion can associate with its WQE. Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> --- V5: parentheses issue # Cheng Xu V4: check QP ERROR before QP RESET # Bob V3: unlikely() optimization # Cheng Xu <chengyou@linux.alibaba.com> update commit log # Haakon Bugge <haakon.bugge@oracle.com> --- drivers/infiniband/sw/rxe/rxe_req.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)