From: Jakub Kicinski <kuba@kernel.org>
To: Kiran Kella <kiran.kella@broadcom.com>
Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
jayakrishnan.udayavarma@broadcom.com, ajit.khaparde@broadcom.com,
akhilesh.samineni@broadcom.com
Subject: Re: [net-next 2/2] selftests: drv-net: psp: add test for VLAN sub-interface
Date: Wed, 21 Jan 2026 20:18:10 -0800 [thread overview]
Message-ID: <20260121201810.27d2f970@kernel.org> (raw)
In-Reply-To: <20260121073517.3323332-3-kiran.kella@broadcom.com>
On Tue, 20 Jan 2026 23:35:17 -0800 Kiran Kella wrote:
> --- a/tools/testing/selftests/drivers/net/psp.py
> +++ b/tools/testing/selftests/drivers/net/psp.py
> @@ -17,7 +17,7 @@ from lib.py import ksft_not_none
> from lib.py import KsftSkipEx
> from lib.py import NetDrvEpEnv, PSPFamily, NlError
> from lib.py import bkg, rand_port, wait_port_listen
> -
> +from lib.py import ip
>
don't clean up this white space, double new line is a thing in Python
for some reason
> def _get_outq(s):
> one = b'\0' * 4
> @@ -568,6 +568,119 @@ def removal_device_bi(cfg):
> finally:
> _close_conn(cfg, s)
>
> +def vlan_basic_send(cfg):
> + """
> + Test PSP over VLAN-to-VLAN traffic
> +
> + Network topology:
> + Local VLAN (nsim0.100) <---> Remote VLAN (nsim1.100)
> + | |
> + Local Physical (nsim0) <---> Remote Physical (nsim1)
> + [PSP configured here]
> + """
> + cfg.require_nsim()
why would this only work on nsim?
> + _init_psp_dev(cfg)
> +
> + # Store original interface names and addresses
> + orig_local_ifname = cfg.ifname
> + orig_local_ifindex = cfg.ifindex
> + orig_remote_ifname = cfg.remote_ifname
> + orig_local_addr_v4 = cfg.addr_v["4"]
> + orig_local_addr_v6 = cfg.addr_v["6"]
> + orig_remote_addr_v4 = cfg.remote_addr_v["4"]
> + orig_remote_addr_v6 = cfg.remote_addr_v["6"]
maybe instead of all this saving and restoring just make and object and
give it all the attributes so that it looks like cfg? Instead of
modifying the real cfg I mean.
> + # VLAN configuration
> + vlan_id = 100
> + local_vlan_ifname = f"{orig_local_ifname}.{vlan_id}"
> + remote_vlan_ifname = f"{orig_remote_ifname}.{vlan_id}"
> +
> + local_vlan_addr_v4 = "192.0.2.21"
> + remote_vlan_addr_v4 = "192.0.2.22"
> + local_vlan_addr_v6 = "2001:db8::21"
> + remote_vlan_addr_v6 = "2001:db8::22"
> +
> + try:
> + # Create VLAN interface on LOCAL side
> + ip(f"link add link {orig_local_ifname} name {local_vlan_ifname} type vlan id {vlan_id}")
please use defer()
prev parent reply other threads:[~2026-01-22 4:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 7:35 [net-next 0/2] psp: Support PSP Tx on logical devices like VLAN Kiran Kella
2026-01-21 7:35 ` [net-next 1/2] psp: Support for transmit on logical device when the underlying transport device supports PSP Kiran Kella
2026-01-22 4:19 ` [net-next,1/2] " Jakub Kicinski
2026-01-21 7:35 ` [net-next 2/2] selftests: drv-net: psp: add test for VLAN sub-interface Kiran Kella
2026-01-22 4:18 ` 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=20260121201810.27d2f970@kernel.org \
--to=kuba@kernel.org \
--cc=ajit.khaparde@broadcom.com \
--cc=akhilesh.samineni@broadcom.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jayakrishnan.udayavarma@broadcom.com \
--cc=kiran.kella@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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