100 Commits
Author SHA1 Message Date
Tobias WaldekranzandGitHub ebb37732f4 Merge pull request #1177 from kernelkit/multi-dsa-tree-fixes
Multi DSA tree fixes
2025-10-02 16:09:19 +02:00
Tobias Waldekranz 94f8d1a700 common: nameif: Handle nested dsa ports
In setups like this...

    CPU
    eth0
     |
.----0----.
| dst0sw0 |
'-1-2-3-4-'
        |
   .----0----.
   | dst1sw0 |
   '-1-2-3-4-'

...both eth0 and dst0sw0p4 are DSA ports. But the latter is _also_ a
physical port as far as devlink is concerned. As a result, it would
first be marked as "internal" and is then instantly reclassified as a
"port".

Catch this condition and stick with the initial "internal"
classification.
2025-10-02 14:51:34 +02:00
Tobias Waldekranz 39b4101d19 common: has-quirk: Add support for matching based on "ethtool -i"
In addition to matching on interface names, add support for matching
on ethtool information.

Example:

    {
        "@ethtool:driver=st_gmac": {
	    "broken-mqprio": true
	}
    }

This would mark any interface using the "st_gmac" driver as having a
broken mqprio implementation. Whereas this:

    {
        "@ethtool:driver=st_gmac;bus-info:30bf0000.ethernet": {
	    "broken-mqprio": true
	}
    }

Only matches an st_gmac-backed interface at the specified location.

As matching becomes more complicated, use the shell implementation
from confd as well, to make sure that they are always in agreement.
2025-10-02 14:51:29 +02:00
Tobias WaldekranzandGitHub 6717bbbe26 Merge pull request #1117 from kernelkit/test-stability
Test stability
2025-08-27 13:23:15 +02:00
Tobias Waldekranz bc6180680d x86_64: Build kernel with debug info, like all other archs
The defconfigs for all architectures other than x86_64 has this
enabled, so align it with the rest.

This has no on-target impact, but it enables us to attach to a live VM
instance and debug it, or do offline debugging like resolving stack
trace lines from oops messages to source locations.
2025-08-14 13:03:07 +02:00
Tobias WaldekranzandGitHub d6c0d4bea7 Merge pull request #1042 from kernelkit/ixbin
ixbin: Add util script to update image contents
2025-07-04 11:23:33 +02:00
Tobias Waldekranz 85c4b579d3 ixbin: Add util script to update image contents
[skip-ci]
2025-07-04 11:20:46 +02:00
Tobias WaldekranzandGitHub d6d621af36 Merge pull request #1047 from kernelkit/ix-board-fix
board: Make ix-board reusable from upper externals
2025-05-16 22:32:06 +02:00
Tobias Waldekranz e6ea2991e1 board: Make ix-board reusable from upper externals
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
2025-05-16 20:06:09 +02:00
Tobias WaldekranzandGitHub 71295e0e37 Merge pull request #1027 from kernelkit/add-mqprio-quirk
imx8mp-evk: Disable mqprio for eth1
2025-04-28 16:57:36 +02:00
Tobias WaldekranzandGitHub 794872ca0c Merge pull request #1028 from kernelkit/bump-finit
Bump Finit to v4.12
2025-04-28 08:09:52 +02:00
Tobias WaldekranzandGitHub ff5b71b825 Merge pull request #1019 from kernelkit/move-operational
statd: Move operational from confd to statd (yanger)
2025-04-23 16:18:42 +02:00
Tobias WaldekranzandGitHub a868307637 Merge pull request #998 from kernelkit/mvpp2-tcam-fix-main
patches/linux: net: mvpp2: Prevent parser TCAM memory corruption
2025-03-31 11:27:03 +02:00
Tobias Waldekranz d213861e02 patches/linux: net: mvpp2: Prevent parser TCAM memory corruption
[skip ci]
2025-03-31 11:26:27 +02:00
Tobias WaldekranzandGitHub 08658a37c4 Merge pull request #996 from kernelkit/update-kernel
Upgrade linux kernel to 6.12.21 (LTS)
2025-03-31 08:07:07 +02:00
Tobias WaldekranzandGitHub 41fa664a86 Merge pull request #984 from kernelkit/update-kernel
Update kernel to 6.12.19 (LTS)
2025-03-13 20:02:07 +01:00
Tobias WaldekranzandGitHub 88fa47c664 Merge pull request #955 from kernelkit/lingering-containers
Lingering containers
2025-02-25 13:41:55 +01:00
Tobias WaldekranzandGitHub 0dbf99cc82 Merge pull request #958 from kernelkit/upgrade-kernel
Upgrade linux kernel to 6.12.16 (LTS)
2025-02-24 10:53:45 +01:00
Tobias WaldekranzandGitHub 5707711d84 Merge pull request #926 from kernelkit/test-doc
Create test/README.md
2025-02-22 12:16:33 +01:00
Tobias WaldekranzandGitHub 5b3eb23aeb Merge branch 'main' into test-doc 2025-02-22 12:15:29 +01:00
Tobias WaldekranzandGitHub ee26cec88a Merge pull request #952 from kernelkit/imx8mp-evk
i.MX8MP EVK Support
2025-02-20 21:52:09 +01:00
Tobias Waldekranz 88763034ed board: imx8mp-evk: Add 2025-02-20 14:39:46 +01:00
Tobias Waldekranz dad1c024aa confd: Support interfaces that detach from their PHYs when down
Some netdev drivers, e.g. the FEC found on many i.MX SoCs from NXP,
will detach from their PHYs when configured down.

