From 94c9e5a89349a1f1ebabe0876c059dc387b8b2a0 Mon Sep 17 00:00:00 2001 From: Jesse Brandeburg Date: Mon, 6 Jul 2009 10:44:20 +0000 Subject: e1000: allow ethtool coalesece to adjust interrupts per second This patch allows on-the-fly adjustment of the interrupts per second generated by e1000 devices 82545/82546 (hardware support of ITR register is a requirement) adjust using this command: ethtool -C eth0 rx-usecs 10 where 10 is 10 microseconds per interrupt interval, so 10 = 100,000 interrupts per second, and 125 = 8000 interrupts per second. changes should be immediate. 1,3 are special values and indicate the automatic tuning mode to the driver, where 1 is 4000-90000 interrupts per second and 3 is 4000-20000 interrupts per second and is the driver default. Signed-off-by: Jesse Brandeburg Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- drivers/net/e1000/e1000.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/net/e1000/e1000.h') diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index e9a416f40162..c87f2cbdbae3 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h @@ -111,6 +111,9 @@ do { \ #define E1000_MIN_RXD 80 #define E1000_MAX_82544_RXD 4096 +#define E1000_MIN_ITR_USECS 10 /* 100000 irq/sec */ +#define E1000_MAX_ITR_USECS 10000 /* 100 irq/sec */ + /* this is the size past which hardware will drop packets when setting LPE=0 */ #define MAXIMUM_ETHERNET_VLAN_SIZE 1522 -- cgit v1.2.2