diff mbox series

[1/6] net/hns3: modify max reset fail retry count

Message ID 1623551516-49635-2-git-send-email-humin29@huawei.com (mailing list archive)
State Accepted
Delegated to: Andrew Rybchenko
Headers show
Series bugfixes for hns3 PMD | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Min Hu (Connor) June 13, 2021, 2:31 a.m. UTC
From: HongBo Zheng <zhenghongbo3@huawei.com>

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 <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_intr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andrew Rybchenko June 14, 2021, 2:36 p.m. UTC | #1
On 6/13/21 5:31 AM, Min Hu (Connor) wrote:
> From: HongBo Zheng <zhenghongbo3@huawei.com>
>
> 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.

Drop "This patch", just "Modify ..."

> Fixes: 2790c6464725 ("net/hns3: support device reset")
> Cc: stable@dpdk.org
>
> Signed-off-by: HongBo Zheng <zhenghongbo3@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> ---
>   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;
diff mbox series

Patch

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;