This means that when confd tries to configure L1 settings for the link
before bringing it up, ethtool fails - since there is no PHY to talk
to.

For interfaces that behave this way, delay the configuration until
after NETDAG_INIT, when the interface is brought up. This is not
optimal, since we are generating needless noise for the link partner,
which is why we only fall back to it as a last resort.

Fix #951
2025-02-20 14:39:05 +01:00
Tobias Waldekranz f92d3846db confd: Let products declare quirks of particular interfaces
Ideally, all drivers should behave the same. Alas, that is not the
world we live in. For quirks that we can not reliably probe for in any
other way, let products supply a JSON file that declares them.
2025-02-20 14:35:50 +01:00
Tobias WaldekranzandGitHub ffab761274 Merge pull request #948 from kernelkit/update-kernel
Update kernel to 6.12.14 (LTS)
2025-02-17 20:55:46 +01:00
Tobias Waldekranz 4d7dde5366 test: bridge_stp_basic: Skip on multi-chip mv88e6xxx systems
Until we fix kernelkit/linux#2, tag the affected nodes as providing
"broken-stp", and skip this test on those rigs.
2025-02-16 10:55:03 +01:00
Tobias Waldekranz 3c0679991d confd: bridge: Refactor init_snippets() to avoid unreachable code
Fix coverity CID 464653
2025-02-16 10:55:03 +01:00
Tobias Waldekranz fe741a92f3 confd: Explicitly return OK when registration is successful
Fix coverity CID 464654
2025-02-16 10:55:03 +01:00
Tobias Waldekranz f6879e24cc bin: Fix unchecked return codes
Fix coverity CID 425560
2025-02-16 10:55:03 +01:00
Tobias Waldekranz 7e252ba941 confd: Fix unchecked return codes
Fix coverity CIDS:
- 464651
- 464652
- 464655
- 507413
- 507414
2025-02-16 10:55:03 +01:00
Tobias Waldekranz 46d5e750d7 confd: Simplify GRE and VXLAN iface setup
CID 507415 from coverity was the origin for this change. As it turns
out, the unreachable MAC address generation for VXLANs was hidden by
the generic setup (netdag_gen_link_addr()) saving the day. That is
likely something we want to phase out though, so the VXLAN code should
stand on its own.

Align the GRE code while we're here, because why not? :)
2025-02-16 10:51:27 +01:00
Tobias WaldekranzandGitHub eee1ce32fa Merge pull request #940 from kernelkit/remove-etherlike
Remove etherlike
2025-02-14 21:28:46 +01:00
Tobias WaldekranzandGitHub c5db34b491 Merge pull request #873 from kernelkit/lag
Add support for static & lacp link aggragetes
2025-02-13 09:23:44 +01:00
Tobias Waldekranz 3d816d2525 linux: Import mv88e6xxx standalone LAG fix 2025-02-12 23:22:11 +01:00
Tobias Waldekranz fb394db981 test: lag_*: Ensure that links making up a LAG are compatible
Do not allow the topology matcher to setup a LAG where one link is
running at 10G while the other one runs at 1G, since the bond will
never use the 1G port as long as there the 10G link is up.
2025-02-12 23:22:10 +01:00
Tobias Waldekranz da39855cec test: infamy: Allow tests to refine the topology matching process
To run LAG tests on hardware, we have to make sure that the chosen
links are running at the same speed.  We do not want to require a
specific link speed from the logical topology, as the real requirement
is merely that the two (or however many) links are of the _same_
speed, not any _particular_ speed.

