Skip to content

Commit

Permalink
e1000: Add performance enahancement by balancing TX and RX
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Kirsher authored and root committed Mar 3, 2006
1 parent 85b22eb commit 2a1af5d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 2a1af5d

Please sign in to comment.