Skip to content

Commit 54584b1

Browse files
michichkuba-moo
authored andcommitted
iavf: fix the waiting time for initial reset
Every time I create VFs on ice, I receive at least one "Device is still in reset (-16), retrying" message per VF. It recovers fine, but typical usecases should not trigger scary-looking messages. The waiting for reset is too short. It makes no sense to check every 10 microseconds. Typical reset waiting times are at least tens of milliseconds and can be several seconds. I suspect the polling interval was meant to be 10 milliseconds all along. IAVF_RESET_WAIT_COMPLETE_COUNT is defined as 2000, so the total waiting time could be over 20 seconds. I have seen resets take 5 seconds (with 128 VFs on ice). The added benefit of not triggering the "Device is still in reset" path is that we avoid going through the __IAVF_INIT_FAILED state, which would take a full second before retrying. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Tested-by: Rafal Romanowski <rafal.romanowski@intel.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20231027175941.1340255-5-jacob.e.keller@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 6a0d989 commit 54584b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4786,7 +4786,7 @@ static int iavf_check_reset_complete(struct iavf_hw *hw)
47864786
if ((rstat == VIRTCHNL_VFR_VFACTIVE) ||
47874787
(rstat == VIRTCHNL_VFR_COMPLETED))
47884788
return 0;
4789-
usleep_range(10, 20);
4789+
msleep(IAVF_RESET_WAIT_MS);
47904790
}
47914791
return -EBUSY;
47924792
}

0 commit comments

Comments
 (0)