Rather than having to complicate the topology matcher, let it take
care of the common pattern of matching requirements to provided
features, then let tests pass custom node/edge matchers for the
complicated cases.
2025-02-12 23:22:09 +01:00
Tobias WaldekranzandGitHub d3bfbb57b6 Merge pull request #937 from kernelkit/update-kernel
Update linux kernel to 6.12.13 (LTS)
2025-02-11 21:58:00 +01:00
Tobias Waldekranz 3203ee925a confd: Add missing interface type for loopback 2025-02-11 20:37:03 +01:00
Tobias Waldekranz fae1265587 confd: Refactor custom-phys-address setup
The management of custom-phys-address was made more complicated by the
fact that physical interfaces require restoring the permanent address
when a custom setting is removed.

Simplify this by moving the restoration to the delete path, so we only
have to worry about if there is a custom mac or not during interface
setup.

Also:
- Fix some legacy naming on *_gen() functions
- Fix custom-phys-address on dummy interfaces
2025-02-11 20:37:02 +01:00
Tobias Waldekranz 97f3db8fdb confd: Always generate a valid interface DAG
Fix #938

Before this change, interface dependencies were only setup when
interfaces were created. This led to problems in flows like this:

1.
    configure
        set interface br0
        set interface br0.10
        leave

2.
    configure
        set interface dummy0
        leave

2.
    configure
        no interface br0
        no interface br0.10
        leave

Since neither br0 nor br0.10 was created in (2), no dependencies were
setup. Because of that, when the deletion scripts from generation (2)
are generated when entering (3), dagger is free to execute them in any
order. This means that it may choose to remove br0 before br0.10,
which will mean that br0.10 is already gone when we try to remove it.

Therefore, make sure that we generate the full dependency graph on
every iteration.

Also, get rid of the need to keep on-disk state for VETH pairs, and
use the name as a descriminator for which side to create/delete.
2025-02-11 20:37:01 +01:00
Tobias Waldekranz a8b5120871 confd: Allow reconfigurations on dummy and gre interfaces
With the new iftype enum, we see that configuring an existing dummy or
gre interface types was wrongly classified as an error rather than as
a NOP.

Example, before this change, this was OK:

    configure
    set interface foo
    set interface foo ipv4 address 10.0.0.1 prefix-length 24
    leave

However, this was not:

     configure
     set interface foo
    +leave
    +configure
     set interface foo ipv4 address 10.0.0.1 prefix-length 24
     leave
    +<KABOOM>
2025-02-11 20:37:00 +01:00
Tobias Waldekranz c22339c2cd confd: Create an enumerator for interface types
This has multiple advantages:

- Less chances of typos is repeated "infix-if-type:foo" strings
  scattered throughout the code

- We can lean on GCC's `-Werror=switch` to make sure that iface
  specific logic always handles all types (which was not always the
  case - see follow-up commits)

- We can potentially create a `struct afspec_ops` in the future, which
  could then be indexed by this enum
2025-02-11 20:36:27 +01:00
Tobias Waldekranz b1830a36d4 confd: Remove unneeded nodes from the interface DAG
The only interfaces that would be in difs, but not in cifs, are
deleted interfaces. But these will be removed from the exit action of
the previous generation, and will never be referenced in the new
generation.
2025-02-11 14:46:31 +01:00
Tobias WaldekranzandGitHub a608c4a36d Merge pull request #928 from kernelkit/update-generate-defconfig
generate-defconfig.sh: Allow to have multiple change configurations
2025-02-04 14:24:37 +01:00
Tobias WaldekranzandGitHub 84521ea9b5 Merge pull request #927 from kernelkit/qemu-speedup 2025-02-03 21:57:45 +01:00
Tobias WaldekranzandGitHub d9be0b3a64 Merge pull request #918 from kernelkit/changelog-869
Update ChangeLog.md
2025-01-30 13:39:58 +01:00
Tobias Waldekranz 8b4682ac8b Update ChangeLog.md
[skip ci]
2025-01-30 13:39:22 +01:00
Tobias WaldekranzandGitHub be0edc00cc Merge pull request #913 from kernelkit/fix-bug-in-test-mode
Fix error when running 251+ reconfigurations (in test-mode)
2025-01-27 20:34:17 +01:00
Tobias WaldekranzandGitHub 2f23baf745 Merge pull request #909 from kernelkit/update-kernel
Update kernel to latest LTS (6.12.11)
2025-01-24 22:20:49 +01:00
Tobias WaldekranzandGitHub a7ce8c2ab4 Merge pull request #910 from kernelkit/stp-operational
Operational data support for STP
2025-01-24 21:53:05 +01:00
Tobias Waldekranz 0187d62246 test: bridge_stp_basic: Add explicit prioritiy test 2025-01-24 16:48:16 +01:00
Tobias Waldekranz 01201708e3 test: statd: Update test data after moving STP port state 2025-01-24 15:17:13 +01:00
Tobias Waldekranz 986a28c891 confd: Avoid managing a finit user condition to start/stop mstpd
By declaring the service as manually configured, we can control it
from dagger (confd) without the indirection via a condition.

This has the benefit of mstpd being in the "stopped", rather than the
somewhat confusing "waiting", state when not running.

Fixes #890
2025-01-24 14:52:25 +01:00
Tobias Waldekranz 0bbcd7ec43 board/common: show: Add show stp 2025-01-24 14:52:25 +01:00
Tobias Waldekranz f9dacaa0ff klish-plugin-infix: Add show bridge stp 2025-01-24 14:52:25 +01:00
Tobias Waldekranz 8f6a75806f yang: Add STP hello-time
This was an oversight in the original model, but was noticed in
review.
2025-01-24 14:52:25 +01:00
Tobias Waldekranz 05cb07c0ec cli_pretty: Add per-port status to show bridge stp 2025-01-24 14:52:25 +01:00
Tobias Waldekranz d6ace7cc73 cli_pretty: Add bridge-wide status to show bridge stp 2025-01-24 14:52:25 +01:00
Tobias Waldekranz 9ef6d2d038 yang: Remove old STP port state from operational 2025-01-24 14:52:25 +01:00
Tobias Waldekranz c1e6f0c53b yanger: Provide per-port STP state 2025-01-24 14:52:25 +01:00
Tobias Waldekranz 0e82c108bc yanger: Provide bridge-wide STP state 2025-01-24 14:52:25 +01:00
Tobias Waldekranz 9427b6a655 yanger: Generalize converting time deltas to YANG dates
Make sure that we have one way of getting from Python's native
datetime to a YANG compatible format.
2025-01-24 14:52:25 +01:00
Tobias Waldekranz 6a09e2c797 yang: Define operational data model for per-port STP state 2025-01-24 14:52:25 +01:00
Tobias Waldekranz 3b0b38360c yang: Define operational data model for bridge-wide STP state 2025-01-24 14:52:25 +01:00
Tobias WaldekranzandGitHub 3b3fe18f9d Merge pull request #907 from kernelkit/provides-requires
Match on Edge Attributes when Mapping Topologies
2025-01-24 12:43:08 +01:00
Tobias WaldekranzandGitHub 5e90bde8b9 Merge pull request #903 from kernelkit/yanger-missing-container-iface-fix
yanger: Handle the case when a container interface can not be found
2025-01-22 21:55:05 +01:00
Tobias Waldekranz 0b2f53e3b4 test: ssh_*: Wait for server start before further testing commences
On slow systems, we don't want test steps involving tools like scp or
ssh-keyscan to fail because the server had not come up yet.

Therefore, make sure that the server is ready to accept connections
before moving on to subsequent test steps.
2025-01-22 20:32:33 +01:00
Tobias Waldekranz 1fd55c484a test: ssh_key_authentication: Consolidate and mark static data
Use CAPTIALIZED names for static data and collect them at the top.

