diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-05-01 13:29:53 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-05-03 00:04:01 +0200 |
commit | 954f46d2f0b4a76405a5e0788e3f80a24c657fd4 (patch) | |
tree | 3eb03b9b8e6d888dc794848fbae65a93a0cec584 /net/vmw_vsock/virtio_transport.c | |
parent | ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL (diff) | |
download | linux-954f46d2f0b4a76405a5e0788e3f80a24c657fd4.tar.xz linux-954f46d2f0b4a76405a5e0788e3f80a24c657fd4.zip |
selftests: forwarding: add Per-Stream Filtering and Policing test for Ocelot
The Felix VSC9959 switch in NXP LS1028A supports the tc-gate action
which enforced time-based access control per stream. A stream as seen by
this switch is identified by {MAC DA, VID}.
We use the standard forwarding selftest topology with 2 host interfaces
and 2 switch interfaces. The host ports must require timestamping non-IP
packets and supporting tc-etf offload, for isochron to work. The
isochron program monitors network sync status (ptp4l, phc2sys) and
deterministically transmits packets to the switch such that the tc-gate
action either (a) always accepts them based on its schedule, or
(b) always drops them.
I tried to keep as much of the logic that isn't specific to the NXP
LS1028A in a new tsn_lib.sh, for future reuse. This covers
synchronization using ptp4l and phc2sys, and isochron.
The cycle-time chosen for this selftest isn't particularly impressive
(and the focus is the functionality of the switch), but I didn't really
know what to do better, considering that it will mostly be run during
debugging sessions, various kernel bloatware would be enabled, like
lockdep, KASAN, etc, and we certainly can't run any races with those on.
I tried to look through the kselftest framework for other real time
applications and didn't really find any, so I'm not sure how better to
prepare the environment in case we want to go for a lower cycle time.
At the moment, the only thing the selftest is ensuring is that dynamic
frequency scaling is disabled on the CPU that isochron runs on. It would
probably be useful to have a blacklist of kernel config options (checked
through zcat /proc/config.gz) and some cyclictest scripts to run
beforehand, but I saw none of those.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Link: https://lore.kernel.org/r/20220501112953.3298973-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/vmw_vsock/virtio_transport.c')
0 files changed, 0 insertions, 0 deletions