public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Sabrina Dubroca <sd@queasysnail.net>
Cc: Cosmin Ratiu <cratiu@nvidia.com>,
	"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	Dragos Tatulea <dtatulea@nvidia.com>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"edumazet@google.com" <edumazet@google.com>
Subject: Re: [PATCH net v5 0/3] macsec: Add support for VLAN filtering in offload mode
Date: Tue, 24 Mar 2026 20:55:45 -0700	[thread overview]
Message-ID: <20260324205545.7bbd8fdc@kernel.org> (raw)
In-Reply-To: <acKrRrOG0v9KDk_J@krikkit>

On Tue, 24 Mar 2026 16:18:30 +0100 Sabrina Dubroca wrote:
> > Adding back the nsim debugfs file and test assertions guarded by "if
> > cfg._ns" would ensure filter propagation correctness, but would feel
> > non-Pythonic and a little hacky given that the same assertion can't
> > work on real HW.  
> 
> I think that's fine. The tests are anyway python wrappers around
> iproute commands, it's neither "Pythonic" nor pretty.
> Jakub, any objection?

No objections, I already added this nasty little piece of code in gro.py

    try:
        # Disable TSO for local tests
        cfg.require_nsim()  # will raise KsftXfailEx if not running on nsim

        _set_ethtool_feat(cfg.remote_ifname, cfg.remote_feat,
                          {"tcp-segmentation-offload": False},
                          host=cfg.remote)
    except KsftXfailEx:
        pass

I agree with Cosmin that the check feels a bit non-Pythonic. Dunno
if the try except ends up being any better tho :S

Let's not use "if cfg._ns" tho, please add a method that will return
true / false (or feel free to come up with a cleaner way if you can
think of it). We definitely don't want to encourage nsim-only checks,
if you add new methods please mention in their documentation that we
strongly prefer if the authors can think of a way to prove correctness
that would also work on real HW.

      reply	other threads:[~2026-03-25  3:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 12:36 [PATCH net v5 0/3] macsec: Add support for VLAN filtering in offload mode Cosmin Ratiu
2026-03-23 12:36 ` [PATCH net v5 1/3] selftests: Migrate nsim-only MACsec tests to Python Cosmin Ratiu
2026-03-23 12:36 ` [PATCH net v5 2/3] selftests: Add MACsec VLAN propagation traffic test Cosmin Ratiu
2026-03-23 16:26   ` Jakub Kicinski
2026-03-23 12:36 ` [PATCH net v5 3/3] macsec: Support VLAN-filtering lower devices Cosmin Ratiu
2026-03-23 14:28 ` [PATCH net v5 0/3] macsec: Add support for VLAN filtering in offload mode Sabrina Dubroca
2026-03-23 14:42   ` Cosmin Ratiu
2026-03-23 15:02     ` Sabrina Dubroca
2026-03-23 16:32       ` Jakub Kicinski
2026-03-23 17:17         ` Sabrina Dubroca
2026-03-24 14:27           ` Cosmin Ratiu
2026-03-24 15:18             ` Sabrina Dubroca
2026-03-25  3:55               ` Jakub Kicinski [this message]

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=20260324205545.7bbd8fdc@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=cratiu@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dtatulea@nvidia.com \
    --cc=edumazet@google.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sd@queasysnail.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox