From patchwork Sun Jun 13 02:31:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "humin (Q)" X-Patchwork-Id: 94147 X-Patchwork-Delegate: andrew.rybchenko@oktetlabs.ru Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0C8F6A0C47; Sun, 13 Jun 2021 04:32:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09E85410EB; Sun, 13 Jun 2021 04:32:26 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 55C254003F for ; Sun, 13 Jun 2021 04:32:23 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4G2dlH3XM5zWsT4 for ; Sun, 13 Jun 2021 10:27:23 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Sun, 13 Jun 2021 10:32:20 +0800 From: "Min Hu (Connor)" To: CC: Date: Sun, 13 Jun 2021 10:31:51 +0800 Message-ID: <1623551516-49635-2-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1623551516-49635-1-git-send-email-humin29@huawei.com> References: <1623551516-49635-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 1/6] net/hns3: modify max reset fail retry count X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: HongBo Zheng When the device is very busy, VF reset may have to be retried many times to succeed, leading to the current max reset fail retry count not enough. This patch modify max reset fail retry count to 30 to enhance the reliability of reset function. Fixes: 2790c6464725 ("net/hns3: support device reset") Cc: stable@dpdk.org Signed-off-by: HongBo Zheng Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_intr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c index 6bdb17f..0b307fd 100644 --- a/drivers/net/hns3/hns3_intr.c +++ b/drivers/net/hns3/hns3_intr.c @@ -2582,7 +2582,7 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels) static bool hns3_reset_err_handle(struct hns3_adapter *hns) { -#define MAX_RESET_FAIL_CNT 5 +#define MAX_RESET_FAIL_CNT 30 struct hns3_hw *hw = &hns->hw; @@ -2676,7 +2676,7 @@ hns3_reset_pre(struct hns3_adapter *hns) static int hns3_reset_post(struct hns3_adapter *hns) { -#define TIMEOUT_RETRIES_CNT 5 +#define TIMEOUT_RETRIES_CNT 30 struct hns3_hw *hw = &hns->hw; struct timeval tv_delta; struct timeval tv;