ixgbe: Prevent u8 wrapping of ITR value to something less than 10us
authorAlexander Duyck <alexander.h.duyck@linux.intel.com>
Wed, 4 Sep 2019 15:07:11 +0000 (08:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Sep 2019 07:09:34 +0000 (09:09 +0200)
commit5b5f14601e0aca03ee487feeb352e9a72a82b79e
treedc5e5da15260e7ff396cb141b9a39d9f522ed22a
parent7cbd49cf0d62286642d8966cc8d4512e4c73ee75
ixgbe: Prevent u8 wrapping of ITR value to something less than 10us

commit 377228accbbb8b9738f615d791aa803f41c067e0 upstream.

There were a couple cases where the ITR value generated via the adaptive
ITR scheme could exceed 126. This resulted in the value becoming either 0
or something less than 10. Switching back and forth between a value less
than 10 and a value greater than 10 can cause issues as certain hardware
features such as RSC to not function well when the ITR value has dropped
that low.

CC: stable@vger.kernel.org
Fixes: b4ded8327fea ("ixgbe: Update adaptive ITR algorithm")
Reported-by: Gregg Leventhal <gleventhal@janestreet.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c