Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Cc: maxime.chevallier@bootlin.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, mcoquelin.stm32@gmail.com,
	alexandre.torgue@foss.st.com, shuah@kernel.org,
	joabreu@synopsys.com, yi.fang.gan@intel.com,
	jun.ann.lai@intel.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net v2 6/6] selftests: drv-net: Add VLAN test
Date: Sun, 23 Aug 2026 02:04:42 +0200	[thread overview]
Message-ID: <d614d8de-0da2-4673-bd11-02497d8a37e0@lunn.ch> (raw)
In-Reply-To: <20260821170959.79708-7-ovidiu.panait.rb@renesas.com>

On Fri, Aug 21, 2026 at 05:09:59PM +0000, Ovidiu Panait wrote:
> Add a test that validates ping traffic over VLAN interfaces. It aims
> to catch drivers which mishandle hardware VLAN tag stripping, in
> particular QinQ.
> 
> Three VLAN configurations are covered, each with hardware VLAN stripping
> enabled and disabled:
> - a single 802.1q VLAN interface
> - a single 802.1ad VLAN interface
> - an 802.1q VLAN stacked on top of an 802.1ad interface
> 
> NETIF=end1 LOCAL_V4=172.16.0.2 REMOTE_V4=172.16.0.3 \
> REMOTE_TYPE=ssh REMOTE_ARGS=root@172.16.0.3 \
> run_kselftest.sh -t drivers/net:vlan.py
>   TAP version 13
>   1..1
>   # timeout set to 360
>   # selftests: drivers/net: vlan.py
>   # # Interface: end0, driver: st_gmac
>   # TAP version 13
>   # 1..6
>   # ok 1 vlan.test.8021q_hw
>   # ok 2 vlan.test.8021q_sw
>   # ok 3 vlan.test.8021ad_hw
>   # ok 4 vlan.test.8021ad_sw
>   # ok 5 vlan.test.qinq_hw
>   # ok 6 vlan.test.qinq_sw
>   # # Totals: pass:6 fail:0 xfail:0 xpass:0 skip:0 error:0

> +def _setup(cfg, outer_proto, inner_proto, hw_strip):
> +    """Configure VLAN stripping and create the VLAN interfaces."""
> +
> +    feat = ethtool(f"-k {cfg.ifname}", json=True)[0]
> +    set_ethtool_feat(cfg.ifname, feat, {"rx-vlan-offload": hw_strip})


+        if current[name]["active"] != state:
+            no_change = False
+            if current[name]["fixed"]:
+                raise KsftXfailEx(f"Device does not support {name}")

I'm not too familiar with the self test framework, so i could have
this wrong.

It looks to me like you fail the text if it is fixed. But does not
fixed just mean the hardware does not support it? So i think it should
actually skip the test?

Now, if it does not say fixed, but ethtool -K reports EOPNOTSUPP, that
would be an error.

Having said that, thanks for spending the time to add a test. We need
more tests like this.

     Andrew


  reply	other threads:[~2026-08-23  0:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 17:09 [PATCH net v2 0/6] net: stmmac: Fix double VLAN 802.1ad tag handling Ovidiu Panait
2026-08-21 17:09 ` [PATCH net v2 1/6] net: stmmac: Remove VLAN perfect matching dead code Ovidiu Panait
2026-08-23  7:48   ` Maxime Chevallier
2026-08-21 17:09 ` [PATCH net v2 2/6] net: stmmac: Enable double VLAN processing only when supported Ovidiu Panait
2026-08-23  7:49   ` Maxime Chevallier
2026-08-24  6:47   ` Joseph Steel
2026-08-24 14:06     ` Ovidiu Panait
2026-08-21 17:09 ` [PATCH net v2 3/6] net: stmmac: Move double VLAN handling to a dedicated op Ovidiu Panait
2026-08-23  7:52   ` Maxime Chevallier
2026-08-21 17:09 ` [PATCH net v2 4/6] net: stmmac: Disable double VLAN handling on dwmac4 Ovidiu Panait
2026-08-21 17:09 ` [PATCH net v2 5/6] selftests: drv-net: Move _set_ethtool_feat() into lib Ovidiu Panait
2026-08-21 17:09 ` [PATCH net v2 6/6] selftests: drv-net: Add VLAN test Ovidiu Panait
2026-08-23  0:04   ` Andrew Lunn [this message]
2026-08-24 11:50     ` Ovidiu Panait
2026-08-24 17:42       ` 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=d614d8de-0da2-4673-bd11-02497d8a37e0@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=joabreu@synopsys.com \
    --cc=jun.ann.lai@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=ovidiu.panait.rb@renesas.com \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=yi.fang.gan@intel.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