diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2011-08-15 10:08:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-16 19:36:15 -0400 |
commit | acf42a2a575777681fee45ed59d7140be38e9142 (patch) | |
tree | 8a5fc2c1005d389fedd4816926ab42d07fe96fd3 /include/linux/ethtool.h | |
parent | 2d7c79390eccd743a643db3fa577f4837e7f2b85 (diff) |
ethtool: Explicitly state the exit condition for interrupt coalescing
Also explicitly state how to disable interrupt coalescing.
Remove the now-redundant text from field descriptions.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r-- | include/linux/ethtool.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 18059ca41f09..42378b34ae8f 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -121,20 +121,18 @@ struct ethtool_eeprom { | |||
121 | * struct ethtool_coalesce - coalescing parameters for IRQs and stats updates | 121 | * struct ethtool_coalesce - coalescing parameters for IRQs and stats updates |
122 | * @cmd: ETHTOOL_{G,S}COALESCE | 122 | * @cmd: ETHTOOL_{G,S}COALESCE |
123 | * @rx_coalesce_usecs: How many usecs to delay an RX interrupt after | 123 | * @rx_coalesce_usecs: How many usecs to delay an RX interrupt after |
124 | * a packet arrives. If 0, only @rx_max_coalesced_frames is used. | 124 | * a packet arrives. |
125 | * @rx_max_coalesced_frames: Maximum number of packets to receive | 125 | * @rx_max_coalesced_frames: Maximum number of packets to receive |
126 | * before an RX interrupt. If 0, only @rx_coalesce_usecs is used. | 126 | * before an RX interrupt. |
127 | * @rx_coalesce_usecs_irq: Same as @rx_coalesce_usecs, except that | 127 | * @rx_coalesce_usecs_irq: Same as @rx_coalesce_usecs, except that |
128 | * this value applies while an IRQ is being serviced by the host. | 128 | * this value applies while an IRQ is being serviced by the host. |
129 | * @rx_max_coalesced_frames_irq: Same as @rx_max_coalesced_frames, | 129 | * @rx_max_coalesced_frames_irq: Same as @rx_max_coalesced_frames, |
130 | * except that this value applies while an IRQ is being serviced | 130 | * except that this value applies while an IRQ is being serviced |
131 | * by the host. | 131 | * by the host. |
132 | * @tx_coalesce_usecs: How many usecs to delay a TX interrupt after | 132 | * @tx_coalesce_usecs: How many usecs to delay a TX interrupt after |
133 | * a packet is sent. If 0, only @tx_max_coalesced_frames | 133 | * a packet is sent. |
134 | * is used. | ||
135 | * @tx_max_coalesced_frames: Maximum number of packets to be sent | 134 | * @tx_max_coalesced_frames: Maximum number of packets to be sent |
136 | * before a TX interrupt. If 0, only @tx_coalesce_usecs is | 135 | * before a TX interrupt. |
137 | * used. | ||
138 | * @tx_coalesce_usecs_irq: Same as @tx_coalesce_usecs, except that | 136 | * @tx_coalesce_usecs_irq: Same as @tx_coalesce_usecs, except that |
139 | * this value applies while an IRQ is being serviced by the host. | 137 | * this value applies while an IRQ is being serviced by the host. |
140 | * @tx_max_coalesced_frames_irq: Same as @tx_max_coalesced_frames, | 138 | * @tx_max_coalesced_frames_irq: Same as @tx_max_coalesced_frames, |
@@ -167,8 +165,13 @@ struct ethtool_eeprom { | |||
167 | * @rate_sample_interval: How often to do adaptive coalescing packet rate | 165 | * @rate_sample_interval: How often to do adaptive coalescing packet rate |
168 | * sampling, measured in seconds. Must not be zero. | 166 | * sampling, measured in seconds. Must not be zero. |
169 | * | 167 | * |
170 | * It is illegal to set both usecs and max frames to zero as this | 168 | * Each pair of (usecs, max_frames) fields specifies this exit |
171 | * would cause interrupts to never be generated. | 169 | * condition for interrupt coalescing: |
170 | * (usecs > 0 && time_since_first_completion >= usecs) || | ||
171 | * (max_frames > 0 && completed_frames >= max_frames) | ||
172 | * It is illegal to set both usecs and max_frames to zero as this | ||
173 | * would cause interrupts to never be generated. To disable | ||
174 | * coalescing, set usecs = 0 and max_frames = 1. | ||
172 | * | 175 | * |
173 | * Adaptive RX/TX coalescing is an algorithm implemented by some | 176 | * Adaptive RX/TX coalescing is an algorithm implemented by some |
174 | * drivers to improve latency under low packet rates and improve | 177 | * drivers to improve latency under low packet rates and improve |