From: Jakub Kicinski <kuba@kernel.org>
To: David Wei <dw@davidwei.uk>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
shuah@kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next] selftests: drv-net: ping: make sure the ping test restores checksum offload
Date: Thu, 8 May 2025 18:37:36 -0700 [thread overview]
Message-ID: <20250508183736.74707daf@kernel.org> (raw)
In-Reply-To: <e339c382-c0f5-40dd-994e-34b388c68181@davidwei.uk>
On Thu, 8 May 2025 14:59:12 -0700 David Wei wrote:
> > +def _schedule_checksum_reset(cfg, netnl) -> None:
> > + features = ethtool(f"-k {cfg.ifname}", json=True)
> > + setting = ""
> > + for side in ["tx", "rx"]:
> > + f = features[0][side + "-checksumming"]
> > + if not f["fixed"]:
>
> I checked and found that "fixed" is a ternary:
>
> "rx-checksumming": {
> "active": true,
> "fixed": false,
> "requested": true
> },
> "tx-checksumming": {
> "active": true,
> "fixed": null,
> "requested": null
> },
>
> Python loads this JSON as False and None types respectively, and `not
> f["fixed"]` is true for both False and None. Maybe this doesn't matter
> but flagging it.
I think so, yes.
> > + setting += " " + side
> > + setting += " " + ("on" if f["requested"] or f["active"] else "off")
> > + defer(ethtool, f" -K {cfg.ifname} " + setting)
>
> This does rx/tx-gro too even if not explicitly requested. I assume that
> is okay?
You mean because those are automatically updated when we change
checksumming? If so then yes.
next prev parent reply other threads:[~2025-05-09 1:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 21:40 [PATCH net-next] selftests: drv-net: ping: make sure the ping test restores checksum offload Jakub Kicinski
2025-05-08 21:59 ` David Wei
2025-05-09 1:37 ` Jakub Kicinski [this message]
2025-05-09 4:10 ` David Wei
2025-05-13 1:20 ` patchwork-bot+netdevbpf
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=20250508183736.74707daf@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dw@davidwei.uk \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.