DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] net/i40e: extend VF reset waiting time.
@ 2021-04-22  5:34 Wenjun Wu
  2021-04-25  2:02 ` [dpdk-dev] [PATCH v2] " Wenjun Wu
  0 siblings, 1 reply; 10+ messages in thread
From: Wenjun Wu @ 2021-04-22  5:34 UTC (permalink / raw)
  To: dev, beilei.xing; +Cc: Wenjun Wu

When resetting VF, VF will issue reset command to PF, wait a
fixed amount of time, and assume VF reset is done. However,
due to the change of dpdk related library content, the original
delay is not enough. When we use DPDK PF instead of kernel PF,
it may cause VF start error.

This patch extend VF reset waiting time from 200ms to 2s so that
VF can start normally when using DPDK PF and DPDK VF.

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
---
 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..13eab317f4 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(2000);
 
 	ret = i40evf_check_vf_reset_done(dev);
 	if (ret) {
-- 
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time
  2021-04-22  5:34 [dpdk-dev] [PATCH v1] net/i40e: extend VF reset waiting time Wenjun Wu
@ 2021-04-25  2:02 ` Wenjun Wu
  2021-04-25  2:25   ` Zhang, Qi Z
                     ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Wenjun Wu @ 2021-04-25  2:02 UTC (permalink / raw)
  To: dev, beilei.xing; +Cc: Wenjun Wu

When resetting VF, VF will issue reset command to PF, wait a
fixed amount of time, and assume VF reset is done. However,
due to the change of dpdk related library content, the original
delay is not enough. When we use DPDK PF instead of kernel PF,
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>
---
 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time
  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
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Zhang, Qi Z @ 2021-04-25  2:25 UTC (permalink / raw)
  To: Wu, Wenjun1, dev, Xing, Beilei; +Cc: Wu, Wenjun1



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wenjun Wu
> Sent: Sunday, April 25, 2021 10:03 AM
> To: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>
> Cc: Wu, Wenjun1 <wenjun1.wu@intel.com>
> Subject: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time
> 
> When resetting VF, VF will issue reset command to PF, wait a fixed amount of
> time, and assume VF reset is done. However, due to the change of dpdk
> related library content, the original delay is not enough. When we use DPDK
> PF instead of kernel PF, 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>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time
  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  3:05   ` [dpdk-dev] [PATCH v3] " Wenjun Wu
  3 siblings, 0 replies; 10+ messages in thread
From: Zhou, JunX W @ 2021-04-25  7:44 UTC (permalink / raw)
  To: Wu, Wenjun1, dev, Xing, Beilei; +Cc: Wu, Wenjun1

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wenjun Wu
> Sent: Sunday, April 25, 2021 10:03 AM
> To: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>
> Cc: Wu, Wenjun1 <wenjun1.wu@intel.com>
> Subject: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time


Tested-by: Zhou, Jun <junx.w.zhou@intel.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time
  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   ` [dpdk-dev] [PATCH v3] " Wenjun Wu
  3 siblings, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2021-04-28  9:30 UTC (permalink / raw)
  To: Wenjun Wu, dev, beilei.xing

On 4/25/2021 3:02 AM, Wenjun Wu wrote:
> When resetting VF, VF will issue reset command to PF, wait a
> fixed amount of time, and assume VF reset is done. However,
> due to the change of dpdk related library content, the original
> delay is not enough. When we use DPDK PF instead of kernel PF,
> it may cause VF start error.
> 

Hi Wenjun,

Can you please give details of the "the change of dpdk related library content"?
This can help to document the root cause of the problem.
And you can also add fixes tag for that change if it is appropriate.


> 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>
> ---
>  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) {
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time
  2021-04-28  9:30   ` Ferruh Yigit
