From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8989FA051C for ; Tue, 11 Feb 2020 12:28:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 812351BE9E; Tue, 11 Feb 2020 12:28:15 +0100 (CET) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id DBCA51BF9F for ; Tue, 11 Feb 2020 12:28:13 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id t3so11897883wru.7 for ; Tue, 11 Feb 2020 03:28:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SN+MI32NRDDd+Si6P2xwgLWLIbguHM6EuPm+ARiVbGM=; b=NYuS93jQk2CzInkn5hPR1q4TGDVDudO1ZZhxVm7n8IselWzkmg5cXC9XQbTtUf6O5f VnbOSvRL7zHguWPJW5xHz/UJSx4Aaj1a3wdzZoQT08PCyQjLy3pcwS5Paat1s4tqth+a au7eqEvbjrlfpzdHVl1JqwaPIEsmhirEAQYxVu/2zJa/hsb/gv4xLkxFFVghNqzrLzfv jXxllCCHstL2dPRamcAQfIBMgryyNHQO1hQRFt7Zc/xnrGFBzopJB22kZXorGp5KSCnc ILu8ctdxfAA/e/CnfxxUQ4+MwWaCDX6o3SEPtKwzNSNoOKHpm4MYU9OO5BfDiBHBwwi+ Yojg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SN+MI32NRDDd+Si6P2xwgLWLIbguHM6EuPm+ARiVbGM=; b=ZbjtvROsCyx48SfVP8ojBwoenF9z1j1S7NcnQ8kA6JEYHE2g3o2vuXUglRIt3rxpny iNB1l8i3FKqi9N5K4VaMWYoJZZkYmU+B7+hMjftdA65pAwMK9VEeAPIdJB5mB/0RFHU9 mEhwcHf/2avp17kFCBGQoshnC7zz78htnvrOPRzne56wxNJMVIAu66hpGP7Ffp9IfGFG ia7PBZtxgy8Y1Xx1MZvYUNdiG4Uk1tyijzRbg0SjtcZNIvn8lWLOOv5jAoKgGfFb36e4 dLvIhUtjBkam6B6CnKUyl7Aytm3Zc6ua3TkRL/14dZi/4+eCzHZESH+OMX/i+NmopqXm 4ffA== X-Gm-Message-State: APjAAAUrzj9eGy5r3HdaPZkIRJfO+WGKoxdEw5vbjBuA+a3RD8CkhTIU msWywp9Bpcj0UoGDz5w7KmOdR9zjWpI= X-Google-Smtp-Source: APXvYqxBd3l3MueVc11P+/lR+RhqZQMdQaV843gfw8Vp+mLd8t+dl9IC/oHX5IojvZg1tBm9Wuvg4g== X-Received: by 2002:adf:f401:: with SMTP id g1mr7939936wro.129.1581420493423; Tue, 11 Feb 2020 03:28:13 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id w20sm3194129wmk.34.2020.02.11.03.28.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:28:12 -0800 (PST) From: luca.boccassi@gmail.com To: Xiaolong Ye Cc: Marcin Formela , Qi Zhang , Beilei Xing , dpdk stable Date: Tue, 11 Feb 2020 11:20:17 +0000 Message-Id: <20200211112216.3929-71-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/i40e/base: fix retrying logic' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/13/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From ecf41e681c14248a01a6f1bc043d1201ecd3b9d6 Mon Sep 17 00:00:00 2001 From: Xiaolong Ye Date: Mon, 13 Jan 2020 10:39:37 +0800 Subject: [PATCH] net/i40e/base: fix retrying logic [ upstream commit 50126939c66692d5b74922e12a9bf0dacfb6618b ] Fixed a bug where driver was breaking out of the loop and reporting an error without retrying first. Fixes: 466eec7d6b1a ("net/i40e/base: retry AQC to overcome IRCRead hangs") Signed-off-by: Marcin Formela Signed-off-by: Xiaolong Ye Acked-by: Qi Zhang Acked-by: Beilei Xing --- drivers/net/i40e/base/i40e_common.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 9d4330f35e..95b96f70f6 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1700,19 +1700,22 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw, status = i40e_asq_send_command(hw, &desc, abilities, abilities_size, cmd_details); - if (status != I40E_SUCCESS) - break; - - if (hw->aq.asq_last_status == I40E_AQ_RC_EIO) { + switch (hw->aq.asq_last_status) { + case I40E_AQ_RC_EIO: status = I40E_ERR_UNKNOWN_PHY; break; - } else if (hw->aq.asq_last_status == I40E_AQ_RC_EAGAIN) { + case I40E_AQ_RC_EAGAIN: i40e_msec_delay(1); total_delay++; status = I40E_ERR_TIMEOUT; + break; + /* also covers I40E_AQ_RC_OK */ + default: + break; } - } while ((hw->aq.asq_last_status != I40E_AQ_RC_OK) && - (total_delay < max_delay)); + + } while ((hw->aq.asq_last_status == I40E_AQ_RC_EAGAIN) && + (total_delay < max_delay)); if (status != I40E_SUCCESS) return status; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:41.465753297 +0000 +++ 0071-net-i40e-base-fix-retrying-logic.patch 2020-02-11 11:17:38.480002843 +0000 @@ -1,8 +1,10 @@ -From 50126939c66692d5b74922e12a9bf0dacfb6618b Mon Sep 17 00:00:00 2001 +From ecf41e681c14248a01a6f1bc043d1201ecd3b9d6 Mon Sep 17 00:00:00 2001 From: Xiaolong Ye Date: Mon, 13 Jan 2020 10:39:37 +0800 Subject: [PATCH] net/i40e/base: fix retrying logic +[ upstream commit 50126939c66692d5b74922e12a9bf0dacfb6618b ] + Fixed a bug where driver was breaking out of the loop and reporting an error without retrying first. @@ -17,10 +19,10 @@ 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c -index 4f87ec9fad..a37e70599d 100644 +index 9d4330f35e..95b96f70f6 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c -@@ -1714,19 +1714,22 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw, +@@ -1700,19 +1700,22 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw, status = i40e_asq_send_command(hw, &desc, abilities, abilities_size, cmd_details);