diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2006-03-02 18:20:43 -0800 |
---|---|---|
committer | root <root@jk-desktop.jf.intel.com> | 2006-03-02 18:20:43 -0800 |
commit | 2a1af5d7dfd809b16fb69f3f0fc073d9b6b7c6ac (patch) | |
tree | aae8f3f32de4d0ca3f9bdc1dfea0d67d416a705f /drivers/net/e1000 | |
parent | 85b22eb632dc75887ba99edad49307a02c2ae7ec (diff) |
e1000: Add performance enahancement by balancing TX and RX
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 58561a4955e3..e80378a220d4 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -3349,6 +3349,9 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter, struct e1000_tx_desc *tx_desc, *eop_desc; struct e1000_buffer *buffer_info; unsigned int i, eop; +#ifdef CONFIG_E1000_NAPI + unsigned int count = 0; +#endif boolean_t cleaned = FALSE; i = tx_ring->next_to_clean; @@ -3370,6 +3373,11 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter, eop = tx_ring->buffer_info[i].next_to_watch; eop_desc = E1000_TX_DESC(*tx_ring, eop); +#ifdef CONFIG_E1000_NAPI +#define E1000_TX_WEIGHT 64 + /* weight of a sort for tx, to avoid endless transmit cleanup */ + if (count++ == E1000_TX_WEIGHT) break; +#endif } tx_ring->next_to_clean = i; |