mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 02:23:16 +00:00
ixgbe: fix possible divide by zero in ixgbe_update_itr
Protect the code by bailing out of ixgbe_update_itr() when this occurs. The next call to ixgbe_update_itr will continue to dynamically update ITR. Signed-of-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
01f27fc085
commit
bdbeefe8ea
@ -2095,6 +2095,9 @@ static void ixgbe_update_itr(struct ixgbe_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) {
|
||||
|
Loading…
Reference in New Issue
Block a user