* [Intel-wired-lan] [net-queue PATCH] ixgbe: Prevent u8 wrapping of ITR value to something less than 10us
@ 2019-09-04 15:07 Alexander Duyck
2019-09-05 20:37 ` Bowers, AndrewX
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Duyck @ 2019-09-04 15:07 UTC (permalink / raw)
To: intel-wired-lan
From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
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.
Reported-by: Gregg Leventhal <gleventhal@janestreet.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 5fa585dfddf6..097e6dfbf65a 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -2621,7 +2621,7 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector,
/* 16K ints/sec to 9.2K ints/sec */
avg_wire_size *= 15;
avg_wire_size += 11452;
- } else if (avg_wire_size <= 1980) {
+ } else if (avg_wire_size < 1968) {
/* 9.2K ints/sec to 8K ints/sec */
avg_wire_size *= 5;
avg_wire_size += 22420;
@@ -2654,6 +2654,8 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector,
case IXGBE_LINK_SPEED_2_5GB_FULL:
case IXGBE_LINK_SPEED_1GB_FULL:
case IXGBE_LINK_SPEED_10_FULL:
+ if (avg_wire_size > 8064)
+ avg_wire_size = 8064;
itr += DIV_ROUND_UP(avg_wire_size,
IXGBE_ITR_ADAPTIVE_MIN_INC * 64) *
IXGBE_ITR_ADAPTIVE_MIN_INC;
^ permalink raw reply related [flat|nested] 2+ messages in thread* [Intel-wired-lan] [net-queue PATCH] ixgbe: Prevent u8 wrapping of ITR value to something less than 10us
2019-09-04 15:07 [Intel-wired-lan] [net-queue PATCH] ixgbe: Prevent u8 wrapping of ITR value to something less than 10us Alexander Duyck
@ 2019-09-05 20:37 ` Bowers, AndrewX
0 siblings, 0 replies; 2+ messages in thread
From: Bowers, AndrewX @ 2019-09-05 20:37 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alexander Duyck
> Sent: Wednesday, September 4, 2019 8:07 AM
> To: intel-wired-lan at lists.osuosl.org
> Cc: alexander.h.duyck at linux.intel.com; gleventhal at janestreet.com
> Subject: [Intel-wired-lan] [net-queue PATCH] ixgbe: Prevent u8 wrapping of
> ITR value to something less than 10us
>
> From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
>
> 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.
>
> Reported-by: Gregg Leventhal <gleventhal@janestreet.com>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-05 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-04 15:07 [Intel-wired-lan] [net-queue PATCH] ixgbe: Prevent u8 wrapping of ITR value to something less than 10us Alexander Duyck
2019-09-05 20:37 ` Bowers, AndrewX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox