Commit fc7d345d authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Garzik

igb: remove unneeded cleaned variable in clean_tx_irq path

The cleaned variable can be replaced by the count of packets cleaned during
the tx interrupt routine so it can be removed.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 4662e82b
...@@ -3617,16 +3617,14 @@ static bool igb_clean_tx_irq(struct igb_ring *tx_ring) ...@@ -3617,16 +3617,14 @@ static bool igb_clean_tx_irq(struct igb_ring *tx_ring)
unsigned int i; unsigned int i;
u32 head, oldhead; u32 head, oldhead;
unsigned int count = 0; unsigned int count = 0;
bool cleaned = false;
bool retval = true;
unsigned int total_bytes = 0, total_packets = 0; unsigned int total_bytes = 0, total_packets = 0;
bool retval = true;
rmb(); rmb();
head = get_head(tx_ring); head = get_head(tx_ring);
i = tx_ring->next_to_clean; i = tx_ring->next_to_clean;
while (1) { while (1) {
while (i != head) { while (i != head) {
cleaned = true;
tx_desc = E1000_TX_DESC(*tx_ring, i); tx_desc = E1000_TX_DESC(*tx_ring, i);
buffer_info = &tx_ring->buffer_info[i]; buffer_info = &tx_ring->buffer_info[i];
skb = buffer_info->skb; skb = buffer_info->skb;
...@@ -3643,7 +3641,6 @@ static bool igb_clean_tx_irq(struct igb_ring *tx_ring) ...@@ -3643,7 +3641,6 @@ static bool igb_clean_tx_irq(struct igb_ring *tx_ring)
} }
igb_unmap_and_free_tx_resource(adapter, buffer_info); igb_unmap_and_free_tx_resource(adapter, buffer_info);
tx_desc->upper.data = 0;
i++; i++;
if (i == tx_ring->count) if (i == tx_ring->count)
...@@ -3665,7 +3662,7 @@ static bool igb_clean_tx_irq(struct igb_ring *tx_ring) ...@@ -3665,7 +3662,7 @@ static bool igb_clean_tx_irq(struct igb_ring *tx_ring)
done_cleaning: done_cleaning:
tx_ring->next_to_clean = i; tx_ring->next_to_clean = i;
if (unlikely(cleaned && if (unlikely(count &&
netif_carrier_ok(netdev) && netif_carrier_ok(netdev) &&
IGB_DESC_UNUSED(tx_ring) >= IGB_TX_QUEUE_WAKE)) { IGB_DESC_UNUSED(tx_ring) >= IGB_TX_QUEUE_WAKE)) {
/* Make sure that anybody stopping the queue after this /* Make sure that anybody stopping the queue after this
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment