DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wenjun Wu <wenjun1.wu@intel.com>
To: dev@dpdk.org, beilei.xing@intel.com
Cc: Wenjun Wu <wenjun1.wu@intel.com>
Subject: [dpdk-dev] [PATCH v3] net/i40e: extend VF reset waiting time
Date: Thu, 29 Apr 2021 11:05:38 +0800	[thread overview]
Message-ID: <20210429030538.1092068-1-wenjun1.wu@intel.com> (raw)
In-Reply-To: <20210425020250.205597-1-wenjun1.wu@intel.com>

When starting VF, VF will issue reset command to PF, wait a fixed
amount of time, and assume VF reset is done on PF side. However,
compared with kernel PF, DPDK PF needs more time to setup. If we
run DPDK PF to support DPDK VF, the original delay wil not be
enough. When we first start VF after PF is launched, the execution
time of the statement info.msg_buf = rte_zmalloc("msg_buffer",
info.buf_len, 0); in the function i40e_dev_handle_aq_msg is more
than 200ms. It may cause VF start error.

This patch extend VF reset waiting time from 200ms to 500ms so that
VF can start normally when using DPDK PF and DPDK VF in most cases.

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>

---
v2: change the delay to 500ms because it can cover most cases.
v3: perfect the commit message.
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 3c258ba7cf..aeb6816b9f 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1236,7 +1236,7 @@ i40evf_reset_vf(struct rte_eth_dev *dev)
 	  * it to ACTIVE. In this duration, vf may not catch the moment that
 	  * COMPLETE is set. So, for vf, we'll try to wait a long time.
 	  */
-	rte_delay_ms(200);
+	rte_delay_ms(500);
 
 	ret = i40evf_check_vf_reset_done(dev);
 	if (ret) {
-- 
2.25.1


  parent reply	other threads:[~2021-04-29  3:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22  5:34 [dpdk-dev] [PATCH v1] " Wenjun Wu
2021-04-25  2:02 ` [dpdk-dev] [PATCH v2] " Wenjun Wu
2021-04-25  2:25   ` Zhang, Qi Z
2021-04-25  7:44   ` Zhou, JunX W
2021-04-28  9:30   ` Ferruh Yigit
2021-04-29  2:26     ` Wu, Wenjun1
2021-04-29  3:05   ` Wenjun Wu [this message]
2021-04-29  3:10     ` [dpdk-dev] [PATCH v4] " Wenjun Wu
2021-04-29  8:27       ` [dpdk-dev] [PATCH v5] " Wenjun Wu
2021-04-29 11:04         ` Zhang, Qi Z

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=20210429030538.1092068-1-wenjun1.wu@intel.com \
    --to=wenjun1.wu@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    /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).