Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3984574pxb; Mon, 4 Oct 2021 14:26:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzJ9Krz/cabzLBjgjiZWcm2GPeLOoJ8QFaZ49cO4yI8ElGtV0+3HB3SpVnFu9zDTwy0ivd X-Received: by 2002:a05:6402:42d4:: with SMTP id i20mr21021251edc.348.1633382765592; Mon, 04 Oct 2021 14:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633382765; cv=none; d=google.com; s=arc-20160816; b=VphwyAYsLILicNbD+Onm1DJGWah1j3lV3F2Ow8qYXbquDkxv5orzXjzIGGHtDLiDV7 LI3npn3kJZWg57LVHi2n+mvJXUuk0T2lVSTPGTAlWzSK7nJS6MWedXIxV84wHtO4euWA LS7OEgUVRwRi8dKux5IS02b0HDuZ4SOuQYLMmW5JvJQHHsE5BUzPJCUNh+zdMB6Rn/5C xAC3dQ9QqxX0+dCVAS+uwsr0AC2OjNsv5x+3PYI1VVtnIxXcPRMjoJ0K4nL9E78dJWHt +gPvNGp5kefA5NGZ6EWISLcTDBIFEYWfJKbBk31v7v17cEMB58+DocqJ70kS08eFRRbG 6bDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Jf4TJIHjjTP79IyJcDCC1RruuyRvvDPKu1wll8FByJA=; b=t7QjxlVsYnMBrR5VDDCS197zdrZi3t5Rs5wdJIQRoKF/aDZnkYZMXzV5XZtAGAJSxM VByymLixO7vwUSa7dZeGKhIhaQOPvXAf6//ODr6lvrzVPoibZn1GGVDRE4ux9AgJ/7FM SCkcItm5MH+mko0yzZ72soI13CpnklNw3yNcUxZEQ3kfAFGxgvRWFXc7eWTk90YCxpQv U31p4K+00sjZw5prx+XFuV5z3idR7i7DvXoRuKFzalSrR8p1y3lWiIw7h3nx/DUw/gHZ Jq7DkZqrsqdcW99XUbxoQJx5vzRfDnVuDxWxyXRb8cC9iAyHF4niO7adWLBlP5j/OQgu If9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l35JKP5y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dz15si170643edb.607.2021.10.04.14.25.42; Mon, 04 Oct 2021 14:26:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l35JKP5y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237627AbhJDNgH (ORCPT + 99 others); Mon, 4 Oct 2021 09:36:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:48738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234756AbhJDNdt (ORCPT ); Mon, 4 Oct 2021 09:33:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9A4D46322C; Mon, 4 Oct 2021 13:15:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633353326; bh=eEGquIZV9LhV62znlXQeqkbUGi2dSA9idNNBdPQyaGQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l35JKP5yX6hUdaXj2SwioRHslMi4JFwFul+ChUdcAXn3dkwf+cmeGUc9+9Rk/qnKq zcQRJJY9NXyUIa1Lx/+dejaLmJSD2fuGmUEyvHrMbd9V1kAxg7y3wF5aqr+A+Xza6Q XqUVbQcCyl67UlQOE1f1hjl7De4gXhsK9Mp5Bw5k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sindhu Devale , Shiraz Saleem , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.14 084/172] RDMA/irdma: Report correct WC error when transport retry counter is exceeded Date: Mon, 4 Oct 2021 14:52:14 +0200 Message-Id: <20211004125047.700969754@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004125044.945314266@linuxfoundation.org> References: <20211004125044.945314266@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sindhu Devale [ Upstream commit d3bdcd59633907ee306057b6bb70f06dce47dddc ] When the retry counter exceeds, as the remote QP didn't send any Ack or Nack an asynchronous event (AE) for too many retries is generated. Add code to handle the AE and set the correct IB WC error code IB_WC_RETRY_EXC_ERR. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Link: https://lore.kernel.org/r/20210916191222.824-4-shiraz.saleem@intel.com Signed-off-by: Sindhu Devale Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/irdma/hw.c | 3 +++ drivers/infiniband/hw/irdma/user.h | 1 + drivers/infiniband/hw/irdma/verbs.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c index 33c06a3a4f63..cb9a8e24e3b7 100644 --- a/drivers/infiniband/hw/irdma/hw.c +++ b/drivers/infiniband/hw/irdma/hw.c @@ -176,6 +176,9 @@ static void irdma_set_flush_fields(struct irdma_sc_qp *qp, case IRDMA_AE_LLP_RECEIVED_MPA_CRC_ERROR: qp->flush_code = FLUSH_GENERAL_ERR; break; + case IRDMA_AE_LLP_TOO_MANY_RETRIES: + qp->flush_code = FLUSH_RETRY_EXC_ERR; + break; default: qp->flush_code = FLUSH_FATAL_ERR; break; diff --git a/drivers/infiniband/hw/irdma/user.h b/drivers/infiniband/hw/irdma/user.h index ff705f323233..267102d1049d 100644 --- a/drivers/infiniband/hw/irdma/user.h +++ b/drivers/infiniband/hw/irdma/user.h @@ -102,6 +102,7 @@ enum irdma_flush_opcode { FLUSH_REM_OP_ERR, FLUSH_LOC_LEN_ERR, FLUSH_FATAL_ERR, + FLUSH_RETRY_EXC_ERR, }; enum irdma_cmpl_status { diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index 6c3d28f744cb..3960c872ff76 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -3358,6 +3358,8 @@ static enum ib_wc_status irdma_flush_err_to_ib_wc_status(enum irdma_flush_opcode return IB_WC_LOC_LEN_ERR; case FLUSH_GENERAL_ERR: return IB_WC_WR_FLUSH_ERR; + case FLUSH_RETRY_EXC_ERR: + return IB_WC_RETRY_EXC_ERR; case FLUSH_FATAL_ERR: default: return IB_WC_FATAL_ERR; -- 2.33.0