Make a note about for future readers about why a test called
ssh_key_authentication suspiciously does not enable the SSH service :)
2025-01-22 20:32:17 +01:00
Tobias Waldekranz 1d13c5ea9e test: infamy: Generalize netconf_syn() to test for any TCP service
Being able to check for a TCP based service is generally useful, not
only for NETCONF. Therefore, break it out to a separate function that
allows any port to be queried.
2025-01-22 20:16:47 +01:00
Tobias Waldekranz 19c1f49fd3 test: Whitespace cleanup 2025-01-22 15:53:41 +01:00
Tobias Waldekranz c2959cf41e yanger: Handle the case when a container interface can not be found
Due to #902 (which has not been root caused at this time), podman may
indicate the existance of an interface that yanger is not able to
locate in any namespace. Therefore, make sure that we verify that the
interface was actually found before trying to create the operational
data for it.
2025-01-22 14:11:37 +01:00
Tobias WaldekranzandGitHub a640460baf Merge pull request #895 from kernelkit/yanger
Yanger Interfaces Refactor
2025-01-22 10:27:44 +01:00
Tobias Waldekranz 5d6180a395 yanger: Improve option names and validation after review
Break up the --test parameter into either:

--capture: Write system command output to a local directory for later
           consumption by...
--replay:  Which can replay a previous capture

Rename --wrap-commands => --cmd-prefix
2025-01-22 09:44:52 +01:00
Tobias Waldekranz 57c8d0cf1b test: statd: Add unittest for bridge-mdb 2025-01-20 13:44:14 +01:00
Tobias Waldekranz f4c9a57bb5 test: statd: Add unittest for ietf-{hardware,system} 2025-01-20 13:44:14 +01:00
Tobias Waldekranz 9879e8b685 test: statd: Add unittest for containers 2025-01-20 13:44:14 +01:00
Tobias Waldekranz beecff2acf test: statd: Refactor cli and yanger testing
Existing tests relied on manually captured system data from various
points in Infix's history, making them hard to extend as we add new
features.

Move to a new model where we:

To update a unit test:
1. Use Infamy tests to setup a DUT in a known state
2. Use yanger's wrapper mode to capture the system state needed to
   produce operational data for a set of YANG models
3. Use cli-pretty to create the expected output for a set of show
   commands

When running unit tests, we can then use the captured data to verify
that yanger and cli-pretty works as expected without the need for a
running Infix system - just like before.  The difference is that it is
now much easier to capture a new snapshot when the system evolves.
2025-01-20 13:44:14 +01:00
Tobias Waldekranz 6f2face898 test: verify_all_interface_types: Add GRE tunnels
Ensure that all flavors of GRE tunnels can be configured. In addition
to the increased test coverage, it will also be useful as a basis for
collecting representative system state for CLI testing.
2025-01-20 13:44:14 +01:00
Tobias Waldekranz ddc8282dd7 test: verify_all_interface_types: Add IP addresses
Having addresses configured is useful when using this test to collect
representative system state for CLI testing.
2025-01-20 13:44:14 +01:00
Tobias Waldekranz c244042e55 test: verify_all_interface_types: Add bridge VLANs
Ensure that VLANs can be configured on VLAN filtering bridges. In
addition to the increased test coverage, it will also be useful as a
basis for collecting representative system state for CLI testing.
2025-01-20 13:44:14 +01:00
Tobias Waldekranz 78b7b34799 yanger: Break up ietf-interfaces implementation into modules 2025-01-20 10:56:56 +01:00
Tobias Waldekranz e397012394 yanger: Add support for connecting to remote hosts
Allow all host commands to be run with a prefix (e.g. `ssh
user@remotehost sudo`), such that yanger can be tested against the
current state of a remote system.

If a command wrapper _and_ a test directory is specified, the output
of all commands and files are recorded for use by a future test
execution.

Example:

1. Launch a `make run` instance and setup some config for which we
   want to test yanger and cli-pretty

2. Capture the output of all commands needed to produce the data for
   some YANG model:
   `yanger -t /tmp/ifs -w "ixll -A ssh qtap1 sudo" ietf-interfaces`

3. Kill the instance (we do not need it any more)

