Commit e0f0be7d authored by Young Xiao's avatar Young Xiao Committed by Jeff Kirsher

ixgbevf: fix possible divide by zero in ixgbevf_update_itr

The next call to ixgbevf_update_itr will continue to dynamically
update ITR.

Copy from commit bdbeefe8 ("ixgbe: fix possible divide by zero in
ixgbe_update_itr")
Signed-off-by: default avatarYoung Xiao <92siuyang@gmail.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 655c9141
......@@ -1423,6 +1423,9 @@ static void ixgbevf_update_itr(struct ixgbevf_q_vector *q_vector,
*/
/* what was last interrupt timeslice? */
timepassed_us = q_vector->itr >> 2;
if (timepassed_us == 0)
return;
bytes_perint = bytes / timepassed_us; /* bytes/usec */
switch (itr_setting) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment