channel = efx_get_tx_channel(efx, idx);
stats->packets = 0;
stats->bytes = 0;
+ stats->hw_gso_packets = 0;
+ stats->hw_gso_wire_packets = 0;
efx_for_each_channel_tx_queue(tx_queue, channel) {
stats->packets += tx_queue->complete_packets -
tx_queue->old_complete_packets;
stats->bytes += tx_queue->complete_bytes -
tx_queue->old_complete_bytes;
+ /* Note that, unlike stats->packets and stats->bytes,
+ * these count TXes enqueued, rather than completed,
+ * which may not be what users expect.
+ */
+ stats->hw_gso_packets += tx_queue->tso_bursts -
+ tx_queue->old_tso_bursts;
+ stats->hw_gso_wire_packets += tx_queue->tso_packets -
+ tx_queue->old_tso_packets;
}
}
rx->hw_drop_overruns = 0;
tx->packets = 0;
tx->bytes = 0;
+ tx->hw_gso_packets = 0;
+ tx->hw_gso_wire_packets = 0;
/* Count all packets on non-core queues, and packets before last
* datapath start on core queues.
net_dev->real_num_tx_queues) {
tx->packets += tx_queue->complete_packets;
tx->bytes += tx_queue->complete_bytes;
+ tx->hw_gso_packets += tx_queue->tso_bursts;
+ tx->hw_gso_wire_packets += tx_queue->tso_packets;
} else {
tx->packets += tx_queue->old_complete_packets;
tx->bytes += tx_queue->old_complete_bytes;
+ tx->hw_gso_packets += tx_queue->old_tso_bursts;
+ tx->hw_gso_wire_packets += tx_queue->old_tso_packets;
}
/* Include XDP TX in device-wide stats */
tx->packets += tx_queue->complete_xdp_packets;
* efx_init_tx_queue()
* @old_complete_bytes: Value of @complete_bytes as of last
* efx_init_tx_queue()
+ * @old_tso_bursts: Value of @tso_bursts as of last efx_init_tx_queue()
+ * @old_tso_packets: Value of @tso_packets as of last efx_init_tx_queue()
* @read_count: Current read pointer.
* This is the number of buffers that have been removed from both rings.
* @old_write_count: The value of @write_count when last checked.
bool xdp_tx;
unsigned long old_complete_packets;
unsigned long old_complete_bytes;
+ unsigned int old_tso_bursts;
+ unsigned int old_tso_packets;
/* Members used mainly on the completion path */
unsigned int read_count ____cacheline_aligned_in_smp;