4. Test cli-pretty using the captured state:
   `yanger -t /tmp/ifs ietf-interfaces | cli-pretty show-interfaces
`
2025-01-20 10:56:56 +01:00
Tobias Waldekranz be1b7cdf45 confd: Enable remote SSH access via IPv6 in {factory,failure}-config
The default was set to only accept connections from localhost when
connecting via IPv6. This was not caught in testing since the
test-config accepts connections from all hosts (::).

Accept connections from all hosts in all builtin configs. Inherit
test-config's service definition from factory-config, since we want
testing to be done as close as possible to what are users are running.
2025-01-17 14:33:41 +01:00
Tobias Waldekranz 41f3fe15a6 confd: Drop unsupported default-priority bridge port option 2025-01-17 14:33:41 +01:00
Tobias Waldekranz df3a55d6a0 ixll: Disable key checking for admin:admin sessions
This is a shorthand for the common case when we're attaching to a
random Infix device during testing, so don't bother with key checking.
2025-01-17 14:33:41 +01:00
Tobias Waldekranz 4e83520b0e ixll: Fix ping(8)s that require all options precede address
The default ping(8) shipped with alpine does not support `ping <addr>
-c1`, but happily executes `ping -c1 <addr>`. Therefore, make sure
that the address is always the last argument.
2025-01-17 14:33:41 +01:00
Tobias WaldekranzandGitHub 94cd526772 Merge pull request #888 from kernelkit/vxlan
Add simple VXLAN support
2025-01-15 10:36:00 +01:00
Tobias WaldekranzandGitHub 147cb713ed Merge pull request #884 from kernelkit/test-spec-ng
Test specification refactor
2025-01-11 23:40:06 +01:00
Tobias WaldekranzandGitHub cf129d1f9c Merge pull request #883 from kernelkit/yanger
Yanger Modularization
2025-01-10 11:21:35 +01:00
Tobias Waldekranz 41b96e8a01 utils/ixyang: Simplify linting of infix YANG models
Usage examples:

Run yanglint on all infix models:

    ixyang check

Lint a single model:

    ixyang lint infix-interfaces

Dump a tree of ietf-interfaces with all infix augments:

    ixyang lint infix-interfaces ietf-interfaces -- -f tree
2025-01-10 10:12:22 +01:00
Tobias Waldekranz 805ddf6c92 utils: Make srop's output directory resolution reusable 2025-01-10 10:12:22 +01:00
Tobias Waldekranz 547a9cd632 yanger: Remove dead code remaining after modularization 2025-01-10 10:12:22 +01:00
Tobias Waldekranz 2ec226640e yanger: Move ietf-{interfaces,routing} implementations to separate modules
Should this have been two commits: yes.

Should we spend time on splitting them after the fact because yours
truly dropped the ball: no.
2025-01-10 10:12:22 +01:00
Tobias Waldekranz a0e4e813dd yanger: Move ietf-ospf implementation to separate module 2025-01-10 09:57:40 +01:00
Tobias Waldekranz 8812ae7052 yanger: Move ietf-hardware implementation to separate module 2025-01-10 09:57:40 +01:00
Tobias Waldekranz 28bf2d6c3c yanger: Move infix-containers implementation to separate module 2025-01-09 23:59:20 +01:00
Tobias Waldekranz dadf0e2d16 yanger: Start the modularization process with ietf-system
The yanger source grown significantly, code is disorganized, the
namespace is all over the place, etc.

Take a stab at remedying the situation by splitting out the individual
YANG models in separate Python modules, starting with ietf-system.
2025-01-09 23:59:20 +01:00
Tobias Waldekranz c4a79766b7 statd: Make sure subpackages in python packages are distributed
Rather than explicitly defining the sources, specify the package names
and let poetry figure out the details. Otherwise, subpackages are not
included, which we want to start using in yanger.
2025-01-09 16:23:26 +01:00
Tobias Waldekranz 385eab2016 statd: Ignore generated Python byte code files
When interactively running, for exampe, yanger interactively from the
source tree, we end up with compiled files in our working tree. Make
sure to ignore these.
2025-01-09 16:02:43 +01:00
Tobias Waldekranz bc33d8bc8a confd: Reactivate supported interface counter in-total-frames
This was always supported, but was accendentally marked as
not-supported.
2025-01-09 16:02:36 +01:00