aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/igb')
-rw-r--r--drivers/net/igb/igb_main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 183235d46aee..ab846ec65204 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2898,13 +2898,13 @@ static void igb_set_itr(struct igb_adapter *adapter)
2898 switch (current_itr) { 2898 switch (current_itr) {
2899 /* counts and packets in update_itr are dependent on these numbers */ 2899 /* counts and packets in update_itr are dependent on these numbers */
2900 case lowest_latency: 2900 case lowest_latency:
2901 new_itr = 70000; 2901 new_itr = 56; /* aka 70,000 ints/sec */
2902 break; 2902 break;
2903 case low_latency: 2903 case low_latency:
2904 new_itr = 20000; /* aka hwitr = ~200 */ 2904 new_itr = 196; /* aka 20,000 ints/sec */
2905 break; 2905 break;
2906 case bulk_latency: 2906 case bulk_latency:
2907 new_itr = 4000; 2907 new_itr = 980; /* aka 4,000 ints/sec */
2908 break; 2908 break;
2909 default: 2909 default:
2910 break; 2910 break;
@@ -2923,7 +2923,8 @@ set_itr_now:
2923 * by adding intermediate steps when interrupt rate is 2923 * by adding intermediate steps when interrupt rate is
2924 * increasing */ 2924 * increasing */
2925 new_itr = new_itr > adapter->itr ? 2925 new_itr = new_itr > adapter->itr ?
2926 min(adapter->itr + (new_itr >> 2), new_itr) : 2926 max((new_itr * adapter->itr) /
2927 (new_itr + (adapter->itr >> 2)), new_itr) :
2927 new_itr; 2928 new_itr;
2928 /* Don't write the value here; it resets the adapter's 2929 /* Don't write the value here; it resets the adapter's
2929 * internal timer, and causes us to delay far longer than 2930 * internal timer, and causes us to delay far longer than
@@ -2932,7 +2933,7 @@ set_itr_now:
2932 * ends up being correct. 2933 * ends up being correct.
2933 */ 2934 */
2934 adapter->itr = new_itr; 2935 adapter->itr = new_itr;
2935 adapter->rx_ring->itr_val = 1000000000 / (new_itr * 256); 2936 adapter->rx_ring->itr_val = new_itr;
2936 adapter->rx_ring->set_itr = 1; 2937 adapter->rx_ring->set_itr = 1;
2937 } 2938 }
2938 2939