From patchwork Mon Mar 28 09:54:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 12793383 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 0C367C433EF for ; Mon, 28 Mar 2022 09:54:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237498AbiC1J4Z (ORCPT ); Mon, 28 Mar 2022 05:56:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240092AbiC1J4Y (ORCPT ); Mon, 28 Mar 2022 05:56:24 -0400 Received: from heian.cn.fujitsu.com (mail.cn.fujitsu.com [183.91.158.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7BE1D54BFD for ; Mon, 28 Mar 2022 02:54:42 -0700 (PDT) IronPort-Data: A9a23:15PaXqD5FmhtVhVW/8Xhw5YqxClBgxIJ4g17XOLfUVK70mtw0zdTm2pMWmyHO/2JM2f3eot+bdzloEkAsZ6Ax9UxeLYW3SszFioV86IpJjg4wn/YZnrUdouaJK5ex512huLocYZkHhcwmj/3auK79SMkjPnRLlbBILWs1h5ZFFYMpBgJ2UoLd94R2uaEsPDha++/kYqaT/73ZDdJ7wVJ3lc8sMpvnv/AUMPa41v0tnRmDRxCUcS3e3M9VPrzLonpR5f0rxU9IwK0ewrD5OnREmLx9BFrBM6nk6rgbwsBRbu60Qqm0yIQAvb9xEMZ4HFaPqUTbZLwbW9GgjOGj5Zz2f1DqJ6xVRw0eKbLnYzxVjEBSXomZ/0ep++vzX+X9Jb7I1f9W2H0zvx0F0YwPZUV0ulyCGBKs/cfLVglfxmFhf+whqC7V8Foh8I+PI/nMZ13knNvwhnfE/cqQJmFSKLPjfdc0TA2nMdmG+jfa8sQLzFoaXzoZxxJJ0dSEp47lc+2iXTlNT5VslSYoeww+We78eDb+NABK/KMIprTG5oTxR3e+wr7E63CKklyHLSiJfCtqxpAXtPyoB4= IronPort-HdrOrdr: A9a23:9DtrWKy+BZchizrlhJJ0KrPwEL1zdoMgy1knxilNoH1uA6ilfqWV8cjzuiWbtN9vYhsdcLy7WZVoIkmskKKdg7NhXotKNTOO0ASVxepZnOnfKlPbexHWx6p00KdMV+xEAsTsMF4St63HyTj9P9E+4NTvysyVuds= X-IronPort-AV: E=Sophos;i="5.88,333,1635177600"; d="scan'208";a="123028078" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 28 Mar 2022 17:54:42 +0800 Received: from G08CNEXMBPEKD06.g08.fujitsu.local (unknown [10.167.33.206]) by cn.fujitsu.com (Postfix) with ESMTP id 46A204D169FF; Mon, 28 Mar 2022 17:54:38 +0800 (CST) Received: from G08CNEXCHPEKD08.g08.fujitsu.local (10.167.33.83) by G08CNEXMBPEKD06.g08.fujitsu.local (10.167.33.206) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Mon, 28 Mar 2022 17:54:36 +0800 Received: from localhost.localdomain (10.167.215.54) by G08CNEXCHPEKD08.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Mon, 28 Mar 2022 17:54:39 +0800 From: Xiao Yang To: CC: , , , , Xiao Yang Subject: [PATCH] RDMA/rxe: Generate a completion on error after getting a wqe Date: Mon, 28 Mar 2022 17:54:36 +0800 Message-ID: <20220328095436.304063-1-yangx.jy@fujitsu.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-yoursite-MailScanner-ID: 46A204D169FF.A93FE X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Current rxe_requester() doesn't generate a completion on error after getting a wqe. Fix the issue by calling "goto err;" instead. Signed-off-by: Xiao Yang --- drivers/infiniband/sw/rxe/rxe_req.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c index ae5fbc79dd5c..6f8dd2b3b817 100644 --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -648,26 +648,26 @@ int rxe_requester(void *arg) psn_compare(qp->req.psn, (qp->comp.psn + RXE_MAX_UNACKED_PSNS)) > 0)) { qp->req.wait_psn = 1; - goto exit; + goto err; } /* Limit the number of inflight SKBs per QP */ if (unlikely(atomic_read(&qp->skb_out) > RXE_INFLIGHT_SKBS_PER_QP_HIGH)) { qp->need_req_skb = 1; - goto exit; + goto err; } opcode = next_opcode(qp, wqe, wqe->wr.opcode); if (unlikely(opcode < 0)) { wqe->status = IB_WC_LOC_QP_OP_ERR; - goto exit; + goto err; } mask = rxe_opcode[opcode].mask; if (unlikely(mask & RXE_READ_OR_ATOMIC_MASK)) { if (check_init_depth(qp, wqe)) - goto exit; + goto err; } mtu = get_mtu(qp);