On 11/1/2024 2:06 AM, Jiawen Wu wrote: >>> @@ -4980,6 +4982,7 @@ txgbe_tx_queue_clear_error(void *param) >>> if (!txq->resetting) >>> continue; >>> >>> + txq->desc_error++; >>> >> >> Why error value is increased in this function, which resets the Tx queue? >> Is the intention to reset the error value here? > > When there is a desc error to cause Tx ring hang, the interrupt directs to > reset of the queue. So we increase the error count in the specific queue > reset function. The queue is reset, but the error that led to the resetting > is recorded. The error count is only reset at the setup function. >
Got it. But this variable counts number of bad packets. Increasing it when Tx ring hang too may be confusing as there are two different reasons to increase the counter. Btw, .stats_reset() needs to reset this error stat.