netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: <edward.cree@amd.com>
Cc: <linux-net-drivers@amd.com>, <davem@davemloft.net>,
	<edumazet@google.com>, <pabeni@redhat.com>,
	Edward Cree <ecree.xilinx@gmail.com>, <netdev@vger.kernel.org>,
	<habetsm.xilinx@gmail.com>, <jacob.e.keller@intel.com>
Subject: Re: [PATCH v2 net-next 6/6] sfc: add per-queue RX and TX bytes stats
Date: Fri, 6 Sep 2024 19:03:44 -0700	[thread overview]
Message-ID: <20240906190344.2573fdd2@kernel.org> (raw)
In-Reply-To: <fe0d5819436883d3ba74a5103325de741d6c3005.1725550155.git.ecree.xilinx@gmail.com>

On Thu, 5 Sep 2024 16:41:35 +0100 edward.cree@amd.com 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

  reply	other threads:[~2024-09-07  2:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 15:41 [PATCH v2 net-next 0/6] sfc: per-queue stats edward.cree
2024-09-05 15:41 ` [PATCH v2 net-next 1/6] sfc: remove obsolete counters from struct efx_channel edward.cree
2024-09-05 15:41 ` [PATCH v2 net-next 2/6] sfc: implement basic per-queue stats edward.cree
2024-09-05 15:41 ` [PATCH v2 net-next 3/6] sfc: add n_rx_overlength to ethtool stats edward.cree
2024-09-05 15:41 ` [PATCH v2 net-next 4/6] sfc: implement per-queue rx drop and overrun stats edward.cree
2024-09-05 15:41 ` [PATCH v2 net-next 5/6] sfc: implement per-queue TSO (hw_gso) stats edward.cree
2024-09-05 15:41 ` [PATCH v2 net-next 6/6] sfc: add per-queue RX and TX bytes stats edward.cree
2024-09-07  2:03   ` Jakub Kicinski [this message]
2024-09-10 15:03     ` Edward Cree
2024-09-10 15:37       ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240906190344.2573fdd2@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=edward.cree@amd.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=jacob.e.keller@intel.com \
    --cc=linux-net-drivers@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).