From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>, davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org,
Jakub Kicinski <kuba@kernel.org>,
willemb@google.com, ecree.xilinx@gmail.com,
neescoba@cisco.com
Subject: Re: [PATCH net-next] netdev: clarify GSO vs csum in qstats
Date: Thu, 13 Feb 2025 10:39:30 -0500 [thread overview]
Message-ID: <67ae123210650_24be45294bc@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <20250213010457.1351376-1-kuba@kernel.org>
Jakub Kicinski wrote:
> Could be just me, but I had to pause and double check that the Tx csum
> counter in qstat should include GSO'd packets. GSO pretty much implies
> csum so one could possibly interpret the csum counter as pure csum offload.
>
> But the counters are based on virtio:
>
> [tx_needs_csum]
> The number of packets which require checksum calculation by the device.
>
> [rx_needs_csum]
> The number of packets with VIRTIO_NET_HDR_F_NEEDS_CSUM.
>
> and VIRTIO_NET_HDR_F_NEEDS_CSUM gets set on GSO packets virtio sends.
>
> Clarify this in the spec to avoid any confusion.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: willemb@google.com
> CC: ecree.xilinx@gmail.com
> CC: neescoba@cisco.com
> ---
> Documentation/netlink/specs/netdev.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml
> index 288923e965ae..0b311dc49691 100644
> --- a/Documentation/netlink/specs/netdev.yaml
> +++ b/Documentation/netlink/specs/netdev.yaml
> @@ -457,6 +457,8 @@ name: netdev
> name: tx-needs-csum
> doc: |
> Number of packets that required the device to calculate the checksum.
> + This counter includes the number of GSO wire packets for which device
Good to call out wire packets, as opposed to the GSO packet itself. That is
sometimes left ambiguous in GSO counting.
> + calculated the L4 checksum (which means pretty much all of them).
Can we clarify what pretty much here means?
TSO requires checksum offload. USO with zero checksum is the only exception that
I can think of right now.
> type: uint
> -
> name: tx-hw-gso-packets
> --
> 2.48.1
>
next prev parent reply other threads:[~2025-02-13 15:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 1:04 [PATCH net-next] netdev: clarify GSO vs csum in qstats Jakub Kicinski
2025-02-13 15:39 ` Willem de Bruijn [this message]
2025-02-13 15:48 ` 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=67ae123210650_24be45294bc@willemb.c.googlers.com.notmuch \
--to=willemdebruijn.kernel@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=neescoba@cisco.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.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).