@@ -138,7 +138,6 @@ struct ice_txq_stats {
u64 restart_q;
u64 tx_busy;
u64 tx_linearize;
- int prev_pkt; /* negative if no pending Tx descriptors */
};
struct ice_rxq_stats {
@@ -354,6 +353,8 @@ struct ice_tx_ring {
u32 txq_teid; /* Added Tx queue TEID */
+ int prev_pkt; /* negative if no pending Tx descriptors */
+
#define ICE_TX_FLAGS_RING_XDP BIT(0)
#define ICE_TX_FLAGS_RING_VLAN_L2TAG1 BIT(1)
#define ICE_TX_FLAGS_RING_VLAN_L2TAG2 BIT(2)
@@ -160,7 +160,7 @@ static void ice_check_for_hang_subtask(struct ice_pf *pf)
* pending work.
*/
packets = ring_stats->stats.pkts & INT_MAX;
- if (ring_stats->tx_stats.prev_pkt == packets) {
+ if (tx_ring->prev_pkt == packets) {
/* Trigger sw interrupt to revive the queue */
ice_trigger_sw_intr(hw, tx_ring->q_vector);
continue;
@@ -170,8 +170,8 @@ static void ice_check_for_hang_subtask(struct ice_pf *pf)
* to ice_get_tx_pending()
*/
smp_rmb();
- ring_stats->tx_stats.prev_pkt =
- ice_get_tx_pending(tx_ring) ? packets : -1;
+ tx_ring->prev_pkt =
+ ice_get_tx_pending(tx_ring) ? packets : -1;
}
}
}
@@ -499,7 +499,7 @@ int ice_setup_tx_ring(struct ice_tx_ring *tx_ring)
tx_ring->next_to_use = 0;
tx_ring->next_to_clean = 0;
- tx_ring->ring_stats->tx_stats.prev_pkt = -1;
+ tx_ring->prev_pkt = -1;
return 0;
err: