Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4483147ybx; Mon, 4 Nov 2019 14:10:41 -0800 (PST) X-Google-Smtp-Source: APXvYqzB6BnsHNCPdlIZCMLaJb4ibhDkv2Vs5w4lNfxebKA8BrLu3JVz0pI7ImKdpls//Z+jk8Ql X-Received: by 2002:a17:906:a44:: with SMTP id x4mr25859372ejf.64.1572905441122; Mon, 04 Nov 2019 14:10:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572905441; cv=none; d=google.com; s=arc-20160816; b=05XC6GD6QMDgHRz/OSkAlR41FF6hE/hPcI9VveBidH8rP3xmdRuOrUhkJF6GiVwa9i Qc+MPLzq82EoBDk94LaSFJgaBOEWsHy5cHXQRvVFDTS1vNCkn25+mj2/y6kkQ38YKXCC F330Dqo7TfWfWqYm0InfYaGNIkUmoByGRo5HuQSQ3c7UmqGiSPRMAPU802kb9J3UUrhU kTF+4qymQuOQ+WDgF9uNSuX3FW/Qanp4DPfwXXWCfc+Hp4mPKepN757tNUpvWKqg6n5l ERTca4UPCEBcfkdj8d9WL8/8jHNLnBdc2ror+3BZz/P1YshxlVVM0I8QM4fdCZQrf3XU bykg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Fo+0ZUVzgZG9vu2QT02/DM0WfCXWj7p8y8/jC0QEyfA=; b=b6+aEdkVbRHJARjLDgQfJmMQUqwi8aB2eFP4ZlrNn+3II9e3e3KoQGVAwVKVCynQCD VJ8lawhC5H89Pd0FHS334zmlemSZfwePYc6WLd0SGOW8kP7a1TPP8gispnSbpcyNXwDX QOKpcR4mgn/ir7rK9tFFEZ2D55aneOkbs30oB6Dt1BxQUPG3wdu3TOUx40sCX9KupDJ7 z6MvDhkitF1kuKuNb3/qhBlsklF9PNRLWggCDINeyTVxomVLg6egW80ldoKH9CGb/Hc4 dtoGI6U97s8W1Fk2qlyfXoZkoYveJGFI4AgRhBDaoBG4WpljT6LUc+XMqq2M2V9b3BiK Nq9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kahwR6lp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h12si11791302ejj.40.2019.11.04.14.10.17; Mon, 04 Nov 2019 14:10:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kahwR6lp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390459AbfKDWJq (ORCPT + 99 others); Mon, 4 Nov 2019 17:09:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:42884 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390005AbfKDWJo (ORCPT ); Mon, 4 Nov 2019 17:09:44 -0500 Received: from localhost (6.204-14-84.ripe.coltfrance.com [84.14.204.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 146E8205C9; Mon, 4 Nov 2019 22:09:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572905383; bh=4BXDrXI9xj1Zj4UQmnaTufcVaddUamXeSea8JUCcXZc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kahwR6lpVURSAd3f4MGOoKSkHjtVxlIhJ14xCt3jp9nrWQnOBpuOdxajXQ06tTekS uCumUAyZy5ANzlmzMz60rTSVPRH4vUlQlr2bU5qfisO8O1tymA7wVobsYuLJrH6yeI mNkHwr7G1wm+7OWKIi1IQ3mifhBLkMd8+DBxFMD8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mike Marciniszyn , Kaike Wan , Dennis Dalessandro , Doug Ledford Subject: [PATCH 5.3 126/163] IB/hfi1: Avoid excessive retry for TID RDMA READ request Date: Mon, 4 Nov 2019 22:45:16 +0100 Message-Id: <20191104212149.372726382@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104212140.046021995@linuxfoundation.org> References: <20191104212140.046021995@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kaike Wan commit 9ed5bd7d22241ad232fd3a5be404e83eb6cadc04 upstream. A TID RDMA READ request could be retried under one of the following conditions: - The RC retry timer expires; - A later TID RDMA READ RESP packet is received before the next expected one. For the latter, under normal conditions, the PSN in IB space is used for comparison. More specifically, the IB PSN in the incoming TID RDMA READ RESP packet is compared with the last IB PSN of a given TID RDMA READ request to determine if the request should be retried. This is similar to the retry logic for noraml RDMA READ request. However, if a TID RDMA READ RESP packet is lost due to congestion, header suppresion will be disabled and each incoming packet will raise an interrupt until the hardware flow is reloaded. Under this condition, each packet KDETH PSN will be checked by software against r_next_psn and a retry will be requested if the packet KDETH PSN is later than r_next_psn. Since each TID RDMA READ segment could have up to 64 packets and each TID RDMA READ request could have many segments, we could make far more retries under such conditions, and thus leading to RETRY_EXC_ERR status. This patch fixes the issue by removing the retry when the incoming packet KDETH PSN is later than r_next_psn. Instead, it resorts to RC timer and normal IB PSN comparison for any request retry. Fixes: 9905bf06e890 ("IB/hfi1: Add functions to receive TID RDMA READ response") Cc: Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/20191004204035.26542.41684.stgit@awfm-01.aw.intel.com Signed-off-by: Doug Ledford Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/hfi1/tid_rdma.c | 5 ----- 1 file changed, 5 deletions(-) --- a/drivers/infiniband/hw/hfi1/tid_rdma.c +++ b/drivers/infiniband/hw/hfi1/tid_rdma.c @@ -2728,11 +2728,6 @@ static bool handle_read_kdeth_eflags(str diff = cmp_psn(psn, flow->flow_state.r_next_psn); if (diff > 0) { - if (!(qp->r_flags & RVT_R_RDMAR_SEQ)) - restart_tid_rdma_read_req(rcd, - qp, - wqe); - /* Drop the packet.*/ goto s_unlock; } else if (diff < 0) {