Subject: Re: [PATCH v2 net-next 6/6] sfc: add per-queue RX and TX bytes stats

From: Jakub Kicinski <[email-masked]>
Date: Fri, 6 Sep 2024 19:03:44 -0700

On Thu, 5 Sep 2024 16:41:35 +0100 [email-masked] wrote:
>   * @tx_packets: Number of packets sent since this struct was created

I think it's number of packets "enqueued", but the doc says:

        name: tx-packets
        doc: |
          Number of wire packets successfully sent. Packet is considered to be
          successfully sent once it is in device memory (usually this means
          the device has issued a DMA completion for the packet).

Not the end of the world if you prefer to keep as is, but if so maybe
just acknowledge in commit message or a code comment that this is not
100% in line with the definition?

> + * @tx_bytes: Number of bytes sent since this struct was created.  For TSO,
> + *	counts the superframe size, not the sizes of generated frames on the
> + *	wire (i.e. the headers are only counted once)

Hm. Hm. This is technically not documented but my intuition is that
tx_bytes should count wire bytes. tx_packets counts segments / wire
packets, looking at ef100_tx.c 
qstats "bytes" should be the same kind of bytes as counted by the MAC.
That way we can hopefully see how many packets "enter" the device from
queues, and how many "leave" via the MAC. Helping to calculate drops 
at various stages. That matters more for packets than bytes, but still..
-- 
pw-bot: cr