net/i40e: extend VF reset waiting time
authorWenjun Wu <wenjun1.wu@intel.com>
Thu, 29 Apr 2021 08:27:24 +0000 (16:27 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Thu, 29 Apr 2021 11:06:20 +0000 (13:06 +0200)
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 trigger 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>
drivers/net/i40e/i40e_ethdev_vf.c

index ad80aa1..cb898bd 100644 (file)
@@ -1237,7 +1237,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) {