From: Sabrina Dubroca <sd@queasysnail.net>
To: Cosmin Ratiu <cratiu@nvidia.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>,
Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org,
Dragos Tatulea <dtatulea@nvidia.com>
Subject: Re: [PATCH net v6 3/4] selftests: Add MACsec VLAN propagation traffic test
Date: Thu, 2 Apr 2026 13:37:00 +0200 [thread overview]
Message-ID: <ac5U3LFm2pOV3vWM@krikkit> (raw)
In-Reply-To: <20260330130130.989236-4-cratiu@nvidia.com>
2026-03-30, 16:01:29 +0300, Cosmin Ratiu wrote:
> +def _get_mac(ifname, host=None):
> + """Gets MAC address of an interface."""
> + dev = ip(f"-d link show dev {ifname}", json=True, host=host)
nit: MAC address doesn't need '-d'
I would have used fixed SCI on both ends to avoid this mess with the
local/remote MAC address, but it's ok as you wrote it.
> + return dev[0]["address"]
[...]
> +def _check_nsim_vid(cfg, vid, expected) -> None:
> + """Checks if a VLAN is present. Only works on netdevsim."""
> +
> + nsim = cfg.get_local_nsim_dev()
> + if not nsim:
> + return
> +
> + vlan_path = nsim.nsims[0].dfs_dir + "vlan"
nit: os.path.join for consistency with other users
> + with open(vlan_path, encoding="utf-8") as f:
> + vids = f.read()
> + found = f"ctag {vid}\n" in vids
> + ksft_eq(found, expected,
> + f"VLAN {vid} {'expected' if expected else 'not expected'}"
> + f" in debugfs")
--
Sabrina
next prev parent reply other threads:[~2026-04-02 11:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 13:01 [PATCH net v6 0/4] macsec: Add support for VLAN filtering in offload mode Cosmin Ratiu
2026-03-30 13:01 ` [PATCH net v6 1/4] selftests: Migrate nsim-only MACsec tests to Python Cosmin Ratiu
2026-04-02 10:03 ` Sabrina Dubroca
2026-04-02 11:51 ` Cosmin Ratiu
2026-03-30 13:01 ` [PATCH net v6 2/4] nsim: Add support for VLAN filters Cosmin Ratiu
2026-04-02 10:09 ` Sabrina Dubroca
2026-03-30 13:01 ` [PATCH net v6 3/4] selftests: Add MACsec VLAN propagation traffic test Cosmin Ratiu
2026-04-02 11:37 ` Sabrina Dubroca [this message]
2026-04-02 14:18 ` Cosmin Ratiu
2026-03-30 13:01 ` [PATCH net v6 4/4] macsec: Support VLAN-filtering lower devices Cosmin Ratiu
2026-04-02 14:48 ` Sabrina Dubroca
2026-04-02 2:54 ` [PATCH net v6 0/4] macsec: Add support for VLAN filtering in offload mode 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=ac5U3LFm2pOV3vWM@krikkit \
--to=sd@queasysnail.net \
--cc=andrew+netdev@lunn.ch \
--cc=cratiu@nvidia.com \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--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