aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2006-03-02 21:20:43 -0500
committerroot <root@jk-desktop.jf.intel.com>2006-03-02 21:20:43 -0500
commit2a1af5d7dfd809b16fb69f3f0fc073d9b6b7c6ac (patch)
treeaae8f3f32de4d0ca3f9bdc1dfea0d67d416a705f /drivers/net/e1000
parent85b22eb632dc75887ba99edad49307a02c2ae7ec (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.c8
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,
3349 struct e1000_tx_desc *tx_desc, *eop_desc; 3349 struct e1000_tx_desc *tx_desc, *eop_desc;
3350 struct e1000_buffer *buffer_info; 3350 struct e1000_buffer *buffer_info;
3351 unsigned int i, eop; 3351 unsigned int i, eop;
3352#ifdef CONFIG_E1000_NAPI
3353 unsigned int count = 0;
3354#endif
3352 boolean_t cleaned = FALSE; 3355 boolean_t cleaned = FALSE;
3353 3356
3354 i = tx_ring->next_to_clean; 3357 i = tx_ring->next_to_clean;
@@ -3370,6 +3373,11 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter,
3370 3373
3371 eop = tx_ring->buffer_info[i].next_to_watch; 3374 eop = tx_ring->buffer_info[i].next_to_watch;
3372 eop_desc = E1000_TX_DESC(*tx_ring, eop); 3375 eop_desc = E1000_TX_DESC(*tx_ring, eop);
3376#ifdef CONFIG_E1000_NAPI
3377#define E1000_TX_WEIGHT 64
3378 /* weight of a sort for tx, to avoid endless transmit cleanup */
3379 if (count++ == E1000_TX_WEIGHT) break;
3380#endif
3373 } 3381 }
3374 3382
3375 tx_ring->next_to_clean = i; 3383 tx_ring->next_to_clean = i;