Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d7ce682 authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Kirsher
Browse files

ixgbe: Use packets to track Tx completions instead of a seperate value



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.

Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Tested-by: default avatarStephen Ko <stephen.s.ko@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 93f5b3c1
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -173,7 +173,6 @@ struct ixgbe_queue_stats {
struct ixgbe_tx_queue_stats {
struct ixgbe_tx_queue_stats {
	u64 restart_queue;
	u64 restart_queue;
	u64 tx_busy;
	u64 tx_busy;
	u64 completed;
	u64 tx_done_old;
	u64 tx_done_old;
};
};


+1 −4
Original line number Original line Diff line number Diff line
@@ -661,7 +661,7 @@ static void ixgbe_update_xoff_received(struct ixgbe_adapter *adapter)


static u64 ixgbe_get_tx_completed(struct ixgbe_ring *ring)
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)
static u64 ixgbe_get_tx_pending(struct ixgbe_ring *ring)
@@ -760,9 +760,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)))
		if (!(eop_desc->wb.status & cpu_to_le32(IXGBE_TXD_STAT_DD)))
			break;
			break;


		/* count the packet as being completed */
		tx_ring->tx_stats.completed++;

		/* clear next_to_watch to prevent false hangs */
		/* clear next_to_watch to prevent false hangs */
		tx_buffer->next_to_watch = NULL;
		tx_buffer->next_to_watch = NULL;