@ 2021-04-29  2:26     ` Wu, Wenjun1
  0 siblings, 0 replies; 10+ messages in thread
From: Wu, Wenjun1 @ 2021-04-29  2:26 UTC (permalink / raw)
  To: Yigit, Ferruh, dev, Xing, Beilei

Hi Ferruh,

I realized there were some ambiguities. I will modify commit in the new patch.

Regards,
Wenjun

-----Original Message-----
From: Yigit, Ferruh <ferruh.yigit@intel.com> 
Sent: Wednesday, April 28, 2021 5:30 PM
To: Wu, Wenjun1 <wenjun1.wu@intel.com>; dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time

On 4/25/2021 3:02 AM, Wenjun Wu wrote:
> When resetting VF, VF will issue reset command to PF, wait a fixed 
> amount of time, and assume VF reset is done. However, due to the 
> change of dpdk related library content, the original delay is not 
> enough. When we use DPDK PF instead of kernel PF, it may cause VF 
> start error.
> 

Hi Wenjun,

Can you please give details of the "the change of dpdk related library content"?
This can help to document the root cause of the problem.
And you can also add fixes tag for that change if it is appropriate.


> 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>
> ---
>  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) {
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dpdk-dev] [PATCH v3] net/i40e: extend VF reset waiting time
  2021-04-25  2:02 ` [dpdk-dev] [PATCH v2] " Wenjun Wu
                     ` (2 preceding siblings ...)
  2021-04-28  9:30   ` Ferruh Yigit
@ 2021-04-29  3:05   ` Wenjun Wu
  2021-04-29  3:10     ` [dpdk-dev] [PATCH v4] " Wenjun Wu
  3 siblings, 1 reply; 10+ messages in thread
From: Wenjun Wu @ 2021-04-29  3:05 UTC (permalink / raw)
  To: dev, beilei.xing; +Cc: Wenjun Wu

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dpdk-dev] [PATCH v4] net/i40e: extend VF reset waiting time
  2021-04-29  3:05   ` [dpdk-dev] [PATCH v3] " Wenjun Wu
@ 2021-04-29  3:10     ` Wenjun Wu
  2021-04-29  8:27       ` [dpdk-dev] [PATCH v5] " Wenjun Wu
  0 siblings, 1 reply; 10+ messages in thread
From: Wenjun Wu @ 2021-04-29  3:10 UTC (permalink / raw)
  To: dev, beilei.xing; +Cc: Wenjun Wu

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 will 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.
v4: correct spelling mistakes.
---
 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dpdk-dev] [PATCH v5] net/i40e: extend VF reset waiting time
  2021-04-29  3:10     ` [dpdk-dev] [PATCH v4] " Wenjun Wu
@ 2021-04-29  8:27       ` Wenjun Wu
  2021-04-29 11:04         ` Zhang, Qi Z
  0 siblings, 1 reply; 10+ messages in thread
From: Wenjun Wu @ 2021-04-29  8:27 UTC (permalink / raw)
  To: dev, beilei.xing; +Cc: Wenjun Wu

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 will 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.

Since iavf can hardly triggle this issue and i40evf will be replaced
by iavf in future DPDK versions, this patch provide a workaround.
We 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.
v4: correct spelling mistakes.
v5: modify the commit message to mention this a workaround.
---
 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH v5] net/i40e: extend VF reset waiting time
  2021-04-29  8:27       ` [dpdk-dev] [PATCH v5] " Wenjun Wu
@ 2021-04-29 11:04         ` Zhang, Qi Z
  0 siblings, 0 replies; 10+ messages in thread
From: Zhang, Qi Z @ 2021-04-29 11:04 UTC (permalink / raw)
  To: Wu, Wenjun1, dev, Xing, Beilei; +Cc: Wu, Wenjun1



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wenjun Wu
> Sent: Thursday, April 29, 2021 4:27 PM
> To: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>
> Cc: Wu, Wenjun1 <wenjun1.wu@intel.com>
> Subject: [dpdk-dev] [PATCH v5] net/i40e: extend VF reset waiting time
> 
> 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 will 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.
> 
> Since iavf can hardly triggle this issue and i40evf will be replaced by iavf in
> future DPDK versions, this patch provide a workaround.
> We 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>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-04-29 11:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22  5:34 [dpdk-dev] [PATCH v1] net/i40e: extend VF reset waiting time 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   ` [dpdk-dev] [PATCH v3] " Wenjun Wu
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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git