]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: Use packets to track Tx completions instead of a seperate value
authorAlexander Duyck <alexander.h.duyck@intel.com>
Wed, 8 Feb 2012 07:50:51 +0000 (07:50 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 15:12:22 +0000 (23:12 +0800)
A separate value was added to track Tx completions in order to determine if
the Tx unit was hung.  However we can do the same thing using the number of
packets completed without having to add another stat to the Tx ring.

(cherry picked from commit 7d7ce682f8437ff91c964c478b8845ed98a3207d)
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/ixgbe/ixgbe.h
drivers/net/ixgbe/ixgbe_main.c

index 55987fa4faf1e5c8553678ecf7277c4aa0a8ee10..f6a1650dbb453f175859a2b7d3ba547e379897cc 100644 (file)
@@ -178,7 +178,6 @@ struct ixgbe_queue_stats {
 struct ixgbe_tx_queue_stats {
        u64 restart_queue;
        u64 tx_busy;
-       u64 completed;
        u64 tx_done_old;
 };
 
index 60f0969d5362b842941de659d973dbcc161ba978..9427db2ef09b72c036039b4216457201eb8eb43f 100644 (file)
@@ -668,7 +668,7 @@ static void ixgbe_update_xoff_received(struct ixgbe_adapter *adapter)
 
 static u64 ixgbe_get_tx_completed(struct ixgbe_ring *ring)
 {
-       return ring->tx_stats.completed;
+       return ring->stats.packets;
 }
 
 static u64 ixgbe_get_tx_pending(struct ixgbe_ring *ring)
@@ -767,9 +767,6 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,
                if (!(eop_desc->wb.status & cpu_to_le32(IXGBE_TXD_STAT_DD)))
                        break;
 
-               /* count the packet as being completed */
-               tx_ring->tx_stats.completed++;
-
                /* clear next_to_watch to prevent false hangs */
                tx_buffer->next_to_watch = NULL;