net/i40e: extend VF reset waiting time.
PATCH 1/1 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 2s so that VF can start normally when using DPDK PF and DPDK VF.
--- drivers/net/i40e/i40e_ethdev_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_ethdev_vf.c +1 -1
@@ -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) {
Signature · 1 line
2.25.1
PATCH v2 1/1 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.
--- drivers/net/i40e/i40e_ethdev_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_ethdev_vf.c +1 -1
@@ -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) {
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time
Quoted 14 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Wenjun Wu
Sent: Sunday, April 25, 2021 10:03 AM
To: [email protected]; Xing, Beilei <[email protected]>
Cc: Wu, Wenjun1 <[email protected]>
Subject: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting timeWhen 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.
Quoted 4 lines
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 <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi
Re: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time
In reply to Wenjun WuQuoted 6 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Wenjun Wu
Sent: Sunday, April 25, 2021 10:03 AM
To: [email protected]; Xing, Beilei <[email protected]>
Cc: Wu, Wenjun1 <[email protected]>
Subject: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time
Re: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time
In reply to Wenjun WuQuoted 6 lines · 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.
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.
Quoted 22 lines
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 <[email protected]>--- drivers/net/i40e/i40e_ethdev_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/i40e/i40e_ethdev_vf.c +1
-1@@ -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) {
Re: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time
Hi Ferruh,
I realized there were some ambiguities. I will modify commit in the new patch.
Regards,
Wenjun
-----Original Message-----
From: Yigit, Ferruh <[email protected]>
Sent: Wednesday, April 28, 2021 5:30 PM
To: Wu, Wenjun1 <[email protected]>; [email protected]; Xing, Beilei <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: extend VF reset waiting time
Quoted 6 lines · 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.
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.
Quoted 23 lines
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 <[email protected]>--- drivers/net/i40e/i40e_ethdev_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/i40e/i40e_ethdev_vf.c +1
-1@@ -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) {
PATCH v3 1/1 net/i40e: extend VF reset waiting time
In reply to Wenjun WuWhen 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.
---
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(-)
drivers/net/i40e/i40e_ethdev_vf.c +1 -1
@@ -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) {
Signature · 1 line
2.25.1
PATCH v4 1/1 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.
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.
---
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(-)
drivers/net/i40e/i40e_ethdev_vf.c +1 -1
@@ -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) {
Signature · 1 line
2.25.1
PATCH v5 1/1 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.
---
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(-)
drivers/net/i40e/i40e_ethdev_vf.c +1 -1
@@ -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) {
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v5] net/i40e: extend VF reset waiting time
Quoted 17 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Wenjun Wu
Sent: Thursday, April 29, 2021 4:27 PM
To: [email protected]; Xing, Beilei <[email protected]>
Cc: Wu, Wenjun1 <[email protected]>
Subject: [dpdk-dev] [PATCH v5] net/i40e: extend VF reset waiting timeWhen 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 functioni40e_dev_handle_aq_msgis more than 200ms. It may cause VF start error.
Quoted 6 lines
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 <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi