netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hao Lan <lanhao@huawei.com>
To: <netdev@vger.kernel.org>
Cc: <yisen.zhuang@huawei.com>, <salil.mehta@huawei.com>,
	<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <lanhao@huawei.com>,
	<huangguangbin2@huawei.com>, <simon.horman@corigine.com>,
	<shaojijie@huawei.com>, <chenhao418@huawei.com>,
	<shenjian15@huawei.com>, <liuyonglong@huawei.com>,
	<wangjie125@huawei.com>, <yuanjilin@cdjrlc.com>,
	<cai.huoqing@linux.dev>, <xiujianfeng@huawei.com>,
	<tanhuazhong@huawei.com>
Subject: [PATCH net 3/4] net: hns3: fix reset delay time to avoid configuration timeout
Date: Fri, 12 May 2023 18:00:13 +0800	[thread overview]
Message-ID: <20230512100014.2522-4-lanhao@huawei.com> (raw)
In-Reply-To: <20230512100014.2522-1-lanhao@huawei.com>

From: Jie Wang <wangjie125@huawei.com>

Currently the hns3 vf function reset delays 5000ms before vf rebuild
process. In product applications, this delay is too long for application
configurations and causes configuration timeout.

According to the tests, 500ms delay is enough for reset process except PF
FLR. So this patch modifies delay to 500ms in these scenarios.

Fixes: 6988eb2a9b77 ("net: hns3: Add support to reset the enet/ring mgmt layer")
Signed-off-by: Jie Wang <wangjie125@huawei.com>
Signed-off-by: Hao Lan <lanhao@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
index f24046250341..dd08989a4c7c 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
@@ -1436,7 +1436,10 @@ static int hclgevf_reset_wait(struct hclgevf_dev *hdev)
 	 * might happen in case reset assertion was made by PF. Yes, this also
 	 * means we might end up waiting bit more even for VF reset.
 	 */
-	msleep(5000);
+	if (hdev->reset_type == HNAE3_VF_FULL_RESET)
+		msleep(5000);
+	else
+		msleep(500);
 
 	return 0;
 }
-- 
2.30.0


  parent reply	other threads:[~2023-05-12 10:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12 10:00 [PATCH net 0/4] net: hns3: There are some bugfixes for the HNS3 ethernet driver Hao Lan
2023-05-12 10:00 ` [PATCH net 1/4] net: hns3: fix output information incomplete for dumping tx queue info with debugfs Hao Lan
2023-05-12 10:00 ` [PATCH net 2/4] net: hns3: fix sending pfc frames after reset issue Hao Lan
2023-05-12 10:00 ` Hao Lan [this message]
2023-05-12 10:00 ` [PATCH net 4/4] net: hns3: fix reset timeout when enable full VF Hao Lan
2023-05-13 16:30 ` [PATCH net 0/4] net: hns3: There are some bugfixes for the HNS3 ethernet driver patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230512100014.2522-4-lanhao@huawei.com \
    --to=lanhao@huawei.com \
    --cc=cai.huoqing@linux.dev \
    --cc=chenhao418@huawei.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=huangguangbin2@huawei.com \
    --cc=kuba@kernel.org \
    --cc=liuyonglong@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=salil.mehta@huawei.com \
    --cc=shaojijie@huawei.com \
    --cc=shenjian15@huawei.com \
    --cc=simon.horman@corigine.com \
    --cc=tanhuazhong@huawei.com \
    --cc=wangjie125@huawei.com \
    --cc=xiujianfeng@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    --cc=yuanjilin@cdjrlc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).