Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f210174c2 | ||
|
|
c81b03e1ca | ||
|
|
bca13137a3 | ||
|
|
6ba13776df | ||
|
|
1323d2f266 | ||
|
|
79d7e8bbab | ||
|
|
5a38e8768b | ||
|
|
c23b9c2dc4 | ||
|
|
5261e4f66f | ||
|
|
a6b7b3d2c0 | ||
|
|
b4d6c787d5 | ||
|
|
58b2ade1e6 | ||
|
|
228c93e430 | ||
|
|
2938efc8a4 | ||
|
|
ae82f7fdcf | ||
|
|
fbddedb51b | ||
|
|
43e2201dd1 | ||
|
|
b8b0cd3377 | ||
|
|
6b63b2f9b4 | ||
|
|
142eda81d5 | ||
|
|
fb3c026288 | ||
|
|
b0f4192f24 | ||
|
|
b9492c7bee | ||
|
|
31061fcc10 | ||
|
|
3e8ead6f92 | ||
|
|
b00b6cd6ea | ||
|
|
ba60b8b494 | ||
|
|
1e5d4612c9 | ||
|
|
b359ac794d | ||
|
|
3b00a376b1 | ||
|
|
00cdff1d2d | ||
|
|
3e5e89b328 | ||
|
|
56d1964559 | ||
|
|
0112113028 | ||
|
|
967bfc1e67 | ||
|
|
0284e2ca58 | ||
|
|
710616f8c4 | ||
|
|
dbf0fd2514 | ||
|
|
aefb90f8f3 | ||
|
|
49660b7771 | ||
|
|
55a20bb4c7 | ||
|
|
3b2bdbf93c | ||
|
|
04c843e095 | ||
|
|
1aa5169641 | ||
|
|
594d074f7a | ||
|
|
b81407e7d9 | ||
|
|
8fc0ab9b2f | ||
|
|
3b3656c8f5 | ||
|
|
0eb1fe0ab0 | ||
|
|
9be43ed0bb | ||
|
|
604f22e315 | ||
|
|
76f0c8e3e6 | ||
|
|
d36296da42 | ||
|
|
9f33658127 | ||
|
|
767a1f194b | ||
|
|
c7760a68cb | ||
|
|
933613e6a3 | ||
|
|
14fde1bf90 | ||
|
|
64c20d96ad | ||
|
|
a1771ff5c6 | ||
|
|
a7e7b75a97 | ||
|
|
822cb93265 | ||
|
|
cedb654643 | ||
|
|
52eafa70a8 | ||
|
|
6ba8e3bf55 | ||
|
|
f119138107 | ||
|
|
5c822efa6f | ||
|
|
19d5f1db1c | ||
|
|
438e39d2fe | ||
|
|
0ee973b2b2 | ||
|
|
c0e68579c1 | ||
|
|
5b61ccd960 | ||
|
|
1dd761560d | ||
|
|
076d174579 | ||
|
|
1470c473f6 | ||
|
|
9ae7115bbf | ||
|
|
f9a0c71b1f |
@@ -0,0 +1,35 @@
|
||||
Checklists for Pull Requests and Releases
|
||||
=========================================
|
||||
|
||||
Maintainer checklists for reviewing pull requests and doing releases.
|
||||
|
||||
|
||||
Pull Requests
|
||||
-------------
|
||||
|
||||
- If applicable, is there a readable ChangeLog entry?
|
||||
- If any LICENSE file has been updated, has the `.hash` file been updated?
|
||||
- If any change to a Finit `.svc` file, does any run/task linger?
|
||||
I.e., is there a runlevel and/or condition defined to prevent them
|
||||
from running outside of their intended runlevel?
|
||||
- If any change to grub or qemu/qeneth setup, has it been tested in GNS3?
|
||||
- If any change to u-boot/buildroot, has it been tested with `<booloader>_defconfig`
|
||||
- If any change to logging, have the resulting logs been audited?
|
||||
- Check for duplicate entries, misspellings
|
||||
- Check for sneaky severity changes, e.g., error vs note, error vs warning
|
||||
- If new subsystem, or major changes to a subsystem, have the docs been updated?
|
||||
- If change to mDNS, has it been tested with netbrowse?
|
||||
- If change to `_defconfig`, verify `local.mk` and sync with other archs
|
||||
- Test manually as well, e.g., CLI changes do not have ha regression tests
|
||||
- Build from distclean, or use artifacts built by build servers, for manual tests
|
||||
|
||||
|
||||
Releases
|
||||
--------
|
||||
|
||||
- Make at least one -betaN release to verify the GitHub workflow well in time release day
|
||||
- Stuff happens, remember kernelkit/infix#735
|
||||
- Make at least one -rcN to flush out any issues in customer repos
|
||||
- Easy to forget adaptations/hacks in customer repos -- may need Infix change/support
|
||||
- Ensure the markdown link for the release diff is updated
|
||||
- Ensure subrepos are tagged (can be automated, see kernelkit/infix#393)
|
||||
@@ -1,5 +1,5 @@
|
||||
Contributing to Infix
|
||||
=====================
|
||||
Contributing Guidelines
|
||||
=======================
|
||||
|
||||
Thank :heart: you for taking the time to read this!
|
||||
|
||||
@@ -12,6 +12,7 @@ If you are unsure how to start implementing an idea or fix:
|
||||
- :bug: open an issue, there are human friendly templates for _bugs_
|
||||
and _feature requests_ at <https://github.com/kernelkit/infix/issues>
|
||||
- :speech_balloon: use the [Q&A Forum][discuss]
|
||||
- :technologist: The [Developer's Guide][devguide] is also a useful start
|
||||
|
||||
> _Talking about code and problems first is often the best way to get
|
||||
> started before submitting a pull request. We have found it always
|
||||
|
||||
@@ -4,9 +4,9 @@ project on GitHub, and Discord, see <https://github.com/kernelkit>:
|
||||
:speech_balloon: <https://github.com/orgs/kernelkit/discussions>
|
||||
:bug: <https://github.com/kernelkit/infix/issues>
|
||||
|
||||
Support contracts, development of new features, customer branding of
|
||||
Infix, and even customer specific features for dedicated products is
|
||||
provided by Addiva Elektronik.
|
||||
Support contracts, development of new features, fast-tracking of reviews
|
||||
and contributions, customer branding of Infix, and even customer specific
|
||||
features for dedicated products is provided by Addiva Elektronik.
|
||||
|
||||
:globe_with_meridians: <https://www.addiva.se/electronics/>
|
||||
:e-mail: <mailto:ael@addiva.se>
|
||||
|
||||
@@ -24,4 +24,5 @@ Tick *relevant* boxes, this PR is-a or has-a:
|
||||
- [ ] Refactoring (please detail in commit messages)
|
||||
- [ ] Build related changes
|
||||
- [ ] Documentation content changes
|
||||
- [ ] ChangeLog updated (for major changes)
|
||||
- [ ] Other (please describe):
|
||||
|
||||
@@ -150,6 +150,7 @@ jobs:
|
||||
name: Infix ${{ github.ref_name }}
|
||||
prerelease: ${{ steps.rel.outputs.pre }}
|
||||
makeLatest: ${{ steps.rel.outputs.latest }}
|
||||
discussionCategory: Releases
|
||||
bodyFile: release.md
|
||||
artifacts: "*.tar.gz*"
|
||||
|
||||
|
||||
@@ -52,6 +52,17 @@ config INFIX_IMAGE_ID
|
||||
Mandatory. When INFIX_RELEASE is set, this string is appended to
|
||||
the IMAGE_ID with a '-' separator.
|
||||
|
||||
config INFIX_COMPATIBLE
|
||||
string "Operating system compatible string"
|
||||
default "${INFIX_IMAGE_ID}"
|
||||
help
|
||||
A lower-case string (no spaces or other characters outside of 0–9,
|
||||
a–z, ".", "_" and "-"), used for image identification at upgrade.
|
||||
E.g., the RAUC [system] compatible string.
|
||||
|
||||
Mandatory. Defaults to $INFIX_IMAGE_ID, which in turn is composed
|
||||
of $INFIX_ID-$BR2_ARCH.
|
||||
|
||||
config INFIX_TAGLINE
|
||||
string "Operating system tagline"
|
||||
default "Infix -- a Network Operating System"
|
||||
|
||||
@@ -33,6 +33,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* RTC has no valid bit, and this board does not connect any
|
||||
* backup power (e.g. supercap) to it, so it returns garbage
|
||||
* after every cold reset.
|
||||
*/
|
||||
&cp0_rtc {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
/* UART0 (Console) */
|
||||
|
||||
|
||||
@@ -539,6 +539,8 @@ CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_FS=y
|
||||
CONFIG_PANIC_ON_OOPS=y
|
||||
CONFIG_PANIC_TIMEOUT=20
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
# CONFIG_SCHED_DEBUG is not set
|
||||
# CONFIG_RCU_TRACE is not set
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
}
|
||||
},
|
||||
"ietf-netconf-acm:nacm": {
|
||||
"enable-nacm": true,
|
||||
"groups": {
|
||||
"group": [
|
||||
{
|
||||
@@ -83,6 +84,21 @@
|
||||
"comment": "Allow 'admin' group complete access to all operations and data."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "default-deny-all",
|
||||
"group": [
|
||||
"*"
|
||||
],
|
||||
"rule": [
|
||||
{
|
||||
"name": "deny-password-read",
|
||||
"module-name": "ietf-system",
|
||||
"path": "/ietf-system:system/authentication/user/password",
|
||||
"access-operations": "*",
|
||||
"action": "deny"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -123,7 +139,8 @@
|
||||
"name": "ntp.org",
|
||||
"udp": {
|
||||
"address": "pool.ntp.org"
|
||||
}
|
||||
},
|
||||
"iburst": true
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -169,7 +186,7 @@
|
||||
]
|
||||
},
|
||||
"infix-meta:meta": {
|
||||
"infix-meta:version": "1.0"
|
||||
"infix-meta:version": "1.2"
|
||||
},
|
||||
"infix-services:mdns": {
|
||||
"enabled": true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Busybox version: 1.36.0
|
||||
# Thu Feb 8 08:22:32 2024
|
||||
# Busybox version: 1.36.1
|
||||
# Tue Oct 22 13:12:02 2024
|
||||
#
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
|
||||
@@ -957,10 +957,10 @@ CONFIG_FEATURE_NETSTAT_PRG=y
|
||||
CONFIG_NSLOOKUP=y
|
||||
CONFIG_FEATURE_NSLOOKUP_BIG=y
|
||||
CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS=y
|
||||
CONFIG_NTPD=y
|
||||
CONFIG_FEATURE_NTPD_SERVER=y
|
||||
CONFIG_FEATURE_NTPD_CONF=y
|
||||
CONFIG_FEATURE_NTP_AUTH=y
|
||||
# CONFIG_NTPD is not set
|
||||
# CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
# CONFIG_FEATURE_NTPD_CONF is not set
|
||||
# CONFIG_FEATURE_NTP_AUTH is not set
|
||||
CONFIG_PING=y
|
||||
CONFIG_PING6=y
|
||||
CONFIG_FEATURE_FANCY_PING=y
|
||||
|
||||
@@ -16,13 +16,22 @@ die()
|
||||
# DISK_IMAGE_SIZE="512"
|
||||
# etc.
|
||||
#
|
||||
# Nested variables, like INFIX_COMPATIBLE="${INFIX_IMAGE_ID}"
|
||||
# are handled by sourcing the file in a subshell.
|
||||
#
|
||||
# shellcheck disable=SC1090
|
||||
load_cfg()
|
||||
{
|
||||
tmp=$(mktemp -p /tmp)
|
||||
(
|
||||
. "$BR2_CONFIG" 2>/dev/null
|
||||
|
||||
# Set *all* matching variables
|
||||
set | grep -E "^${1}[^=]*=" | while IFS= read -r line; do
|
||||
echo "$line"
|
||||
done
|
||||
) > "$tmp"
|
||||
|
||||
grep -E "${1}.*=" "$BR2_CONFIG" >"$tmp"
|
||||
. "$tmp"
|
||||
|
||||
rm "$tmp"
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ else
|
||||
fi
|
||||
|
||||
if [ -f "$TARGET_DIR/etc/rauc/system.conf" ]; then
|
||||
sed -i "s/compatible=.*/compatible=$NAME/" "$TARGET_DIR/etc/rauc/system.conf"
|
||||
sed -i "s/compatible=.*/compatible=$INFIX_COMPATIBLE/" "$TARGET_DIR/etc/rauc/system.conf"
|
||||
fi
|
||||
|
||||
# This is a symlink to /usr/lib/os-release, so we remove this to keep
|
||||
|
||||
@@ -7,11 +7,14 @@ common=$(dirname "$(readlink -f "$0")")
|
||||
# shellcheck disable=SC1091
|
||||
. "$TARGET_DIR/etc/os-release"
|
||||
|
||||
load_cfg INFIX_ID
|
||||
# The INFIX_* variables may be composed from BR2_* variables,
|
||||
# so we source them last.
|
||||
load_cfg BR2_ARCH
|
||||
load_cfg BR2_DEFCONFIG
|
||||
load_cfg BR2_EXTERNAL_INFIX_PATH
|
||||
load_cfg BR2_TARGET_ROOTFS
|
||||
load_cfg INFIX_ID
|
||||
load_cfg INFIX_COMPATIBLE
|
||||
|
||||
# The default IMAGE_ID is infix-$BR2_ARCH but can be overridden
|
||||
# for imaage names, and compat strings, like infix-r2s
|
||||
@@ -39,7 +42,7 @@ if [ "$SIGN_ENABLED" = "y" ]; then
|
||||
$common/sign.sh $BR2_ARCH $SIGN_KEY
|
||||
|
||||
ixmsg "Creating RAUC Update Bundle"
|
||||
$common/mkrauc.sh "$NAME$(ver)" $NAME $SIGN_KEY
|
||||
$common/mkrauc.sh "$NAME$(ver)" $INFIX_COMPATIBLE $SIGN_KEY
|
||||
fi
|
||||
|
||||
load_cfg DISK_IMAGE
|
||||
|
||||
@@ -106,6 +106,8 @@ config QEMU_DTB_EXTEND
|
||||
depends on QEMU_LOADER_UBOOT
|
||||
default y if QEMU_aarch64
|
||||
|
||||
if QEMU_ROOTFS_INITRD
|
||||
|
||||
config QEMU_RW
|
||||
string "Writable /cfg layer"
|
||||
depends on QEMU_ROOTFS_INITRD
|
||||
@@ -123,6 +125,8 @@ config QEMU_RW_VAR
|
||||
default "var.ext4"
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
config QEMU_VPD
|
||||
bool "Emulate a Vital Product Data (VPD) Memory"
|
||||
|
||||
@@ -137,6 +141,51 @@ config QEMU_APPEND
|
||||
config QEMU_EXTRA
|
||||
string "Extra QEMU options"
|
||||
|
||||
|
||||
comment "RTC"
|
||||
|
||||
choice
|
||||
prompt "Mode"
|
||||
default QEMU_RTC_UTC
|
||||
|
||||
config QEMU_RTC_UTC
|
||||
bool "UTC"
|
||||
|
||||
config QEMU_RTC_LOCAL
|
||||
bool "Local time"
|
||||
|
||||
config QEMU_RTC_RANDOM
|
||||
bool "Random"
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Clock"
|
||||
default QEMU_CLOCK_HOST
|
||||
|
||||
config QEMU_CLOCK_HOST
|
||||
bool "Host clock"
|
||||
|
||||
config QEMU_CLOCK_RT
|
||||
bool "Independent (monotonic)"
|
||||
|
||||
config QEMU_CLOCK_VM
|
||||
bool "Virtual"
|
||||
|
||||
endchoice
|
||||
|
||||
config QEMU_RTC
|
||||
string
|
||||
default "utc" if QEMU_RTC_UTC
|
||||
default "localtime" if QEMU_RTC_LOCAL
|
||||
default "random" if QEMU_RTC_RANDOM
|
||||
|
||||
config QEMU_CLOCK
|
||||
string
|
||||
default "host" if QEMU_CLOCK_HOST
|
||||
default "rt" if QEMU_CLOCK_RT
|
||||
default "vm" if QEMU_CLOCK_VM
|
||||
|
||||
comment "Networking"
|
||||
|
||||
choice
|
||||
|
||||
@@ -261,7 +261,25 @@ EOF
|
||||
|
||||
wdt_args()
|
||||
{
|
||||
echo -n "-device i6300esb -rtc clock=host"
|
||||
echo -n "-device i6300esb "
|
||||
}
|
||||
|
||||
random_date()
|
||||
{
|
||||
rand=$(($(date +%_s) * $$ + $(date +%N | sed 's/^0*//')))
|
||||
when=$((rand % 7258118400)) # 1970 - 2200
|
||||
date -d "@$when" +"%Y-%m-%dT%H:%M:%S"
|
||||
}
|
||||
|
||||
rtc_args()
|
||||
{
|
||||
rtc="${CONFIG_QEMU_RTC:-utc}"
|
||||
clock="${CONFIG_QEMU_CLOCK:-host}"
|
||||
if [ "$rtc" = "random" ]; then
|
||||
rtc=$(random_date)
|
||||
fi
|
||||
|
||||
echo -n "-rtc base=$rtc,clock=$clock"
|
||||
}
|
||||
|
||||
gdb_args()
|
||||
@@ -273,11 +291,19 @@ gdb_args()
|
||||
run_qemu()
|
||||
{
|
||||
if [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
|
||||
qemu-img create -f qcow2 -o backing_file=$CONFIG_QEMU_ROOTFS -F raw $CONFIG_QEMU_ROOTFS.qcow2 > /dev/null
|
||||
if ! qemu-img check "${CONFIG_QEMU_ROOTFS}.qcow2"; then
|
||||
rm -f "${CONFIG_QEMU_ROOTFS}.qcow2"
|
||||
fi
|
||||
if [ ! -f "${CONFIG_QEMU_ROOTFS}.qcow2" ]; then
|
||||
echo "Creating qcow2 disk image for Qemu ..."
|
||||
qemu-img create -f qcow2 -o backing_file="$CONFIG_QEMU_ROOTFS" \
|
||||
-F raw "${CONFIG_QEMU_ROOTFS}.qcow2" > /dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
local qemu
|
||||
read qemu <<EOF
|
||||
$CONFIG_QEMU_MACHINE -m $CONFIG_QEMU_MACHINE_RAM \
|
||||
$CONFIG_QEMU_MACHINE -nodefaults -m $CONFIG_QEMU_MACHINE_RAM \
|
||||
$(loader_args) \
|
||||
$(rootfs_args) \
|
||||
$(serial_args) \
|
||||
@@ -286,16 +312,23 @@ run_qemu()
|
||||
$(host_args) \
|
||||
$(net_args) \
|
||||
$(wdt_args) \
|
||||
$(rtc_args) \
|
||||
$(vpd_args) \
|
||||
$(gdb_args) \
|
||||
$CONFIG_QEMU_EXTRA
|
||||
EOF
|
||||
|
||||
echo "Starting Qemu :: Ctrl-a x -- exit | Ctrl-a c -- toggle console/monitor"
|
||||
line=$(stty -g)
|
||||
stty raw
|
||||
|
||||
if [ "$CONFIG_QEMU_KERNEL" ]; then
|
||||
$qemu -append "$(append_args)" "$@"
|
||||
else
|
||||
$qemu "$@"
|
||||
fi
|
||||
|
||||
stty "$line"
|
||||
}
|
||||
|
||||
dtb_args()
|
||||
@@ -401,8 +434,4 @@ fi
|
||||
|
||||
generate_dot
|
||||
|
||||
echo "Starting Qemu :: Ctrl-a x -- exit | Ctrl-a c -- toggle console/monitor"
|
||||
line=$(stty -g)
|
||||
stty raw
|
||||
run_qemu $(dtb_args)
|
||||
stty "$line"
|
||||
|
||||
@@ -14,6 +14,24 @@ for file in /sys/firmware/qemu_fw_cfg/by_name/opt/mactab/raw /etc/mactab; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Sometimes the sysfs is not populated when the switch driver is loaded, with the result
|
||||
# that the DSA interface was not found (no /dsa/tagging entry in sysfs. See issue #685.
|
||||
#
|
||||
# This mitigates that problem by waiting for sysfs to come up if a DSA switch is found
|
||||
if [ -n "$(devlink -j dev info | jq -r '.info.[].driver' | grep -q mv88e6085)" ]; then
|
||||
timeout=50
|
||||
while [ -z "$(ls /sys/class/net/*/dsa/tagging)" ]; do
|
||||
timeout=$((timeout-1))
|
||||
if [ $timeout -eq 0 ]; then
|
||||
logger -k -p user.emerg -t "$ident" "Failed to find DSA interface"
|
||||
exit 1
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
logger -k -p user.notice -t "$ident" "Found DSA interface in $timeout seconds"
|
||||
fi
|
||||
|
||||
# Find CPU interfaces used for connecting to a switch managed by DSA
|
||||
for netif in /sys/class/net/*; do
|
||||
iface=$(basename "$netif")
|
||||
|
||||
@@ -146,7 +146,7 @@ mount_overlay home "$cfgsrc" /home
|
||||
mount_overlay root "$cfgsrc" /root
|
||||
mount_bind "$varsrc" /var
|
||||
|
||||
[ "$vlibsrc" ] && mount_bind "$vlibsrc" /var/lib
|
||||
[ -n "$vlibsrc" ] && mount_bind "$vlibsrc" /var/lib
|
||||
|
||||
for tag in $(ls /sys/bus/virtio/devices/*/mount_tag 2>/dev/null); do
|
||||
if [ "$(cat $tag | tr -d '\0')" = hostfs ]; then
|
||||
|
||||
@@ -260,6 +260,8 @@ CONFIG_CRYPTO_GCM=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_FS=y
|
||||
CONFIG_PANIC_ON_OOPS=y
|
||||
CONFIG_PANIC_TIMEOUT=20
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
|
||||
# CONFIG_FTRACE is not set
|
||||
|
||||
@@ -142,6 +142,8 @@ BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_RTC=y
|
||||
BR2_PACKAGE_FINIT_RTC_DATE="2024-11-04 10:54:00"
|
||||
BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
|
||||
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
|
||||
BR2_PACKAGE_IITO=y
|
||||
|
||||
@@ -122,6 +122,8 @@ BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_RTC=y
|
||||
BR2_PACKAGE_FINIT_RTC_DATE="2024-11-04 10:54:00"
|
||||
BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
|
||||
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
|
||||
BR2_PACKAGE_IITO=y
|
||||
|
||||
@@ -14,8 +14,8 @@ BR2_TARGET_GENERIC_ISSUE="Infix by KernelKit"
|
||||
BR2_INIT_FINIT=y
|
||||
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
|
||||
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt ${BR2_EXTERNAL_INFIX_PATH}/board/common/xattrs"
|
||||
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
|
||||
BR2_ROOTFS_MERGED_USR=y
|
||||
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
|
||||
BR2_SYSTEM_BIN_SH_BASH=y
|
||||
BR2_TARGET_GENERIC_GETTY_PORT="@console"
|
||||
BR2_TARGET_GENERIC_GETTY_TERM="xterm"
|
||||
@@ -71,7 +71,9 @@ BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE=y
|
||||
BR2_PACKAGE_PYTHON3=y
|
||||
BR2_PACKAGE_PYTHON_GUNICORN=y
|
||||
BR2_PACKAGE_LIBSSH_OPENSSL=y
|
||||
BR2_PACKAGE_LIBSSH2=y
|
||||
BR2_PACKAGE_LIBSSH2_OPENSSL=y
|
||||
BR2_PACKAGE_LIBXCRYPT=y
|
||||
BR2_PACKAGE_LIBOPENSSL_BIN=y
|
||||
BR2_PACKAGE_LIBINPUT=y
|
||||
@@ -173,7 +175,6 @@ INFIX_HOME="https://github.com/kernelkit/infix/"
|
||||
INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc"
|
||||
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
|
||||
BR2_PACKAGE_CONFD=y
|
||||
# BR2_PACKAGE_CONFD_TEST_MODE is not set
|
||||
BR2_PACKAGE_EXECD=y
|
||||
BR2_PACKAGE_GENCERT=y
|
||||
BR2_PACKAGE_STATD=y
|
||||
@@ -182,6 +183,8 @@ BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_RTC=y
|
||||
BR2_PACKAGE_FINIT_RTC_DATE="2024-11-04 10:54:00"
|
||||
BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
|
||||
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
|
||||
BR2_PACKAGE_IITO=y
|
||||
|
||||
@@ -173,6 +173,8 @@ BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_RTC=y
|
||||
BR2_PACKAGE_FINIT_RTC_DATE="2024-11-04 10:54:00"
|
||||
BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
|
||||
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
|
||||
BR2_PACKAGE_IITO=y
|
||||
|
||||
@@ -146,6 +146,8 @@ BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_RTC=y
|
||||
BR2_PACKAGE_FINIT_RTC_DATE="2024-11-04 10:54:00"
|
||||
BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
|
||||
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
|
||||
BR2_PACKAGE_IITO=y
|
||||
|
||||
@@ -126,6 +126,8 @@ BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_RTC=y
|
||||
BR2_PACKAGE_FINIT_RTC_DATE="2024-11-04 10:54:00"
|
||||
BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
|
||||
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
|
||||
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
|
||||
BR2_PACKAGE_IITO=y
|
||||
|
||||
@@ -3,6 +3,46 @@ Change Log
|
||||
|
||||
All notable changes to the project are documented in this file.
|
||||
|
||||
|
||||
[v24.10.2][UNRELEASED]
|
||||
-------------------------
|
||||
|
||||
### Changes
|
||||
|
||||
- Support for showing interfaces owned by running containers in the CLI
|
||||
command `show interfaces`. This also adds support for showing the
|
||||
peer interface of VETH pairs. Issue #626
|
||||
- Reboot system on kernel "oops", on "oops" the kernel now panics and
|
||||
reboots after 20 seconds. Issue #740
|
||||
- Update static factory-config for NanoPi R2S: enable NACM, securing all
|
||||
passwords, and enabling `iburst` for the NTP client. Issue #750
|
||||
- Updated QoS documentation with pictures and more information on VLAN
|
||||
interface ingress/egress priority handling, issue #759
|
||||
- Disable RTC device in Styx device tree, issue #794
|
||||
- Support for saving and restoring system clock from a disk file. This
|
||||
allows restoring the system clock to a sane date in case the RTC is
|
||||
disabled or does not have a valid time, issue #794
|
||||
|
||||
### Fixes
|
||||
- Fix #685: DSA conduit interface not always detected, randomly causing
|
||||
major issues configuring systems with multiple switch cores
|
||||
- Fix #778: reactivate OpenSSL backend for libssh/libssh2 for NanoPI R2S.
|
||||
This fixes a regression in v24.10.0 causing loss of NETCONF supprt
|
||||
|
||||
|
||||
[v24.10.1][] - 2024-10-18
|
||||
-------------------------
|
||||
|
||||
### Changes
|
||||
- Add support for interface description, sometimes referred to as
|
||||
"ifAlias". Saved as an Linux interface alias (not `altname`), e.g.,
|
||||
`/sys/class/interfaces/veth0a/ifalias`, includes operational support
|
||||
|
||||
### Fixes
|
||||
- Fix #735: `copy` and `erase` commands missing from CLI, regression
|
||||
in Infix v24.10.0 defconfigs, now added as dep. in klish package
|
||||
|
||||
|
||||
[v24.10.0][] - 2024-10-18
|
||||
-------------------------
|
||||
|
||||
@@ -1235,7 +1275,8 @@ Supported YANG models in addition to those used by sysrepo and netopeer:
|
||||
- N/A
|
||||
|
||||
[buildroot]: https://buildroot.org/
|
||||
[UNRELEASED]: https://github.com/kernelkit/infix/compare/v24.10.0...HEAD
|
||||
[UNRELEASED]: https://github.com/kernelkit/infix/compare/v24.10.1...HEAD
|
||||
[v24.10.1]: https://github.com/kernelkit/infix/compare/v24.10.0...v24.10.1
|
||||
[v24.10.0]: https://github.com/kernelkit/infix/compare/v24.09.0...v24.10.0
|
||||
[v24.09.0]: https://github.com/kernelkit/infix/compare/v24.08.0...v24.09.0
|
||||
[v24.08.0]: https://github.com/kernelkit/infix/compare/v24.06.0...v24.08.0
|
||||
|
||||
@@ -143,7 +143,7 @@ which offers lots of benefits out-of-the-box:
|
||||
media like USB sticks or SD-cards) and from remote servers using FTP
|
||||
or HTTP(S).
|
||||
|
||||
To initiate a system upgrade, run:
|
||||
To initiate a system upgrade from the shell[^1], run:
|
||||
|
||||
rauc install <file|url>
|
||||
|
||||
@@ -349,3 +349,5 @@ can funtion reasonably well without a persistent `/var`, loosing
|
||||
If `var` is not available, Infix will still persist `/var/lib` using
|
||||
`cfg` as the backing storage.
|
||||
|
||||
[^1]: See [CLI Upgrade](cli/upgrade.md) for information on upgrading
|
||||
via CLI.
|
||||
|
||||
@@ -206,20 +206,18 @@ corresponding image for execution with our normal tooling:
|
||||
Contributing
|
||||
------------
|
||||
|
||||
Infix is built from many parts, when contributing you need to set up
|
||||
your own fork, create a local branch for your change, push to your fork,
|
||||
and then use GitHub to create a *Pull Reqeuest*.
|
||||
Infix is built from many components, when contributing you need to set
|
||||
up your own fork, create a local branch for your change, push to your
|
||||
fork, and then use GitHub to create a *Pull Reqeuest*.
|
||||
|
||||
For this to work as painlessly as possible:
|
||||
For this to work as *painlessly as possible* for everyone involved:
|
||||
|
||||
1. Fork Infix to your own user or organization[^1]
|
||||
2. Fork all the Infix submodules, e.g., `kernelkit/buildroot` to your
|
||||
own user or organization as well
|
||||
3. Clone your fork of Infix to your laptop/workstation
|
||||
|
||||
If you use a GitHub organization you get the added benefit of having
|
||||
local peer reviews of changes before making a pull request to the
|
||||
upstream Infix repository.
|
||||
1. Fork Infix to your own user or organization[^1]
|
||||
2. Fork all the Infix submodules, e.g., `kernelkit/buildroot` to your
|
||||
own user or organization as well
|
||||
3. Clone your fork of Infix to your laptop/workstation
|
||||
4. [Deactivate the Actions][6] you don't want in your fork
|
||||
5. Please read the [Contributing Guidelines][5] as well!
|
||||
|
||||
```bash
|
||||
$ cd ~/Projects
|
||||
@@ -227,10 +225,10 @@ $ git clone https://github.com/YOUR_USER_NAME/infix.git
|
||||
$ cd infix/
|
||||
$ git submodule update --init
|
||||
```
|
||||
|
||||
> **Note:** when updating/synchronizing with upstream Infix changes you
|
||||
> may have to synchronize your forks as well. GitHub have a `Sync fork`
|
||||
> button in the GUI for your fork for this purpose.
|
||||
> button in the GUI for your fork for this purpose. A cronjob on your
|
||||
> server of choice can do this for you with the [GitHub CLI tool][7].
|
||||
|
||||
[^1]: Organizations should make sure to lock the `main` (or `master`)
|
||||
branch of their clones to ensure members do not accidentally merge
|
||||
@@ -243,3 +241,6 @@ $ git submodule update --init
|
||||
[2]: https://github.com/wkz/qeneth
|
||||
[3]: https://netopeer.liberouter.org/doc/sysrepo/master/html/dev_guide.html
|
||||
[4]: https://buildroot.org/downloads/manual/manual.html#_developer_guide
|
||||
[5]: https://github.com/kernelkit/infix/blob/main/.github/CONTRIBUTING.md
|
||||
[6]: https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/disabling-and-enabling-a-workflow
|
||||
[7]: https://cli.github.com/
|
||||
|
||||
|
After Width: | Height: | Size: 262 KiB |
|
After Width: | Height: | Size: 464 KiB |
|
After Width: | Height: | Size: 388 KiB |
|
After Width: | Height: | Size: 343 KiB |
|
After Width: | Height: | Size: 269 KiB |
@@ -15,7 +15,8 @@ managing entire fleets of installed equipment.
|
||||
Nevertheless, when it comes to initial deployment and debugging, it
|
||||
is very useful to know how to navigate and use the CLI.
|
||||
|
||||
> Proceed to the [CLI User Guide](cli/tutorial.md).
|
||||
> Proceed to the [CLI Introduction](cli/introduction.md) or [CLI
|
||||
> Configuration Tutorial](cli/configure.md).
|
||||
|
||||
|
||||
## Key Concepts
|
||||
|
||||
@@ -43,15 +43,17 @@ diverted to the VLAN interface before entering the bridge, while all
|
||||
other traffic would be bridged as usual.
|
||||
|
||||
| **Type** | **Yang Model** | **Description** |
|
||||
| -------- | ----------------- | ------------------------------------------------------------- |
|
||||
|----------|----------------------------|---------------------------------------------------------------|
|
||||
| bridge | infix-if-bridge | SW implementation of an IEEE 802.1Q bridge |
|
||||
| ip | ietf-ip, infix-ip | IP address to the subordinate interface |
|
||||
| vlan | infix-if-vlan | Capture all traffic belonging to a specific 802.1Q VID |
|
||||
| lag[^1] | infix-if-lag | Bonds multiple interfaces into one, creating a link aggregate |
|
||||
| lo | ietf-interfaces | Software loopback interface |
|
||||
| eth | ietf-interfaces, | Physical Ethernet device/port |
|
||||
| | ieee802-ethernet-interface | |
|
||||
| eth | ieee802-ethernet-interface | Physical Ethernet device/port. |
|
||||
| | infix-ethernet-interface | |
|
||||
| veth | infix-if-veth | Virtual Ethernet pair, typically one end is in a container |
|
||||
| *common* | ietf-interfaces, | Properties common to all interface types |
|
||||
| | infix-interfaces | |
|
||||
|
||||
|
||||
## Data Plane
|
||||
@@ -97,6 +99,10 @@ This is an extension to the ietf-interfaces YANG model, which defines
|
||||
`phys-address` as read-only[^4]. The following shows the different
|
||||
configuration options.
|
||||
|
||||
The `description` is saved as Linux `ifalias` on an interface. It is a
|
||||
free-form string, useful for describing purpose or just adding comments
|
||||
for remote debugging, e.g., using the operational datastore.
|
||||
|
||||
> **Note:** there is no validation or safety checks performed by the
|
||||
> system when using `custom-phys-address`. In particular the `offset`
|
||||
> variant can be dangerous to use -- pay attention to the meaning of
|
||||
@@ -143,6 +149,8 @@ a switch is a bridge. In Linux, setting up a bridge with ports
|
||||
connected to physical switch fabric, means you manage the actual switch
|
||||
fabric!
|
||||
|
||||
#### MAC Bridge
|
||||
|
||||
In Infix ports are by default not switch ports, unless the customer
|
||||
specific factory config sets it up this way. To enable switching
|
||||
between ports you create a bridge and then add ports to that
|
||||
@@ -165,6 +173,13 @@ Here we add two ports to bridge `br0`: `eth0` and `eth1`.
|
||||
> Other "magic" names are `ethN.M` for VLAN M on top of `ethN`, or
|
||||
> `dockerN` to create an IP masquerading container bridge.
|
||||
|
||||

|
||||
|
||||
It is possible to create multiple MAC bridges, however, it is
|
||||
currently[^5] _not recommended_ to use more than one MAC bridge on
|
||||
products with Marvell LinkStreet switching ASICs. A VLAN filtering
|
||||
bridge should be used instead.
|
||||
|
||||
#### VLAN Filtering Bridge
|
||||
|
||||
By default bridges in Linux do not filter based on VLAN tags. It can be
|
||||
@@ -189,6 +204,8 @@ This sets `eth0` as an untagged member of VLAN 10 and `eth1` as an
|
||||
untagged member of VLAN 20. Switching between these ports is thus
|
||||
prohibited.
|
||||
|
||||

|
||||
|
||||
To terminate a VLAN in the switch itself, either for switch management
|
||||
or for routing, the bridge must become a (tagged) member of the VLAN.
|
||||
|
||||
@@ -201,6 +218,7 @@ admin@example:/config/interface/br0/> set bridge vlans vlan 20 tagged br0
|
||||
> on top of the bridge, see section [VLAN Interfaces](#vlan-interfaces)
|
||||
> below for more on this topic.
|
||||
|
||||
|
||||
#### Multicast Filtering and Snooping
|
||||
|
||||
Multicast filtering in the bridge is handled by the bridge itself. It
|
||||
@@ -415,7 +433,7 @@ top of a bridge interface *br0* is named *vlan10*.
|
||||
#### Ethernet Settings and Status
|
||||
|
||||
Physical Ethernet interfaces provide low-level settings for speed/duplex as
|
||||
well as packet status and statistics (*ieee802-ethernet-interface.yang*).
|
||||
well as packet status and [statistics](#ethernet-statistics).
|
||||
|
||||
By default, Ethernet interfaces defaults to auto-negotiating
|
||||
speed/duplex modes, advertising all speed and duplex modes available.
|
||||
@@ -497,7 +515,7 @@ require auto-negotiation to be enabled.
|
||||
|
||||
#### Ethernet statistics
|
||||
|
||||
Ethernet packet statistics can be listed as shown below.
|
||||
Ethernet packet statistics[^6] can be listed as shown below.
|
||||
|
||||
```
|
||||
admin@example:/> show interfaces name eth1
|
||||
@@ -585,6 +603,9 @@ Multiple address assignment methods are available:
|
||||
| link-local | infix-ip | Auto-assignment of IPv4 address in 169.254.x.x/16 range |
|
||||
| dhcp | infix-dhcp-client | Assignment of IPv4 address by DHCP server, e.g., *10.0.1.1/24* |
|
||||
|
||||
> **Note:** DHCP address method is only available for *LAN* interfaces
|
||||
> (Ethernet, virtual Ethernet (veth), bridge, link aggregates, etc.)
|
||||
|
||||
Supported DHCP (request) options, configurability (Cfg) and defaults,
|
||||
are listed below. Configurable options can be disabled on a per client
|
||||
interface basis, some options, like `clientid` and option 81, are
|
||||
@@ -610,8 +631,16 @@ possible to set the value of as well.
|
||||
**Default:** `router`, `dns`, `domain`, `broadcast`, `ntpsrv`, `search`,
|
||||
`address`, `staticroutes`, `msstaticroutes`
|
||||
|
||||
> **Note:** DHCP address method is only available for *LAN* interfaces
|
||||
> (Ethernet, virtual Ethernet (veth), bridge, link aggregates, etc.)
|
||||
When configuring a DHCP client, ensure that the NTP client is enabled
|
||||
for the `ntpsrv` DHCP option to be processed correctly. If the NTP
|
||||
client is not enabled, any NTP servers provided by the DHCP server will
|
||||
be ignored. For details on how to enable the NTP client, see the
|
||||
[NTP Client Configuration](system.md#ntp-client-configuration) section.
|
||||
|
||||
> **Note:** as per [RFC3442][4], if the DHCP server returns both a
|
||||
> Classless Static Routes option (121) and Router option (3), the
|
||||
> DHCP client *must* ignore the latter.
|
||||
|
||||
|
||||
### IPv6 Address Assignment
|
||||
|
||||
@@ -830,7 +859,7 @@ have changed type to *random*.
|
||||
### IPv4 forwarding
|
||||
|
||||
To be able to route (static or dynamic) on the interface it is
|
||||
required to enable forwarding. This setting controlls if packets
|
||||
required to enable forwarding. This setting controls if packets
|
||||
received on this interface can be forwarded.
|
||||
```
|
||||
admin@example:/config/> edit interface eth0
|
||||
@@ -846,12 +875,12 @@ This flag behaves totally different than for IPv4. For IPv6 the
|
||||
ability to route between interfaces is always enabled, instead this
|
||||
flag controls if the interface will be in host/router mode.
|
||||
|
||||
| **Feature** | **Forward enabled** | **Forward disabled** |
|
||||
|:------------------------------------------|:--------------------|:---------------------|
|
||||
| IsRouter set in Neighbour Advertisements. | Yes | No |
|
||||
| Transmit Router Solicitations. | No | Yes |
|
||||
| Router Advertisements are ignored | No | Yes |
|
||||
| Accept Redirects | No | Yes |
|
||||
| **Feature** | **Forward enabled** | **Forward disabled** |
|
||||
|:-----------------------------------------|:--------------------|:---------------------|
|
||||
| IsRouter set in Neighbour Advertisements | Yes | No |
|
||||
| Transmit Router Solicitations | No | Yes |
|
||||
| Router Advertisements are ignored | No | Yes |
|
||||
| Accept Redirects | No | Yes |
|
||||
|
||||
```
|
||||
admin@example:/config/> edit interface eth0
|
||||
@@ -1053,7 +1082,7 @@ This CLI example show the IPv6 routing table.
|
||||
|
||||
#### Route Preference
|
||||
|
||||
The operating system leverages FRRouting ([Frr][4]) as routing engine
|
||||
The operating system leverages FRRouting ([Frr][0]) as routing engine
|
||||
for both static and dynamic routing. Even routes injected from a DHCP
|
||||
client, and IPv4 link-local (IPv4) routes, are injected into Frr to let
|
||||
it weigh all routes before installing them into the kernel routing table
|
||||
@@ -1107,7 +1136,8 @@ currently supported, namely `ipv4` and `ipv6`.
|
||||
[1]: https://www.rfc-editor.org/rfc/rfc8343
|
||||
[2]: https://www.rfc-editor.org/rfc/rfc8344
|
||||
[3]: https://www.rfc-editor.org/rfc/rfc8981
|
||||
[4]: https://frrouting.org/
|
||||
[4]: https://www.rfc-editor.org/rfc/rfc3442
|
||||
[0]: https://frrouting.org/
|
||||
|
||||
[^1]: Please note, link aggregates are not yet supported in Infix.
|
||||
[^2]: Link-local IPv6 addresses are implicitly enabled when enabling
|
||||
@@ -1120,3 +1150,11 @@ currently supported, namely `ipv4` and `ipv6`.
|
||||
[^4]: A YANG deviation was previously used to make it possible to set
|
||||
`phys-address`, but this has been replaced with the more flexible
|
||||
`custom-phys-address`.
|
||||
[^5]: Infix MAC bridges on Marvell Linkstreet devices are currently
|
||||
limited to use a single MAC database, causing issues if the same
|
||||
MAC address appears on different MAC bridges.
|
||||
[^6]: Ethernet counters are described in
|
||||
*ieee802-ethernet-interface.yang* and
|
||||
*infix-ethernet-interface.yang*. [Ethernet
|
||||
Counters](eth-counters.md) page provides additional details on
|
||||
statistics support.
|
||||
|
||||
@@ -12,14 +12,6 @@ packets to drop and which ones to prioritize, such that critical
|
||||
services remain operational.
|
||||
|
||||
|
||||
## Software Forwarded Traffic
|
||||
|
||||
For packets which are processed by a CPU, i.e. typically routed
|
||||
traffic, and bridged traffic between interfaces that do not belong to
|
||||
the same hardware switching domain, an [nftables container][1] can be
|
||||
used to define a QoS policy.
|
||||
|
||||
|
||||
## Hardware Forwarded Traffic
|
||||
|
||||
The default QoS policy for flows which are offloaded to a switching
|
||||
@@ -34,6 +26,14 @@ chips in this family where limited to 4 output queues per port, this
|
||||
documentation is _only_ valid for newer generations with 8 output
|
||||
queues per port.
|
||||
|
||||

|
||||
|
||||
The picture illustrates packets having their priority determined at
|
||||
ingress, here interface _e1_ and _e3_. In this example, both packets
|
||||
are forwarded to the same outgoing interface (_e2_), subject to output
|
||||
queueing. The sections below provides more information on these
|
||||
topics.
|
||||
|
||||
#### Default Policy
|
||||
|
||||
##### Queueing
|
||||
@@ -73,6 +73,41 @@ set to the 3 most significant bits of it. If no priority information
|
||||
is available in the frame on ingress (i.e. untagged non-IP), then
|
||||
packets will egress out of tagged ports with PCP set to 0.
|
||||
|
||||
## Software Forwarded Traffic
|
||||
|
||||
For packets which are processed by a CPU, i.e. typically routed
|
||||
traffic, and bridged traffic between interfaces that do not belong to
|
||||
the same hardware switching domain, an [nftables container][1] can be
|
||||
used to define a QoS policy.
|
||||
|
||||
For VLAN interfaces, Infix provides support for mapping the Priority
|
||||
Code Point (PCP) to internal priority on ingress, and the reverse on
|
||||
egress.
|
||||
|
||||

|
||||
|
||||
|
||||
These `ingress-qos` and `egress-qos` settings are done per VLAN, both
|
||||
defaulting to '0'. The example below shows how to keep the PCP priority
|
||||
for packets being routed between two VLAN interfaces.
|
||||
|
||||
```
|
||||
admin@example:/config/> edit interface e1.10
|
||||
admin@example:/config/interface/e1.10/> set vlan ingress-qos priority from-pcp
|
||||
admin@example:/config/interface/e1.10/> up
|
||||
admin@example:/config/> edit interface e1.20
|
||||
admin@example:/config/interface/e1.20/> set vlan egress-qos pcp from-priority
|
||||
admin@example:/config/interface/e1.20/> leave
|
||||
admin@example:/>
|
||||
```
|
||||
|
||||
## A complex example
|
||||
|
||||
The picture below shows a packet flow being subject both to software
|
||||
forwarding and hardware offloading.
|
||||
|
||||

|
||||
|
||||
|
||||
[1]: container.md#application-container-nftables
|
||||
[2]: https://en.wikipedia.org/wiki/IEEE_802.1Q
|
||||
|
||||
@@ -145,7 +145,7 @@ is committed by issuing the `leave` command.
|
||||
admin@host:/config/> edit system
|
||||
admin@host:/config/system/> set hostname example
|
||||
admin@host:/config/system/> leave
|
||||
admin@example:/>
|
||||
admin@host:/>
|
||||
```
|
||||
|
||||
The hostname is advertised over mDNS-SD in the `.local` domain. If
|
||||
@@ -201,6 +201,82 @@ admin@host:/>
|
||||
> and then re-enter configure context to use your editor of choice.
|
||||
|
||||
|
||||
## NTP Client Configuration
|
||||
|
||||
Below is an example configuration for enabling NTP
|
||||
with a specific server and the `iburst` option for faster initial
|
||||
synchronization.
|
||||
|
||||
```
|
||||
admin@host:/> configure
|
||||
admin@host:/config/> set system ntp enabled
|
||||
admin@host:/config/> set system ntp server ntp-pool
|
||||
admin@host:/config/> set system ntp server ntp-pool udp address pool.ntp.org
|
||||
admin@host:/config/> set system ntp server ntp-pool iburst
|
||||
admin@host:/config/> set system ntp server ntp-pool prefer
|
||||
```
|
||||
|
||||
This configuration enables the NTP client and sets the NTP server to
|
||||
`pool.ntp.org` with the `iburst` and `prefer` options. The `iburst`
|
||||
option ensures faster initial synchronization, and the `prefer` option
|
||||
designates this server as preferred.
|
||||
|
||||
* `prefer false`: The NTP client will choose the best available source
|
||||
based on several factors, such as network delay, stratum, and other
|
||||
metrics (default config).
|
||||
* `prefer true`: The NTP client will try to use the preferred server
|
||||
as the primary source unless it becomes unreachable or unusable.
|
||||
|
||||
### Show NTP Status
|
||||
|
||||
To check the status of NTP synchronization, use the following command:
|
||||
|
||||
```
|
||||
admin@host:/> show ntp
|
||||
Reference ID : C0248F86 (192.36.143.134)
|
||||
Stratum : 2
|
||||
Ref time (UTC) : Mon Oct 21 10:06:45 2024
|
||||
System time : 0.000000001 seconds slow of NTP time
|
||||
Last offset : -3845.151367188 seconds
|
||||
RMS offset : 3845.151367188 seconds
|
||||
Frequency : 4.599 ppm slow
|
||||
Residual freq : +1293.526 ppm
|
||||
Skew : 12.403 ppm
|
||||
Root delay : 1.024467230 seconds
|
||||
Root dispersion : 0.273462683 seconds
|
||||
Update interval : 0.0 seconds
|
||||
Leap status : Normal
|
||||
admin@host:/>
|
||||
```
|
||||
|
||||
This output provides detailed information about the NTP status, including
|
||||
reference ID, stratum, time offsets, frequency, and root delay.
|
||||
|
||||
### Show NTP Sources
|
||||
|
||||
To view the sources being used by the NTP client, run:
|
||||
|
||||
```
|
||||
admin@host:/> show ntp sources
|
||||
|
||||
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
|
||||
/ .- Source state '*' = current best, '+' = combined, '-' = not combined,
|
||||
| / 'x' = may be in error, '~' = too variable, '?' = unusable.
|
||||
|| .- xxxx [ yyyy ] +/- zzzz
|
||||
|| Reachability register (octal) -. | xxxx = adjusted offset,
|
||||
|| Log2(Polling interval) --. | | yyyy = measured offset,
|
||||
|| \ | | zzzz = estimated error.
|
||||
|| | | \
|
||||
MS Name/IP address Stratum Poll Reach LastRx Last sample
|
||||
===============================================================================
|
||||
^* 192.36.143.134 1 6 177 9 +278ms[ -3845s] +/- 514ms
|
||||
admin@host:/>
|
||||
```
|
||||
|
||||
> The system uses `chronyd` for Network Time Protocol (NTP)
|
||||
> synchronization. The output shown here is best explained in the
|
||||
> [Chrony documentation](https://chrony-project.org/doc/4.6.1/chronyc.html).
|
||||
|
||||
[1]: https://www.rfc-editor.org/rfc/rfc7317
|
||||
[2]: https://github.com/kernelkit/infix/blob/main/src/confd/yang/infix-system%402024-02-29.yang
|
||||
[3]: https://www.rfc-editor.org/rfc/rfc8341
|
||||
|
||||
@@ -17,7 +17,7 @@ Tenets
|
||||
It is also much more practical and economical to build large virtual
|
||||
networks than physical ones.
|
||||
|
||||
- **Avoid CLI scipting & scraping**. Reliably interacting with a DUT
|
||||
- **Avoid CLI scripting & scraping**. Reliably interacting with a DUT
|
||||
over a serial line in a robust way is _very_ hard to get right.
|
||||
Given that we have a proper API (RESTCONF), we should leverage that
|
||||
when testing. Front-ends can be tested by other means.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 46ffa81f5c88ce95db011369d8bfb802313e4217 Mon Sep 17 00:00:00 2001
|
||||
From: Joachim Wiberg <troglobit@gmail.com>
|
||||
Date: Thu, 17 Oct 2024 14:23:24 +0200
|
||||
Subject: [PATCH] Only mark rdeps dirty if main service is nohup
|
||||
Subject: [PATCH 1/6] Only mark rdeps dirty if main service is nohup
|
||||
Organization: Addiva Elektronik
|
||||
|
||||
This patch changes a behavior that's been default since Finit 4.0,
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 119e66a7e9c95283918639b51dd03a3d666955f8 Mon Sep 17 00:00:00 2001
|
||||
From: Joachim Wiberg <troglobit@gmail.com>
|
||||
Date: Mon, 28 Oct 2024 10:58:04 +0100
|
||||
Subject: [PATCH 2/6] Reset color attributes and clear screen when starting up
|
||||
Organization: Addiva Elektronik
|
||||
|
||||
Some boot loaders, like GRUB, leave background color artifacts from
|
||||
their boot menu. This patch resets the foreground and background
|
||||
color attributes, and then clears the screen, without clearing the
|
||||
scrollback buffer.
|
||||
|
||||
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
|
||||
---
|
||||
src/helpers.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/helpers.c b/src/helpers.c
|
||||
index 8768de8..99c4557 100644
|
||||
--- a/src/helpers.c
|
||||
+++ b/src/helpers.c
|
||||
@@ -87,6 +87,9 @@ void console_init(void)
|
||||
/* Enable line wrap, if disabled previously, e.g., qemu */
|
||||
dprint(STDOUT_FILENO, "\033[?7h", 5);
|
||||
|
||||
+ /* Reset atttributes, background and foreground color */
|
||||
+ dprint(STDOUT_FILENO, "\033[49m\033[39m\e[2J", 14);
|
||||
+
|
||||
log_init();
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
From 0c0e880f3fdd38f7bbde618408378dc0a19ff005 Mon Sep 17 00:00:00 2001
|
||||
From: Joachim Wiberg <troglobit@gmail.com>
|
||||
Date: Sun, 3 Nov 2024 09:39:46 +0100
|
||||
Subject: [PATCH 3/6] plugins: refactor rtc.so
|
||||
Organization: Addiva Elektronik
|
||||
|
||||
Factor out time_set() and time_get() for readability and reuse.
|
||||
|
||||
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
|
||||
---
|
||||
plugins/rtc.c | 116 +++++++++++++++++++++++++++++---------------------
|
||||
1 file changed, 68 insertions(+), 48 deletions(-)
|
||||
|
||||
diff --git a/plugins/rtc.c b/plugins/rtc.c
|
||||
index 238791f..9520c7d 100644
|
||||
--- a/plugins/rtc.c
|
||||
+++ b/plugins/rtc.c
|
||||
@@ -68,6 +68,60 @@ static void tz_restore(char *tz)
|
||||
tzset();
|
||||
}
|
||||
|
||||
+static int time_set(struct tm *tm)
|
||||
+{
|
||||
+ struct tm fallback = { 0 };
|
||||
+ struct timeval tv = { 0 };
|
||||
+ char tz[128];
|
||||
+ int rc = 0;
|
||||
+
|
||||
+ tz_set(tz, sizeof(tz));
|
||||
+
|
||||
+ if (!tm) {
|
||||
+ logit(LOG_NOTICE, "Resetting system clock to kernel default, %s.", rtc_timestamp);
|
||||
+ tm = &fallback;
|
||||
+
|
||||
+ /* Attempt to set RTC to a sane value ... */
|
||||
+ tv.tv_sec = rtc_date_fallback;
|
||||
+ if (!gmtime_r(&tv.tv_sec, tm)) {
|
||||
+ rc = 1;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ tm->tm_isdst = -1; /* Use tzdata to figure it out, please. */
|
||||
+ tv.tv_sec = mktime(tm);
|
||||
+ if (tv.tv_sec == (time_t)-1 || tv.tv_sec < rtc_date_fallback) {
|
||||
+ errno = EINVAL;
|
||||
+ rc = 2;
|
||||
+ } else {
|
||||
+ if (settimeofday(&tv, NULL) == -1)
|
||||
+ rc = 1;
|
||||
+ }
|
||||
+out:
|
||||
+ tz_restore(tz);
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+static int time_get(struct tm *tm)
|
||||
+{
|
||||
+ struct timeval tv = { 0 };
|
||||
+ char tz[128];
|
||||
+ int rc = 0;
|
||||
+
|
||||
+ tz_set(tz, sizeof(tz));
|
||||
+
|
||||
+ rc = gettimeofday(&tv, NULL);
|
||||
+ if (rc < 0 || tv.tv_sec < rtc_date_fallback)
|
||||
+ rc = 2;
|
||||
+ else
|
||||
+ gmtime_r(&tv.tv_sec, tm);
|
||||
+
|
||||
+ tz_restore(tz);
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
static int rtc_open(void)
|
||||
{
|
||||
char *alt[] = {
|
||||
@@ -91,10 +145,8 @@ static int rtc_open(void)
|
||||
|
||||
static void rtc_save(void *arg)
|
||||
{
|
||||
- struct timeval tv = { 0 };
|
||||
struct tm tm = { 0 };
|
||||
int fd, rc = 0;
|
||||
- char tz[128];
|
||||
|
||||
if (rescue) {
|
||||
dbg("Skipping %s plugin in rescue mode.", __FILE__);
|
||||
@@ -105,38 +157,26 @@ static void rtc_save(void *arg)
|
||||
if (fd < 0)
|
||||
return;
|
||||
|
||||
- tz_set(tz, sizeof(tz));
|
||||
- rc = gettimeofday(&tv, NULL);
|
||||
- if (rc < 0 || tv.tv_sec < rtc_date_fallback) {
|
||||
+ if ((rc = time_get(&tm))) {
|
||||
print_desc(NULL, "System clock invalid, not saving to RTC");
|
||||
- invalid:
|
||||
- logit(LOG_ERR, "System clock invalid, before %s, not saving to RTC", rtc_timestamp);
|
||||
- rc = 2;
|
||||
- goto out;
|
||||
+ } else {
|
||||
+ print_desc(NULL, "Saving system clock (UTC) to RTC");
|
||||
+ rc = ioctl(fd, RTC_SET_TIME, &tm);
|
||||
}
|
||||
|
||||
- print_desc(NULL, "Saving system time (UTC) to RTC");
|
||||
-
|
||||
- gmtime_r(&tv.tv_sec, &tm);
|
||||
- if (ioctl(fd, RTC_SET_TIME, &tm) < 0) {
|
||||
- if (EINVAL == errno)
|
||||
- goto invalid;
|
||||
- rc = 1;
|
||||
- goto out;
|
||||
+ if (rc && errno == EINVAL) {
|
||||
+ logit(LOG_ERR, "System clock invalid, before %s, not saving to RTC", rtc_timestamp);
|
||||
+ rc = 2;
|
||||
}
|
||||
|
||||
-out:
|
||||
- tz_restore(tz);
|
||||
print(rc, NULL);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
static void rtc_restore(void *arg)
|
||||
{
|
||||
- struct timeval tv = { 0 };
|
||||
struct tm tm = { 0 };
|
||||
int fd, rc = 0;
|
||||
- char tz[128];
|
||||
|
||||
if (rescue) {
|
||||
dbg("Skipping %s plugin in rescue mode.", __FILE__);
|
||||
@@ -149,16 +189,19 @@ static void rtc_restore(void *arg)
|
||||
return;
|
||||
}
|
||||
|
||||
- tz_set(tz, sizeof(tz));
|
||||
- if (ioctl(fd, RTC_RD_TIME, &tm) < 0) {
|
||||
+ if ((rc = ioctl(fd, RTC_RD_TIME, &tm)) < 0) {
|
||||
char msg[120];
|
||||
|
||||
snprintf(msg, sizeof(msg), "Failed restoring system clock, %s",
|
||||
EINVAL == errno ? "RTC time is too old" :
|
||||
ENOENT == errno ? "RTC has no saved time" : "see log for details");
|
||||
print_desc(NULL, msg);
|
||||
+ } else {
|
||||
+ print_desc(NULL, "Restoring system clock (UTC) from RTC");
|
||||
+ rc = time_set(&tm);
|
||||
+ }
|
||||
|
||||
- invalid:
|
||||
+ if (rc) {
|
||||
logit(LOG_ERR, "Failed restoring system clock from RTC.");
|
||||
if (EINVAL == errno)
|
||||
logit(LOG_ERR, "RTC time is too old (before %s)", rtc_timestamp);
|
||||
@@ -167,33 +210,10 @@ static void rtc_restore(void *arg)
|
||||
else
|
||||
logit(LOG_ERR, "RTC error code %d: %s", errno, strerror(errno));
|
||||
|
||||
- /* Been here already? */
|
||||
- if (rc)
|
||||
- goto out;
|
||||
-
|
||||
- /* Attempt to set RTC to a sane value ... */
|
||||
- tv.tv_sec = rtc_date_fallback;
|
||||
- if (!gmtime_r(&tv.tv_sec, &tm))
|
||||
- goto out;
|
||||
-
|
||||
- logit(LOG_NOTICE, "Resetting RTC to kernel default, %s.", rtc_timestamp);
|
||||
+ time_set(NULL);
|
||||
rc = 2;
|
||||
}
|
||||
|
||||
- if (!rc)
|
||||
- print_desc(NULL, "Restoring system clock (UTC) from RTC");
|
||||
- tm.tm_isdst = -1; /* Use tzdata to figure it out, please. */
|
||||
- tv.tv_sec = mktime(&tm);
|
||||
- if (tv.tv_sec == (time_t)-1 || tv.tv_sec < rtc_date_fallback) {
|
||||
- errno = EINVAL;
|
||||
- goto invalid;
|
||||
- }
|
||||
-
|
||||
- if (settimeofday(&tv, NULL) == -1)
|
||||
- rc = 1;
|
||||
-
|
||||
-out:
|
||||
- tz_restore(tz);
|
||||
print(rc, NULL);
|
||||
close(fd);
|
||||
}
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
From bc8118d515839dc598f437aa01f07a771646968d Mon Sep 17 00:00:00 2001
|
||||
From: Joachim Wiberg <troglobit@gmail.com>
|
||||
Date: Sun, 3 Nov 2024 09:47:16 +0100
|
||||
Subject: [PATCH 4/6] Fix #418: support systems with a broken RTC
|
||||
Organization: Addiva Elektronik
|
||||
|
||||
This patch introduces a new configure option --with-rtc-file=FILE. When
|
||||
enabled the RTC plugin detects missing RTC device and falls back to save
|
||||
and restore system time from a file instead. When --with-rtc-file is
|
||||
used without an argument the default file is /var/lib/misc/rtc, but the
|
||||
feature itself is disabled by default.
|
||||
|
||||
The usefulness of this feature may not be obvious at first, but some
|
||||
systems are equipped with an RTC that resets to a random date at power
|
||||
on. This can be really bad in the case the date is far in the future,
|
||||
because an NTP sync would then cause time skips backwards, which shows
|
||||
up in logs and causes a whole lot of pain in alarm systems.
|
||||
|
||||
The solution is to disable the RTC driver or device tree node, and when
|
||||
Finit starts up, the RTC plugin detects a the device node and instead
|
||||
restores time from the last save game. Meaning time will always only
|
||||
move forwards.
|
||||
|
||||
NOTE: when Finit is built --with-rtc-file we always save to disk, but
|
||||
only restore from the "save game" if restoring from RTC fails.
|
||||
If the system has no RTC we always restore from disk.
|
||||
|
||||
As an added bonus, this change also makes sure to periodically
|
||||
sync also the RTC with the system clock. Useful for systems
|
||||
that do not run an NTP client.
|
||||
|
||||
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
|
||||
---
|
||||
configure.ac | 12 ++++++
|
||||
plugins/rtc.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++----
|
||||
2 files changed, 110 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 483457f..ae7cd23 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -180,6 +180,10 @@ AC_ARG_WITH(rtc-date,
|
||||
AS_HELP_STRING([--with-rtc-date=DATE], [If RTC date/time is too old, restore to DATE, format "YYYY-MM-DD HH:MM", default "2000-01-01 00:00"]),
|
||||
[rtc_date=$withval], [rtc_date=no])
|
||||
|
||||
+AC_ARG_WITH(rtc-file,
|
||||
+ AS_HELP_STRING([--with-rtc-file=FILE], [If RTC is missing, save and restore system clock from this file, default: no]),
|
||||
+ [rtc_file=$withval], [rtc_file=no])
|
||||
+
|
||||
### Enable features ###########################################################################
|
||||
|
||||
# Create config.h from selected features and fallback defaults
|
||||
@@ -281,6 +285,13 @@ AS_IF([test "x$rtc_date" != "xno"], [
|
||||
AC_DEFINE(RTC_TIMESTAMP_CUSTOM, "$rtc_date", [Custom RTC restore date, default: 2000-01-01 00:00])], [
|
||||
rtc_date=""])
|
||||
|
||||
+AS_IF([test "x$rtc_file" != "xno"], [
|
||||
+ AS_IF([test "x$rtc_file" = "xyes"], [
|
||||
+ rtc_file=/var/lib/misc/rtc])
|
||||
+ AC_EXPAND_DIR(rtcfile_path, "$rtc_file")
|
||||
+ AC_DEFINE_UNQUOTED(RTC_FILE, "$rtcfile_path", [Save and restore system time from this file if /dev/rtc is missing.])],[
|
||||
+ AC_DEFINE_UNQUOTED(RTC_FILE, NULL)])
|
||||
+
|
||||
AS_IF([test "x$with_keventd" != "xno"], [with_keventd=yes])
|
||||
|
||||
AS_IF([test "x$with_sulogin" != "xno"], [
|
||||
@@ -387,6 +398,7 @@ Behavior:
|
||||
Boot heading..........: $heading
|
||||
Plugins...............: $plugins
|
||||
RTC restore date......: $RTC_DATE
|
||||
+ RTC fallback file.....: $rtc_file
|
||||
|
||||
Optional features:
|
||||
Install doc/..........: $enable_doc
|
||||
diff --git a/plugins/rtc.c b/plugins/rtc.c
|
||||
index 9520c7d..9b4eeae 100644
|
||||
--- a/plugins/rtc.c
|
||||
+++ b/plugins/rtc.c
|
||||
@@ -36,8 +36,15 @@
|
||||
#include "helpers.h"
|
||||
#include "plugin.h"
|
||||
|
||||
-/* Kernel RTC driver validates against this date for sanity check */
|
||||
+/*
|
||||
+ * Kernel RTC driver validates against this date for sanity check. The
|
||||
+ * on NTP sync the driver can also update the RTC every 11 mins. We use
|
||||
+ * the same update interval to handle manual time set and file save.
|
||||
+ */
|
||||
#define RTC_TIMESTAMP_BEGIN_2000 "2000-01-01 00:00:00"
|
||||
+#define RTC_FMT "%Y-%m-%d %H:%M:%S"
|
||||
+#define RTC_PERIOD (11 * 60 * 1000)
|
||||
+
|
||||
#ifdef RTC_TIMESTAMP_CUSTOM
|
||||
static char *rtc_timestamp = RTC_TIMESTAMP_CUSTOM;
|
||||
#else
|
||||
@@ -45,6 +52,10 @@ static char *rtc_timestamp = RTC_TIMESTAMP_BEGIN_2000;
|
||||
#endif
|
||||
static time_t rtc_date_fallback = 946684800LL;
|
||||
|
||||
+static char *rtc_file = RTC_FILE;
|
||||
+static uev_t rtc_timer;
|
||||
+
|
||||
+
|
||||
static void tz_set(char *tz, size_t len)
|
||||
{
|
||||
char *ptr;
|
||||
@@ -122,6 +133,68 @@ static int time_get(struct tm *tm)
|
||||
return rc;
|
||||
}
|
||||
|
||||
+static void file_save(void *arg)
|
||||
+{
|
||||
+ struct tm tm = { 0 };
|
||||
+ int rc = 0;
|
||||
+ FILE *fp;
|
||||
+
|
||||
+ fp = fopen(rtc_file, "w");
|
||||
+ if (!fp) {
|
||||
+ logit(LOG_WARNING, "Failed saving system clock to %s, code %d: %s",
|
||||
+ rtc_file, errno, strerror(errno));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if ((rc = time_get(&tm))) {
|
||||
+ logit(LOG_ERR, "System clock invalid, before %s, not saving", rtc_timestamp);
|
||||
+ print_desc(NULL, "System clock invalid, skipping");
|
||||
+ } else {
|
||||
+ char buf[32] = { 0 };
|
||||
+
|
||||
+ print_desc(NULL, "Saving system clock to file");
|
||||
+ strftime(buf, sizeof(buf), RTC_FMT, &tm);
|
||||
+ fprintf(fp, "%s\n", buf);
|
||||
+ }
|
||||
+
|
||||
+ print(rc, NULL);
|
||||
+ fclose(fp);
|
||||
+}
|
||||
+
|
||||
+static void file_restore(void *arg)
|
||||
+{
|
||||
+ struct tm tm = { 0 };
|
||||
+ int rc = 1;
|
||||
+ FILE *fp;
|
||||
+
|
||||
+ if (!rtc_file) {
|
||||
+ logit(LOG_NOTICE, "System has no RTC (missing driver?), skipping restore.");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ print_desc(NULL, "Restoring system clock from backup");
|
||||
+
|
||||
+ fp = fopen(rtc_file, "r");
|
||||
+ if (fp) {
|
||||
+ char buf[32];
|
||||
+
|
||||
+ if (fgets(buf, sizeof(buf), fp)) {
|
||||
+ chomp(buf);
|
||||
+ strptime(buf, RTC_FMT, &tm);
|
||||
+ rc = time_set(&tm);
|
||||
+ }
|
||||
+ fclose(fp);
|
||||
+ } else
|
||||
+ logit(LOG_WARNING, "Missing %s", rtc_file);
|
||||
+
|
||||
+ if (rc) {
|
||||
+ time_set(NULL);
|
||||
+ rc = 2;
|
||||
+ }
|
||||
+
|
||||
+ print(rc, NULL);
|
||||
+}
|
||||
+
|
||||
static int rtc_open(void)
|
||||
{
|
||||
char *alt[] = {
|
||||
@@ -185,7 +258,7 @@ static void rtc_restore(void *arg)
|
||||
|
||||
fd = rtc_open();
|
||||
if (fd < 0) {
|
||||
- logit(LOG_NOTICE, "System has no RTC (missing driver?), skipping restore.");
|
||||
+ file_restore(arg);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -210,21 +283,37 @@ static void rtc_restore(void *arg)
|
||||
else
|
||||
logit(LOG_ERR, "RTC error code %d: %s", errno, strerror(errno));
|
||||
|
||||
- time_set(NULL);
|
||||
- rc = 2;
|
||||
- }
|
||||
+ print(2, NULL);
|
||||
+
|
||||
+ /* Try restoring from last save game */
|
||||
+ if (rtc_file)
|
||||
+ file_restore(arg);
|
||||
+ } else
|
||||
+ print(0, NULL);
|
||||
|
||||
- print(rc, NULL);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
+
|
||||
+static void save(void *arg)
|
||||
+{
|
||||
+ rtc_save(arg);
|
||||
+ file_save(arg);
|
||||
+}
|
||||
+
|
||||
+static void update(uev_t *w, void *arg, int events)
|
||||
+{
|
||||
+ save(arg);
|
||||
+}
|
||||
+
|
||||
+
|
||||
static plugin_t plugin = {
|
||||
.name = __FILE__,
|
||||
.hook[HOOK_BASEFS_UP] = {
|
||||
.cb = rtc_restore
|
||||
},
|
||||
.hook[HOOK_SHUTDOWN] = {
|
||||
- .cb = rtc_save
|
||||
+ .cb = save
|
||||
}
|
||||
};
|
||||
|
||||
@@ -237,6 +326,8 @@ PLUGIN_INIT(plugin_init)
|
||||
else
|
||||
rtc_timestamp = RTC_TIMESTAMP_BEGIN_2000;
|
||||
|
||||
+ uev_timer_init(ctx, &rtc_timer, update, NULL, RTC_PERIOD, RTC_PERIOD);
|
||||
+
|
||||
plugin_register(&plugin);
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
From 6be16f2f6d093ef495d0fe4313f7b05b4ba3e08f Mon Sep 17 00:00:00 2001
|
||||
From: Joachim Wiberg <troglobit@gmail.com>
|
||||
Date: Sun, 3 Nov 2024 10:38:38 +0100
|
||||
Subject: [PATCH 5/6] Fix buggy --with-rtc-date=DATE, introduced in Finit v4.4
|
||||
Organization: Addiva Elektronik
|
||||
|
||||
In 42ef3d3c, for v4.4-rc1, support for setting a custom RTC restore date
|
||||
was introduced. Unfortunately the configure script was wrong and caused
|
||||
config.h to contain
|
||||
|
||||
#define RTC_TIMESTAMP_CUSTOM "$rtc_date"
|
||||
|
||||
instead of
|
||||
|
||||
#define RTC_TIMESTAMP_CUSTOM "2023-04-10 14:35:42"
|
||||
|
||||
Furthermore, the error handling for strptime() was wrong, so the restore
|
||||
date was always reverted to the default.
|
||||
|
||||
This patch fixes both issues and extends the DATE of --with-rtc-date to
|
||||
also include seconds.
|
||||
|
||||
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
|
||||
---
|
||||
configure.ac | 4 ++--
|
||||
plugins/rtc.c | 8 +++++---
|
||||
2 files changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ae7cd23..58b78ac 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -177,7 +177,7 @@ AC_ARG_WITH(plugin-path,
|
||||
[plugin_path=$withval], [plugin_path=yes])
|
||||
|
||||
AC_ARG_WITH(rtc-date,
|
||||
- AS_HELP_STRING([--with-rtc-date=DATE], [If RTC date/time is too old, restore to DATE, format "YYYY-MM-DD HH:MM", default "2000-01-01 00:00"]),
|
||||
+ AS_HELP_STRING([--with-rtc-date=DATE], [If RTC date/time is too old, restore to DATE, format "YYYY-MM-DD HH:MM:SS", default "2000-01-01 00:00:00"]),
|
||||
[rtc_date=$withval], [rtc_date=no])
|
||||
|
||||
AC_ARG_WITH(rtc-file,
|
||||
@@ -282,7 +282,7 @@ AS_IF([test "x$with_random_seed" != "xno"], [
|
||||
AC_DEFINE_UNQUOTED(RANDOMSEED, "$random_path", [Improve random at boot by seeding it with sth from before.])])
|
||||
|
||||
AS_IF([test "x$rtc_date" != "xno"], [
|
||||
- AC_DEFINE(RTC_TIMESTAMP_CUSTOM, "$rtc_date", [Custom RTC restore date, default: 2000-01-01 00:00])], [
|
||||
+ AC_DEFINE_UNQUOTED(RTC_TIMESTAMP_CUSTOM, "$rtc_date", [Custom RTC restore date, default: 2000-01-01 00:00])], [
|
||||
rtc_date=""])
|
||||
|
||||
AS_IF([test "x$rtc_file" != "xno"], [
|
||||
diff --git a/plugins/rtc.c b/plugins/rtc.c
|
||||
index 9b4eeae..a733f75 100644
|
||||
--- a/plugins/rtc.c
|
||||
+++ b/plugins/rtc.c
|
||||
@@ -321,10 +321,12 @@ PLUGIN_INIT(plugin_init)
|
||||
{
|
||||
struct tm tm = { 0 };
|
||||
|
||||
- if (!strptime(rtc_timestamp, "%Y-%m-%d %H:%M", &tm))
|
||||
- rtc_date_fallback = mktime(&tm);
|
||||
- else
|
||||
+ if (!strptime(rtc_timestamp, RTC_FMT, &tm)) {
|
||||
+ logit(LOG_ERR, "Invalid restore date '%s', reverting to '%s'",
|
||||
+ rtc_timestamp, RTC_TIMESTAMP_BEGIN_2000);
|
||||
rtc_timestamp = RTC_TIMESTAMP_BEGIN_2000;
|
||||
+ } else
|
||||
+ rtc_date_fallback = mktime(&tm);
|
||||
|
||||
uev_timer_init(ctx, &rtc_timer, update, NULL, RTC_PERIOD, RTC_PERIOD);
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
From 49c0557cedd8d3c1a2f74d27fa7db83dd529914a Mon Sep 17 00:00:00 2001
|
||||
From: Joachim Wiberg <troglobit@gmail.com>
|
||||
Date: Sun, 3 Nov 2024 20:49:04 +0100
|
||||
Subject: [PATCH 6/6] plugins: reduce log level LOG_ERR -> LOG_WARNING
|
||||
Organization: Addiva Elektronik
|
||||
|
||||
These plugins signal success and failure directly to the console, the
|
||||
user should inspect syslog for more information.
|
||||
|
||||
This change is a follow-up to 340cae4, where kernel logs of LOG_ERR and
|
||||
higher are allowed to log directly to the console. Since syslogd has
|
||||
not been started before these plugins, the log messages would otherwise
|
||||
leak to the console.
|
||||
|
||||
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
|
||||
---
|
||||
plugins/rtc.c | 14 +++++++-------
|
||||
plugins/urandom.c | 2 +-
|
||||
2 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/plugins/rtc.c b/plugins/rtc.c
|
||||
index a733f75..96203a0 100644
|
||||
--- a/plugins/rtc.c
|
||||
+++ b/plugins/rtc.c
|
||||
@@ -147,7 +147,7 @@ static void file_save(void *arg)
|
||||
}
|
||||
|
||||
if ((rc = time_get(&tm))) {
|
||||
- logit(LOG_ERR, "System clock invalid, before %s, not saving", rtc_timestamp);
|
||||
+ logit(LOG_WARNING, "System clock invalid, before %s, not saving", rtc_timestamp);
|
||||
print_desc(NULL, "System clock invalid, skipping");
|
||||
} else {
|
||||
char buf[32] = { 0 };
|
||||
@@ -238,7 +238,7 @@ static void rtc_save(void *arg)
|
||||
}
|
||||
|
||||
if (rc && errno == EINVAL) {
|
||||
- logit(LOG_ERR, "System clock invalid, before %s, not saving to RTC", rtc_timestamp);
|
||||
+ logit(LOG_WARNING, "System clock invalid, before %s, not saving to RTC", rtc_timestamp);
|
||||
rc = 2;
|
||||
}
|
||||
|
||||
@@ -275,13 +275,13 @@ static void rtc_restore(void *arg)
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
- logit(LOG_ERR, "Failed restoring system clock from RTC.");
|
||||
+ logit(LOG_WARNING, "Failed restoring system clock from RTC.");
|
||||
if (EINVAL == errno)
|
||||
- logit(LOG_ERR, "RTC time is too old (before %s)", rtc_timestamp);
|
||||
+ logit(LOG_WARNING, "RTC time is too old (before %s)", rtc_timestamp);
|
||||
else if (ENOENT == errno)
|
||||
- logit(LOG_ERR, "RTC has no previously saved (valid) time.");
|
||||
+ logit(LOG_WARNING, "RTC has no previously saved (valid) time.");
|
||||
else
|
||||
- logit(LOG_ERR, "RTC error code %d: %s", errno, strerror(errno));
|
||||
+ logit(LOG_WARNING, "RTC error code %d: %s", errno, strerror(errno));
|
||||
|
||||
print(2, NULL);
|
||||
|
||||
@@ -322,7 +322,7 @@ PLUGIN_INIT(plugin_init)
|
||||
struct tm tm = { 0 };
|
||||
|
||||
if (!strptime(rtc_timestamp, RTC_FMT, &tm)) {
|
||||
- logit(LOG_ERR, "Invalid restore date '%s', reverting to '%s'",
|
||||
+ logit(LOG_WARNING, "Invalid restore date '%s', reverting to '%s'",
|
||||
rtc_timestamp, RTC_TIMESTAMP_BEGIN_2000);
|
||||
rtc_timestamp = RTC_TIMESTAMP_BEGIN_2000;
|
||||
} else
|
||||
diff --git a/plugins/urandom.c b/plugins/urandom.c
|
||||
index b9f6039..6f82779 100644
|
||||
--- a/plugins/urandom.c
|
||||
+++ b/plugins/urandom.c
|
||||
@@ -154,7 +154,7 @@ static void setup(void *arg)
|
||||
close(fd);
|
||||
free(rpi);
|
||||
if (rc < 0)
|
||||
- logit(LOG_ERR, "Failed adding entropy to kernel random pool: %s", strerror(err));
|
||||
+ logit(LOG_WARNING, "Failed adding entropy to kernel random pool: %s", strerror(err));
|
||||
print_result(rc < 0);
|
||||
return;
|
||||
fallback:
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -165,7 +165,6 @@ config BR2_PACKAGE_FINIT_PLUGIN_RTC
|
||||
For lxc/docker application builds you do not need this.
|
||||
|
||||
if BR2_PACKAGE_FINIT_PLUGIN_RTC
|
||||
|
||||
config BR2_PACKAGE_FINIT_RTC_DATE
|
||||
string "Fallback RTC date"
|
||||
help
|
||||
@@ -184,7 +183,21 @@ config BR2_PACKAGE_FINIT_RTC_DATE
|
||||
Ensuring the default system time to be closer to actual time
|
||||
for a period after releasing a firmware image.
|
||||
|
||||
endif
|
||||
config BR2_PACKAGE_FINIT_RTC_FILE
|
||||
string "Fallback file if /dev/rtc is missing"
|
||||
help
|
||||
For systems with broken RTC, where the default value can be
|
||||
completely random, e.g., a time far in the future, it might
|
||||
be better to disable the RTC driver or device tree node.
|
||||
|
||||
Enable this to allow the RTC plugin to save and restore the
|
||||
system clock from a file when the plugin does not find any
|
||||
usable device node.
|
||||
|
||||
Since /var/lib/misc is usually persistent across reboots, we
|
||||
recommend using: /var/lib/misc/rtc
|
||||
|
||||
endif # RTC_PLUGIN
|
||||
|
||||
config BR2_PACKAGE_FINIT_PLUGIN_TTY
|
||||
bool "TTY plugin"
|
||||
|
||||
@@ -13,11 +13,19 @@ FINIT_DEPENDENCIES = host-pkgconf libite libuev
|
||||
FINIT_INSTALL_STAGING = YES
|
||||
FINIT_D = $(TARGET_DIR)/etc/finit.d
|
||||
|
||||
# Create configure script using autoreconf when building from git
|
||||
# Create configure script using autoreconf when building from git,
|
||||
# or when patching any of the GNU build files (*.ac, *.am, etc.)
|
||||
#FINIT_VERSION = 438d6b4e638418a2a22024a3cead2f47909d72b9
|
||||
#FINIT_SITE = $(call github,troglobit,finit,$(FINIT_VERSION))
|
||||
#FINIT_AUTORECONF = YES
|
||||
#FINIT_DEPENDENCIES += host-automake host-autoconf host-libtool
|
||||
FINIT_AUTORECONF = YES
|
||||
FINIT_DEPENDENCIES += host-automake host-autoconf host-libtool
|
||||
|
||||
# Strip "" from variables
|
||||
FINIT_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME))
|
||||
FINIT_GROUP = $(call qstrip,$(BR2_PACKAGE_FINIT_INITCTL_GROUP))
|
||||
FINIT_FSTAB = $(call qstrip,$(BR2_PACKAGE_FINIT_CUSTOM_FSTAB))
|
||||
FINIT_RTC_DATE = $(call qstrip,$(BR2_PACKAGE_FINIT_RTC_DATE))
|
||||
FINIT_RTC_FILE = $(call qstrip,$(BR2_PACKAGE_FINIT_RTC_FILE))
|
||||
|
||||
# Buildroot defaults to /usr for both prefix and exec-prefix, this we
|
||||
# must override because we want to install into /sbin and /bin for the
|
||||
@@ -31,7 +39,7 @@ FINIT_CONF_OPTS = \
|
||||
--disable-contrib \
|
||||
--disable-rescue \
|
||||
--disable-silent-rules \
|
||||
--with-group=$(BR2_PACKAGE_FINIT_INITCTL_GROUP)
|
||||
--with-group="$(FINIT_GROUP)"
|
||||
|
||||
ifeq ($(BR2_ROOTFS_MERGED_USR),y)
|
||||
FINIT_CONF_OPTS += --exec-prefix=/usr
|
||||
@@ -40,8 +48,8 @@ FINIT_CONF_OPTS += --exec-prefix=
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FINIT_ADVANCED),y)
|
||||
ifneq ($(BR2_PACKAGE_FINIT_CUSTOM_FSTAB),)
|
||||
FINIT_CONF_OPTS += --with-fstab=$(BR2_PACKAGE_FINIT_CUSTOM_FSTAB)
|
||||
ifneq ($(FINIT_FSTAB),)
|
||||
FINIT_CONF_OPTS += --with-fstab="$(FINIT_FSTAB)"
|
||||
else
|
||||
FINIT_CONF_OPTS += --without-fstab
|
||||
endif
|
||||
@@ -101,12 +109,18 @@ else
|
||||
FINIT_CONF_OPTS += --disable-rtc-plugin
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FINIT_RTC_DATE),y)
|
||||
FINIT_CONF_OPTS += --with-rtc-date="$(BR2_PACKAGE_FINIT_RTC_DATE)"
|
||||
ifneq ($(FINIT_RTC_DATE),)
|
||||
FINIT_CONF_OPTS += --with-rtc-date="$(FINIT_RTC_DATE)"
|
||||
else
|
||||
FINIT_CONF_OPTS += --without-rtc-date
|
||||
endif
|
||||
|
||||
ifneq ($(FINIT_RTC_FILE),)
|
||||
FINIT_CONF_OPTS += --with-rtc-file="$(FINIT_RTC_FILE)"
|
||||
else
|
||||
FINIT_CONF_OPTS += --without-rtc-file
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FINIT_PLUGIN_TTY),y)
|
||||
FINIT_CONF_OPTS += --enable-tty-plugin
|
||||
else
|
||||
@@ -119,8 +133,11 @@ else
|
||||
FINIT_CONF_OPTS += --disable-urandom-plugin
|
||||
endif
|
||||
|
||||
ifneq ($(SKELETON_INIT_COMMON_HOSTNAME),)
|
||||
FINIT_CONF_OPTS += --with-hostname="$(SKELETON_INIT_COMMON_HOSTNAME)"
|
||||
|
||||
ifneq ($(FINIT_HOSTNAME),)
|
||||
FINIT_CONF_OPTS += --with-hostname="$(FINIT_HOSTNAME)"
|
||||
else
|
||||
FINIT_CONF_OPTS += --without-hostname
|
||||
endif
|
||||
|
||||
# Disable/Enable features depending on other packages
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
config BR2_PACKAGE_KLISH
|
||||
bool "klish"
|
||||
depends on BR2_USE_MMU
|
||||
select BR2_PACKAGE_BIN
|
||||
select BR2_PACKAGE_FAUX
|
||||
select BR2_PACKAGE_LIBXML2
|
||||
help
|
||||
|
||||
@@ -204,6 +204,14 @@ endif
|
||||
|
||||
endif # BR2_PACKAGE_QUAGGA
|
||||
|
||||
ifeq ($(BR2_PACKAGE_RNG_TOOLS),y)
|
||||
define SKELETON_INIT_FINIT_SET_RNGD
|
||||
cp $(SKELETON_INIT_FINIT_AVAILABLE)/rngd.conf $(FINIT_D)/available/
|
||||
ln -sf ../available/rngd.conf $(FINIT_D)/enabled/rngd.conf
|
||||
endef
|
||||
SKELETON_INIT_FINIT_POST_INSTALL_TARGET_HOOKS += SKELETON_INIT_FINIT_SET_RNGD
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SMCROUTE),y)
|
||||
define SKELETON_INIT_FINIT_SET_SMCROUTE
|
||||
cp $(SKELETON_INIT_FINIT_AVAILABLE)/smcroute.conf $(FINIT_D)/available/
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
service [S12345789] log rngd -f -- Entropy gathering daemon (rngd)
|
||||
@@ -1889,6 +1889,10 @@ static sr_error_t netdag_gen_iface(sr_session_ctx_t *session, struct dagger *net
|
||||
if (err)
|
||||
goto err_close_ip;
|
||||
|
||||
/* ifAlias, should skip for container-network types */
|
||||
attr = lydx_get_cattr(cif, "description");
|
||||
fprintf(ip, "link set alias \"%s\" dev %s\n", attr ?: "", ifname);
|
||||
|
||||
/* Bring interface back up, if enabled */
|
||||
attr = lydx_get_cattr(cif, "enabled");
|
||||
if (!attr || !strcmp(attr, "true"))
|
||||
|
||||
@@ -37,7 +37,7 @@ MODULES=(
|
||||
"ieee802-ethernet-interface@2019-06-21.yang"
|
||||
"infix-ethernet-interface@2024-02-27.yang"
|
||||
"infix-factory-default@2023-06-28.yang"
|
||||
"infix-interfaces@2024-10-14.yang -e vlan-filtering"
|
||||
"infix-interfaces@2024-10-28.yang -e vlan-filtering"
|
||||
|
||||
# from rousette
|
||||
"ietf-restconf@2017-01-26.yang"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- sh -*-
|
||||
# REMEMBER TO UPDATE infix-interfaces ALSO IN confd.inc
|
||||
MODULES=(
|
||||
"infix-interfaces@2024-10-14.yang -e vlan-filtering -e containers"
|
||||
"infix-interfaces@2024-10-28.yang -e vlan-filtering -e containers"
|
||||
"infix-containers@2024-10-14.yang"
|
||||
)
|
||||
|
||||
@@ -23,6 +23,10 @@ submodule infix-if-container {
|
||||
Ensures a container interface can never be a bridge port, or
|
||||
LAG member, at the same time.";
|
||||
|
||||
revision 2024-10-29 {
|
||||
description "Add read only container list to container-network";
|
||||
reference "internal";
|
||||
}
|
||||
revision 2024-01-15 {
|
||||
description "Initial revision.";
|
||||
reference "internal";
|
||||
@@ -64,7 +68,11 @@ submodule infix-if-container {
|
||||
base container-network;
|
||||
}
|
||||
}
|
||||
|
||||
leaf-list containers {
|
||||
type string;
|
||||
config false;
|
||||
description "List of containers using this interface";
|
||||
}
|
||||
list subnet {
|
||||
description "Static IP ranges to hand out addresses to containers from.
|
||||
|
||||
|
||||
@@ -23,6 +23,11 @@ module infix-interfaces {
|
||||
contact "kernelkit@googlegroups.com";
|
||||
description "Linux bridge and lag extensions for ietf-interfaces.";
|
||||
|
||||
revision 2024-10-28 {
|
||||
description "Limit description to 64 chars, matching IF-MIB max.";
|
||||
reference "internal";
|
||||
}
|
||||
|
||||
revision 2024-10-14 {
|
||||
description "Deviate link-up-down-trap-enable not-supported.";
|
||||
reference "internal";
|
||||
@@ -84,6 +89,18 @@ module infix-interfaces {
|
||||
}
|
||||
}
|
||||
|
||||
deviation "/if:interfaces/if:interface/if:description" {
|
||||
deviate replace {
|
||||
type string {
|
||||
length "0..64";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
deviation "/if:interfaces/if:interface/if:link-up-down-trap-enable" {
|
||||
deviate not-supported;
|
||||
}
|
||||
|
||||
augment "/if:interfaces/if:interface" {
|
||||
description "Custom phys-address management, static or derived from chassis MAC.";
|
||||
|
||||
@@ -114,7 +131,4 @@ module infix-interfaces {
|
||||
}
|
||||
}
|
||||
}
|
||||
deviation "/if:interfaces/if:interface/if:link-up-down-trap-enable" {
|
||||
deviate not-supported;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@
|
||||
<ACTION sym="script">
|
||||
if [ -n "$KLISH_PARAM_name" ]; then
|
||||
sysrepocfg -f json -X -d operational -x \
|
||||
"/ietf-interfaces:interfaces/interface[name='$KLISH_PARAM_name']" | \
|
||||
"/ietf-interfaces:interfaces/interface[name=\"$KLISH_PARAM_name\"]" | \
|
||||
/usr/libexec/statd/cli-pretty "show-interfaces" -n "$KLISH_PARAM_name"
|
||||
else
|
||||
sysrepocfg -f json -X -d operational -m ietf-interfaces | \
|
||||
|
||||
@@ -80,6 +80,10 @@ class Decore():
|
||||
def underline(txt):
|
||||
return Decore.decorate("4", txt, "24")
|
||||
|
||||
@staticmethod
|
||||
def gray_bg(txt):
|
||||
return Decore.decorate("100", txt)
|
||||
|
||||
def datetime_now():
|
||||
if UNIT_TEST:
|
||||
return datetime(2023, 1, 1, 12, 0, 0, tzinfo=timezone.utc)
|
||||
@@ -273,6 +277,7 @@ class Iface:
|
||||
self.bridge = get_json_data('', self.data, 'infix-interfaces:bridge-port', 'bridge')
|
||||
self.pvid = get_json_data('', self.data, 'infix-interfaces:bridge-port', 'pvid')
|
||||
self.stp_state = get_json_data('', self.data, 'infix-interfaces:bridge-port', 'stp-state')
|
||||
self.containers = get_json_data('', self.data, 'infix-interfaces:container-network', 'containers')
|
||||
|
||||
if data.get('statistics'):
|
||||
self.in_octets = data.get('statistics').get('in-octets', '')
|
||||
@@ -302,6 +307,10 @@ class Iface:
|
||||
def is_vlan(self):
|
||||
return self.type == "infix-if-type:vlan"
|
||||
|
||||
def is_in_container(self):
|
||||
# Return negative if cointainer isn't set or is an empty list
|
||||
return getattr(self, 'containers', None)
|
||||
|
||||
def is_bridge(self):
|
||||
return self.type == "infix-if-type:bridge"
|
||||
|
||||
@@ -436,7 +445,18 @@ class Iface:
|
||||
parent.pr_name(pipe='└ ')
|
||||
parent.pr_proto_eth()
|
||||
|
||||
def pr_container(self):
|
||||
row = f"{self.name:<{Pad.iface}}"
|
||||
row += f"{'container':<{Pad.proto}}"
|
||||
row += f"{'':<{Pad.state}}"
|
||||
row += f"{', ' . join(self.containers):<{Pad.data}}"
|
||||
|
||||
print(Decore.gray_bg(row))
|
||||
|
||||
def pr_iface(self):
|
||||
if self.is_in_container():
|
||||
print(Decore.gray_bg(f"{'owned by container':<{20}}: {', ' . join(self.containers)}"))
|
||||
|
||||
print(f"{'name':<{20}}: {self.name}")
|
||||
print(f"{'index':<{20}}: {self.index}")
|
||||
if self.mtu:
|
||||
@@ -564,6 +584,10 @@ def pr_interface_list(json):
|
||||
if iface.name == "lo":
|
||||
continue
|
||||
|
||||
if iface.is_in_container():
|
||||
iface.pr_container()
|
||||
continue
|
||||
|
||||
if iface.is_bridge():
|
||||
iface.pr_bridge(ifaces)
|
||||
continue
|
||||
|
||||
@@ -629,22 +629,59 @@ def get_brport_multicast(ifname):
|
||||
def get_ip_link():
|
||||
"""Fetch interface link information from kernel"""
|
||||
return run_json_cmd(['ip', '-s', '-d', '-j', 'link', 'show'],
|
||||
f"ip-link-show.json")
|
||||
"ip-link-show.json")
|
||||
|
||||
def netns_get_ip_link(netns):
|
||||
"""Fetch interface link information from within a network namespace"""
|
||||
return run_json_cmd(['ip', 'netns', 'exec', netns, 'ip', '-s', '-d', '-j', 'link', 'show'],
|
||||
f"netns-{netns}-ip-link-show.json")
|
||||
|
||||
def get_ip_addr():
|
||||
"""Fetch interface address information from kernel"""
|
||||
return run_json_cmd(['ip', '-j', 'addr', 'show'],
|
||||
f"ip-addr-show.json")
|
||||
"ip-addr-show.json")
|
||||
|
||||
def netns_get_ip_addr(netns):
|
||||
"""Fetch interface address information from within a network namespace"""
|
||||
return run_json_cmd(['ip', 'netns', 'exec', netns, 'ip', '-j', 'addr', 'show'],
|
||||
f"netns-{netns}-ip-addr-show.json")
|
||||
|
||||
def get_netns_list():
|
||||
"""Fetch a list of network namespaces"""
|
||||
return run_json_cmd(['ip', '-j', 'netns', 'list'],
|
||||
"netns-list.json")
|
||||
|
||||
def netns_find_ifname(ifname):
|
||||
"""Find which network namespace owns ifname (if any)"""
|
||||
for netns in get_netns_list():
|
||||
for iface in netns_get_ip_link(netns['name']):
|
||||
if 'ifalias' in iface and iface['ifalias'] == ifname:
|
||||
return netns['name']
|
||||
return None
|
||||
|
||||
def netns_ifindex_to_ifname(ifindex):
|
||||
"""Look through all network namespaces for an interface index and return its name"""
|
||||
for netns in get_netns_list():
|
||||
for iface in netns_get_ip_link(netns['name']):
|
||||
if iface['ifindex'] == ifindex:
|
||||
if 'ifalias' in iface:
|
||||
return iface['ifalias']
|
||||
if 'ifname' in iface:
|
||||
return iface['ifname']
|
||||
return None
|
||||
|
||||
return None
|
||||
|
||||
def add_ip_link(ifname, iface_in, iface_out):
|
||||
if 'ifname' in iface_in:
|
||||
iface_out['name'] = iface_in['ifname']
|
||||
iface_out['name'] = ifname
|
||||
|
||||
if 'ifindex' in iface_in:
|
||||
iface_out['if-index'] = iface_in['ifindex']
|
||||
|
||||
if 'ifalias' in iface_in:
|
||||
iface_out['description'] = iface_in['ifalias']
|
||||
|
||||
if 'address' in iface_in:
|
||||
iface_out['phys-address'] = iface_in['address']
|
||||
|
||||
@@ -661,17 +698,17 @@ def add_ip_link(ifname, iface_in, iface_out):
|
||||
|
||||
multicast = get_brport_multicast(ifname)
|
||||
insert(iface_out, "infix-interfaces:bridge-port", "multicast", multicast)
|
||||
if 'link' in iface_in and not iface_is_dsa(iface_in):
|
||||
insert(iface_out, "infix-interfaces:vlan", "lower-layer-if", iface_in['link'])
|
||||
if not iface_is_dsa(iface_in):
|
||||
if 'link' in iface_in:
|
||||
insert(iface_out, "infix-interfaces:vlan", "lower-layer-if", iface_in['link'])
|
||||
elif 'link_index' in iface_in:
|
||||
# 'link_index' is the only reference we have if the link iface is in a namespace
|
||||
lower = netns_ifindex_to_ifname(iface_in['link_index'])
|
||||
if lower:
|
||||
insert(iface_out, "infix-interfaces:vlan", "lower-layer-if", lower)
|
||||
|
||||
if 'flags' in iface_in:
|
||||
admin_xlate = {
|
||||
"UP": "up",
|
||||
"DOWN": "down"
|
||||
}
|
||||
|
||||
admin_status = admin_xlate.get("UP" if "UP" in iface_in['flags'] else "DOWN", "testing")
|
||||
iface_out['admin-status'] = admin_status
|
||||
iface_out['admin-status'] = "up" if "UP" in iface_in['flags'] else "down"
|
||||
|
||||
if 'operstate' in iface_in:
|
||||
xlate = {
|
||||
@@ -888,6 +925,39 @@ def add_mdb_to_bridge(brname, iface_out, mc_status):
|
||||
insert(iface_out, "infix-interfaces:bridge", "multicast", multicast)
|
||||
insert(iface_out, "infix-interfaces:bridge", "multicast-filters", "multicast-filter", multicast_filters)
|
||||
|
||||
def add_container_ifaces(yang_ifaces):
|
||||
"""Add all podman interfaces with limited data"""
|
||||
interfaces={}
|
||||
try:
|
||||
containers = run_json_cmd(['podman', 'ps', '--format', 'json'], "podman-ps.json", default=[])
|
||||
except Exception as e:
|
||||
logging.error(f"Error, unable to run podman: {e}")
|
||||
return
|
||||
|
||||
for container in containers:
|
||||
name = container.get('Names', ['Unknown'])[0]
|
||||
networks = container.get('Networks', [])
|
||||
|
||||
for network in networks:
|
||||
if not network in interfaces:
|
||||
interfaces[network] = []
|
||||
if name not in interfaces[network]:
|
||||
interfaces[network].append(name)
|
||||
|
||||
for ifname, containers in interfaces.items():
|
||||
iface_out = {}
|
||||
iface_out['name'] = ifname
|
||||
iface_out['type'] = "infix-if-type:other" # Fallback
|
||||
insert(iface_out, "infix-interfaces:container-network", "containers", containers)
|
||||
|
||||
netns = netns_find_ifname(ifname)
|
||||
if netns is not None:
|
||||
ip_link_data = netns_get_ip_link(netns)
|
||||
ip_link_data = next((d for d in ip_link_data if d.get('ifalias') == ifname), None)
|
||||
add_ip_link(ifname, ip_link_data, iface_out)
|
||||
|
||||
yang_ifaces.append(iface_out)
|
||||
|
||||
# Helper function to add tagged/untagged interfaces to a vlan dict in a list
|
||||
def _add_vlan_iface(vlans, multicast_filter, multicast, vid, key, val):
|
||||
for d in vlans:
|
||||
@@ -965,6 +1035,8 @@ def add_interface(ifname, yang_ifaces):
|
||||
addr = next((d for d in ip_addr_data if d.get('ifname') == link["ifname"]), None)
|
||||
_add_interface(link["ifname"], link, addr, yang_ifaces)
|
||||
|
||||
add_container_ifaces(yang_ifaces)
|
||||
|
||||
def main():
|
||||
global TESTPATH
|
||||
global logger
|
||||
|
||||
@@ -6,5 +6,11 @@ br0 bridge [33m [39mvlan:40u,50t
|
||||
br1 bridge [33m [39m
|
||||
│ ethernet [32mUP [39m02:00:00:00:00:02
|
||||
└ e2 bridge [32mFORWARDING [39mvlan:30u pvid:30
|
||||
[100me2 container system [0m
|
||||
e3 ethernet [32mUP [39m02:00:00:00:00:03
|
||||
e4 ethernet [31mDOWN [39m02:00:00:00:00:04
|
||||
[100mveth0b container system [0m
|
||||
veth0j ethernet [32mUP [39mb2:82:e3:ce:d5:9e
|
||||
veth peer:veth0k
|
||||
ipv4 192.168.1.1/24 (static)
|
||||
[100mveth0k container system2 [0m
|
||||
|
||||
@@ -625,5 +625,37 @@
|
||||
"collisions": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ifindex": 9,
|
||||
"link_index": 8,
|
||||
"ifname": "veth0j",
|
||||
"flags": [
|
||||
"BROADCAST",
|
||||
"MULTICAST",
|
||||
"UP",
|
||||
"LOWER_UP"
|
||||
],
|
||||
"mtu": 1500,
|
||||
"qdisc": "noqueue",
|
||||
"operstate": "UP",
|
||||
"group": "default",
|
||||
"txqlen": 1000,
|
||||
"link_type": "ether",
|
||||
"address": "b2:82:e3:ce:d5:9e",
|
||||
"broadcast": "ff:ff:ff:ff:ff:ff",
|
||||
"link_netnsid": 1,
|
||||
"addr_info": [
|
||||
{
|
||||
"family": "inet",
|
||||
"local": "192.168.1.1",
|
||||
"prefixlen": 24,
|
||||
"scope": "global",
|
||||
"protocol": "static",
|
||||
"label": "veth0j",
|
||||
"valid_life_time": 4294967295,
|
||||
"preferred_life_time": 4294967295
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -618,5 +618,61 @@
|
||||
"collisions": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ifindex": 9,
|
||||
"link_index": 8,
|
||||
"ifname": "veth0j",
|
||||
"flags": [
|
||||
"BROADCAST",
|
||||
"MULTICAST",
|
||||
"UP",
|
||||
"LOWER_UP"
|
||||
],
|
||||
"mtu": 1500,
|
||||
"qdisc": "noqueue",
|
||||
"operstate": "UP",
|
||||
"linkmode": "DEFAULT",
|
||||
"group": "default",
|
||||
"txqlen": 1000,
|
||||
"link_type": "ether",
|
||||
"address": "b2:82:e3:ce:d5:9e",
|
||||
"broadcast": "ff:ff:ff:ff:ff:ff",
|
||||
"link_netnsid": 1,
|
||||
"promiscuity": 0,
|
||||
"allmulti": 0,
|
||||
"min_mtu": 68,
|
||||
"max_mtu": 65535,
|
||||
"linkinfo": {
|
||||
"info_kind": "veth"
|
||||
},
|
||||
"inet6_addr_gen_mode": "none",
|
||||
"num_tx_queues": 1,
|
||||
"num_rx_queues": 1,
|
||||
"gso_max_size": 65536,
|
||||
"gso_max_segs": 65535,
|
||||
"tso_max_size": 524280,
|
||||
"tso_max_segs": 65535,
|
||||
"gro_max_size": 65536,
|
||||
"gso_ipv4_max_size": 65536,
|
||||
"gro_ipv4_max_size": 65536,
|
||||
"stats64": {
|
||||
"rx": {
|
||||
"bytes": 1006,
|
||||
"packets": 13,
|
||||
"errors": 0,
|
||||
"dropped": 0,
|
||||
"over_errors": 0,
|
||||
"multicast": 0
|
||||
},
|
||||
"tx": {
|
||||
"bytes": 18668,
|
||||
"packets": 50,
|
||||
"errors": 0,
|
||||
"dropped": 0,
|
||||
"carrier_errors": 0,
|
||||
"collisions": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
[
|
||||
{
|
||||
"ifindex": 1,
|
||||
"ifname": "lo",
|
||||
"flags": [
|
||||
"LOOPBACK",
|
||||
"UP",
|
||||
"LOWER_UP"
|
||||
],
|
||||
"mtu": 65536,
|
||||
"qdisc": "noqueue",
|
||||
"operstate": "UNKNOWN",
|
||||
"group": "default",
|
||||
"txqlen": 1000,
|
||||
"link_type": "loopback",
|
||||
"address": "00:00:00:00:00:00",
|
||||
"broadcast": "00:00:00:00:00:00",
|
||||
"addr_info": [
|
||||
{
|
||||
"family": "inet",
|
||||
"local": "127.0.0.1",
|
||||
"prefixlen": 8,
|
||||
"scope": "host",
|
||||
"label": "lo",
|
||||
"valid_life_time": 4294967295,
|
||||
"preferred_life_time": 4294967295
|
||||
},
|
||||
{
|
||||
"family": "inet6",
|
||||
"local": "::1",
|
||||
"prefixlen": 128,
|
||||
"scope": "host",
|
||||
"protocol": "kernel_lo",
|
||||
"valid_life_time": 4294967295,
|
||||
"preferred_life_time": 4294967295
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ifindex": 3,
|
||||
"ifname": "eth0",
|
||||
"flags": [
|
||||
"BROADCAST",
|
||||
"MULTICAST",
|
||||
"UP",
|
||||
"LOWER_UP"
|
||||
],
|
||||
"mtu": 1500,
|
||||
"qdisc": "pfifo_fast",
|
||||
"operstate": "UP",
|
||||
"group": "default",
|
||||
"txqlen": 1000,
|
||||
"link_type": "ether",
|
||||
"address": "02:00:00:00:00:02",
|
||||
"broadcast": "ff:ff:ff:ff:ff:ff",
|
||||
"addr_info": [
|
||||
{
|
||||
"family": "inet",
|
||||
"local": "172.0.0.1",
|
||||
"prefixlen": 24,
|
||||
"broadcast": "172.0.0.255",
|
||||
"scope": "global",
|
||||
"label": "eth0",
|
||||
"valid_life_time": 4294967295,
|
||||
"preferred_life_time": 4294967295
|
||||
},
|
||||
{
|
||||
"family": "inet6",
|
||||
"local": "fe80::ff:fe00:2",
|
||||
"prefixlen": 64,
|
||||
"scope": "link",
|
||||
"protocol": "kernel_ll",
|
||||
"valid_life_time": 4294967295,
|
||||
"preferred_life_time": 4294967295
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ifindex": 6,
|
||||
"link_index": 7,
|
||||
"ifname": "eth1",
|
||||
"flags": [
|
||||
"BROADCAST",
|
||||
"MULTICAST",
|
||||
"UP",
|
||||
"LOWER_UP"
|
||||
],
|
||||
"mtu": 1500,
|
||||
"qdisc": "noqueue",
|
||||
"operstate": "UP",
|
||||
"group": "default",
|
||||
"txqlen": 1000,
|
||||
"link_type": "ether",
|
||||
"address": "62:64:85:4c:7c:87",
|
||||
"broadcast": "ff:ff:ff:ff:ff:ff",
|
||||
"link_netnsid": 0,
|
||||
"addr_info": [
|
||||
{
|
||||
"family": "inet",
|
||||
"local": "192.168.0.2",
|
||||
"prefixlen": 24,
|
||||
"broadcast": "192.168.0.255",
|
||||
"scope": "global",
|
||||
"label": "eth1",
|
||||
"valid_life_time": 4294967295,
|
||||
"preferred_life_time": 4294967295
|
||||
},
|
||||
{
|
||||
"family": "inet6",
|
||||
"local": "fe80::6064:85ff:fe4c:7c87",
|
||||
"prefixlen": 64,
|
||||
"scope": "link",
|
||||
"protocol": "kernel_ll",
|
||||
"valid_life_time": 4294967295,
|
||||
"preferred_life_time": 4294967295
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,163 @@
|
||||
[
|
||||
{
|
||||
"ifindex": 1,
|
||||
"ifname": "lo",
|
||||
"flags": [
|
||||
"LOOPBACK",
|
||||
"UP",
|
||||
"LOWER_UP"
|
||||
],
|
||||
"mtu": 65536,
|
||||
"qdisc": "noqueue",
|
||||
"operstate": "UNKNOWN",
|
||||
"linkmode": "DEFAULT",
|
||||
"group": "default",
|
||||
"txqlen": 1000,
|
||||
"link_type": "loopback",
|
||||
"address": "00:00:00:00:00:00",
|
||||
"broadcast": "00:00:00:00:00:00",
|
||||
"promiscuity": 0,
|
||||
"allmulti": 0,
|
||||
"min_mtu": 0,
|
||||
"max_mtu": 0,
|
||||
"inet6_addr_gen_mode": "eui64",
|
||||
"num_tx_queues": 1,
|
||||
"num_rx_queues": 1,
|
||||
"gso_max_size": 65536,
|
||||
"gso_max_segs": 65535,
|
||||
"tso_max_size": 524280,
|
||||
"tso_max_segs": 65535,
|
||||
"gro_max_size": 65536,
|
||||
"gso_ipv4_max_size": 65536,
|
||||
"gro_ipv4_max_size": 65536,
|
||||
"stats64": {
|
||||
"rx": {
|
||||
"bytes": 0,
|
||||
"packets": 0,
|
||||
"errors": 0,
|
||||
"dropped": 0,
|
||||
"over_errors": 0,
|
||||
"multicast": 0
|
||||
},
|
||||
"tx": {
|
||||
"bytes": 0,
|
||||
"packets": 0,
|
||||
"errors": 0,
|
||||
"dropped": 0,
|
||||
"carrier_errors": 0,
|
||||
"collisions": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ifindex": 3,
|
||||
"ifname": "eth0",
|
||||
"flags": [
|
||||
"BROADCAST",
|
||||
"MULTICAST",
|
||||
"UP",
|
||||
"LOWER_UP"
|
||||
],
|
||||
"mtu": 1500,
|
||||
"qdisc": "pfifo_fast",
|
||||
"operstate": "UP",
|
||||
"linkmode": "DEFAULT",
|
||||
"group": "default",
|
||||
"txqlen": 1000,
|
||||
"link_type": "ether",
|
||||
"address": "02:00:00:00:00:02",
|
||||
"broadcast": "ff:ff:ff:ff:ff:ff",
|
||||
"promiscuity": 0,
|
||||
"allmulti": 0,
|
||||
"min_mtu": 68,
|
||||
"max_mtu": 65535,
|
||||
"inet6_addr_gen_mode": "eui64",
|
||||
"num_tx_queues": 1,
|
||||
"num_rx_queues": 1,
|
||||
"gso_max_size": 65536,
|
||||
"gso_max_segs": 65535,
|
||||
"tso_max_size": 65536,
|
||||
"tso_max_segs": 65535,
|
||||
"gro_max_size": 65536,
|
||||
"gso_ipv4_max_size": 65536,
|
||||
"gro_ipv4_max_size": 65536,
|
||||
"parentbus": "virtio",
|
||||
"parentdev": "virtio3",
|
||||
"ifalias": "e2",
|
||||
"stats64": {
|
||||
"rx": {
|
||||
"bytes": 0,
|
||||
"packets": 0,
|
||||
"errors": 0,
|
||||
"dropped": 0,
|
||||
"over_errors": 0,
|
||||
"multicast": 0
|
||||
},
|
||||
"tx": {
|
||||
"bytes": 1006,
|
||||
"packets": 13,
|
||||
"errors": 0,
|
||||
"dropped": 0,
|
||||
"carrier_errors": 0,
|
||||
"collisions": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ifindex": 6,
|
||||
"link_index": 7,
|
||||
"ifname": "eth1",
|
||||
"flags": [
|
||||
"BROADCAST",
|
||||
"MULTICAST",
|
||||
"UP",
|
||||
"LOWER_UP"
|
||||
],
|
||||
"mtu": 1500,
|
||||
"qdisc": "noqueue",
|
||||
"operstate": "UP",
|
||||
"linkmode": "DEFAULT",
|
||||
"group": "default",
|
||||
"txqlen": 1000,
|
||||
"link_type": "ether",
|
||||
"address": "62:64:85:4c:7c:87",
|
||||
"broadcast": "ff:ff:ff:ff:ff:ff",
|
||||
"link_netnsid": 0,
|
||||
"promiscuity": 0,
|
||||
"allmulti": 0,
|
||||
"min_mtu": 68,
|
||||
"max_mtu": 65535,
|
||||
"linkinfo": {
|
||||
"info_kind": "veth"
|
||||
},
|
||||
"inet6_addr_gen_mode": "eui64",
|
||||
"num_tx_queues": 1,
|
||||
"num_rx_queues": 1,
|
||||
"gso_max_size": 65536,
|
||||
"gso_max_segs": 65535,
|
||||
"tso_max_size": 524280,
|
||||
"tso_max_segs": 65535,
|
||||
"gro_max_size": 65536,
|
||||
"gso_ipv4_max_size": 65536,
|
||||
"gro_ipv4_max_size": 65536,
|
||||
"ifalias": "veth0b",
|
||||
"stats64": {
|
||||
"rx": {
|
||||
"bytes": 17643,
|
||||
"packets": 44,
|
||||
"errors": 0,
|
||||
"dropped": 24,
|
||||
"over_errors": 0,
|
||||
"multicast": 0
|
||||
},
|
||||
"tx": {
|
||||
"bytes": 1006,
|
||||
"packets": 13,
|
||||
"errors": 0,
|
||||
"dropped": 0,
|
||||
"carrier_errors": 0,
|
||||
"collisions": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,80 @@
|
||||
[
|
||||
{
|
||||
"ifindex": 1,
|
||||
"ifname": "lo",
|
||||
"flags": [
|
||||
"LOOPBACK",
|
||||
"UP",
|
||||
"LOWER_UP"
|
||||
],
|
||||
"mtu": 65536,
|
||||
"qdisc": "noqueue",
|
||||
"operstate": "UNKNOWN",
|
||||
"group": "default",
|
||||
"txqlen": 1000,
|
||||
"link_type": "loopback",
|
||||
"address": "00:00:00:00:00:00",
|
||||
"broadcast": "00:00:00:00:00:00",
|
||||
"addr_info": [
|
||||
{
|
||||
"family": "inet",
|
||||
"local": "127.0.0.1",
|
||||
"prefixlen": 8,
|
||||
"scope": "host",
|
||||
"label": "lo",
|
||||
"valid_life_time": 4294967295,
|
||||
"preferred_life_time": 4294967295
|
||||
},
|
||||
{
|
||||
"family": "inet6",
|
||||
"local": "::1",
|
||||
"prefixlen": 128,
|
||||
"scope": "host",
|
||||
"protocol": "kernel_lo",
|
||||
"valid_life_time": 4294967295,
|
||||
"preferred_life_time": 4294967295
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ifindex": 8,
|
||||
"link_index": 9,
|
||||
"ifname": "eth0",
|
||||
"flags": [
|
||||
"BROADCAST",
|
||||
"MULTICAST",
|
||||
"UP",
|
||||
"LOWER_UP"
|
||||
],
|
||||
"mtu": 1500,
|
||||
"qdisc": "noqueue",
|
||||
"operstate": "UP",
|
||||
"group": "default",
|
||||
"txqlen": 1000,
|
||||
"link_type": "ether",
|
||||
"address": "c2:1b:78:88:e2:b8",
|
||||
"broadcast": "ff:ff:ff:ff:ff:ff",
|
||||
"link_netnsid": 0,
|
||||
"addr_info": [
|
||||
{
|
||||
"family": "inet",
|
||||
"local": "192.168.1.2",
|
||||
"prefixlen": 24,
|
||||
"broadcast": "192.168.1.255",
|
||||
"scope": "global",
|
||||
"label": "eth0",
|
||||
"valid_life_time": 4294967295,
|
||||
"preferred_life_time": 4294967295
|
||||
},
|
||||
{
|
||||
"family": "inet6",
|
||||
"local": "fe80::c01b:78ff:fe88:e2b8",
|
||||
"prefixlen": 64,
|
||||
"scope": "link",
|
||||
"protocol": "kernel_ll",
|
||||
"valid_life_time": 4294967295,
|
||||
"preferred_life_time": 4294967295
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,109 @@
|
||||
[
|
||||
{
|
||||
"ifindex": 1,
|
||||
"ifname": "lo",
|
||||
"flags": [
|
||||
"LOOPBACK",
|
||||
"UP",
|
||||
"LOWER_UP"
|
||||
],
|
||||
"mtu": 65536,
|
||||
"qdisc": "noqueue",
|
||||
"operstate": "UNKNOWN",
|
||||
"linkmode": "DEFAULT",
|
||||
"group": "default",
|
||||
"txqlen": 1000,
|
||||
"link_type": "loopback",
|
||||
"address": "00:00:00:00:00:00",
|
||||
"broadcast": "00:00:00:00:00:00",
|
||||
"promiscuity": 0,
|
||||
"allmulti": 0,
|
||||
"min_mtu": 0,
|
||||
"max_mtu": 0,
|
||||
"inet6_addr_gen_mode": "eui64",
|
||||
"num_tx_queues": 1,
|
||||
"num_rx_queues": 1,
|
||||
"gso_max_size": 65536,
|
||||
"gso_max_segs": 65535,
|
||||
"tso_max_size": 524280,
|
||||
"tso_max_segs": 65535,
|
||||
"gro_max_size": 65536,
|
||||
"gso_ipv4_max_size": 65536,
|
||||
"gro_ipv4_max_size": 65536,
|
||||
"stats64": {
|
||||
"rx": {
|
||||
"bytes": 0,
|
||||
"packets": 0,
|
||||
"errors": 0,
|
||||
"dropped": 0,
|
||||
"over_errors": 0,
|
||||
"multicast": 0
|
||||
},
|
||||
"tx": {
|
||||
"bytes": 0,
|
||||
"packets": 0,
|
||||
"errors": 0,
|
||||
"dropped": 0,
|
||||
"carrier_errors": 0,
|
||||
"collisions": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ifindex": 8,
|
||||
"link_index": 9,
|
||||
"ifname": "eth0",
|
||||
"flags": [
|
||||
"BROADCAST",
|
||||
"MULTICAST",
|
||||
"UP",
|
||||
"LOWER_UP"
|
||||
],
|
||||
"mtu": 1500,
|
||||
"qdisc": "noqueue",
|
||||
"operstate": "UP",
|
||||
"linkmode": "DEFAULT",
|
||||
"group": "default",
|
||||
"txqlen": 1000,
|
||||
"link_type": "ether",
|
||||
"address": "c2:1b:78:88:e2:b8",
|
||||
"broadcast": "ff:ff:ff:ff:ff:ff",
|
||||
"link_netnsid": 0,
|
||||
"promiscuity": 0,
|
||||
"allmulti": 0,
|
||||
"min_mtu": 68,
|
||||
"max_mtu": 65535,
|
||||
"linkinfo": {
|
||||
"info_kind": "veth"
|
||||
},
|
||||
"inet6_addr_gen_mode": "eui64",
|
||||
"num_tx_queues": 1,
|
||||
"num_rx_queues": 1,
|
||||
"gso_max_size": 65536,
|
||||
"gso_max_segs": 65535,
|
||||
"tso_max_size": 524280,
|
||||
"tso_max_segs": 65535,
|
||||
"gro_max_size": 65536,
|
||||
"gso_ipv4_max_size": 65536,
|
||||
"gro_ipv4_max_size": 65536,
|
||||
"ifalias": "veth0k",
|
||||
"stats64": {
|
||||
"rx": {
|
||||
"bytes": 15197,
|
||||
"packets": 37,
|
||||
"errors": 0,
|
||||
"dropped": 22,
|
||||
"over_errors": 0,
|
||||
"multicast": 0
|
||||
},
|
||||
"tx": {
|
||||
"bytes": 1006,
|
||||
"packets": 13,
|
||||
"errors": 0,
|
||||
"dropped": 0,
|
||||
"carrier_errors": 0,
|
||||
"collisions": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"name": "57ff63cb",
|
||||
"id": 0
|
||||
},
|
||||
{
|
||||
"name": "db5ad90e",
|
||||
"id": 1
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,73 @@
|
||||
[
|
||||
{
|
||||
"AutoRemove": false,
|
||||
"Command": null,
|
||||
"CreatedAt": "25 minutes ago",
|
||||
"Exited": false,
|
||||
"ExitedAt": 1730216567,
|
||||
"ExitCode": 0,
|
||||
"Id": "cf054e1bc3ff7d7d6fec0cc9a0435f0c96f166e54bc9e9d92149ab53ffa60321",
|
||||
"Image": "ghcr.io/kernelkit/curios:edge",
|
||||
"ImageID": "cee712df3c4ea28bd3f03ca50d46e53788b1526812f4dac8d9133870eb5c49c0",
|
||||
"IsInfra": false,
|
||||
"Labels": {
|
||||
"org.opencontainers.image.title": "curiOS",
|
||||
"org.opencontainers.image.url": "https://github.com/kernelkit/curiOS"
|
||||
},
|
||||
"Mounts": [],
|
||||
"Names": [
|
||||
"system2"
|
||||
],
|
||||
"Namespaces": {
|
||||
|
||||
},
|
||||
"Networks": [
|
||||
"veth0k"
|
||||
],
|
||||
"Pid": 3934,
|
||||
"Pod": "",
|
||||
"PodName": "",
|
||||
"Ports": null,
|
||||
"Size": null,
|
||||
"StartedAt": 1730216629,
|
||||
"State": "running",
|
||||
"Status": "Up 3 minutes",
|
||||
"Created": 1730215318
|
||||
},
|
||||
{
|
||||
"AutoRemove": false,
|
||||
"Command": null,
|
||||
"CreatedAt": "22 minutes ago",
|
||||
"Exited": false,
|
||||
"ExitedAt": 1730216567,
|
||||
"ExitCode": 0,
|
||||
"Id": "400172de2290a387bd10de7c2995a0876169a4b69679b862b474c645308dcea1",
|
||||
"Image": "ghcr.io/kernelkit/curios:edge",
|
||||
"ImageID": "cee712df3c4ea28bd3f03ca50d46e53788b1526812f4dac8d9133870eb5c49c0",
|
||||
"IsInfra": false,
|
||||
"Labels": {
|
||||
"org.opencontainers.image.title": "curiOS",
|
||||
"org.opencontainers.image.url": "https://github.com/kernelkit/curiOS"
|
||||
},
|
||||
"Mounts": [],
|
||||
"Names": [
|
||||
"system"
|
||||
],
|
||||
"Namespaces": {
|
||||
|
||||
},
|
||||
"Networks": [
|
||||
"e2",
|
||||
"veth0b"
|
||||
],
|
||||
"Pid": 3933,
|
||||
"Pod": "",
|
||||
"PodName": "",
|
||||
"Ports": null,
|
||||
"Size": null,
|
||||
"StartedAt": 1730216629,
|
||||
"State": "running",
|
||||
"Status": "Up 3 minutes",
|
||||
"Created": 1730215507
|
||||
}
|
||||
]
|
||||
@@ -12,14 +12,14 @@ port is handled correctly.
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_hardware/usb/topology.png[USB configuration topology]
|
||||
image::../../test/case/ietf_hardware/usb/topology.svg[USB configuration topology]
|
||||
endif::topdoc[]
|
||||
ifndef::topdoc[]
|
||||
ifdef::testgroup[]
|
||||
image::usb/topology.png[USB configuration topology]
|
||||
image::usb/topology.svg[USB configuration topology]
|
||||
endif::testgroup[]
|
||||
ifndef::testgroup[]
|
||||
image::topology.png[USB configuration topology]
|
||||
image::topology.svg[USB configuration topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
|
||||
<!-- Title: 1x1 Pages: 1 -->
|
||||
<svg width="424pt" height="45pt"
|
||||
viewBox="0.00 0.00 424.03 45.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 41)">
|
||||
<title>1x1</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-41 420.03,-41 420.03,4 -4,4"/>
|
||||
<!-- host -->
|
||||
<g id="node1" class="node">
|
||||
<title>host</title>
|
||||
<polygon fill="none" stroke="black" points="0,-0.5 0,-36.5 100,-36.5 100,-0.5 0,-0.5"/>
|
||||
<text text-anchor="middle" x="25" y="-14.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">host</text>
|
||||
<polyline fill="none" stroke="black" points="50,-0.5 50,-36.5 "/>
|
||||
<text text-anchor="middle" x="75" y="-14.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
</g>
|
||||
<!-- target -->
|
||||
<g id="node2" class="node">
|
||||
<title>target</title>
|
||||
<polygon fill="none" stroke="black" points="300.03,-0.5 300.03,-36.5 416.03,-36.5 416.03,-0.5 300.03,-0.5"/>
|
||||
<text text-anchor="middle" x="325.03" y="-14.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="350.03,-0.5 350.03,-36.5 "/>
|
||||
<text text-anchor="middle" x="383.03" y="-14.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">target</text>
|
||||
</g>
|
||||
<!-- host--target -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>host:mgmt--target:mgmt</title>
|
||||
<path fill="none" stroke="lightgray" stroke-width="2" d="M100,-18.5C100,-18.5 300.03,-18.5 300.03,-18.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -5,14 +5,14 @@ when having two USB ports.
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_hardware/usb_two_ports/topology.png[USB configuration with two USB ports topology]
|
||||
image::../../test/case/ietf_hardware/usb_two_ports/topology.svg[USB configuration with two USB ports topology]
|
||||
endif::topdoc[]
|
||||
ifndef::topdoc[]
|
||||
ifdef::testgroup[]
|
||||
image::usb_two_ports/topology.png[USB configuration with two USB ports topology]
|
||||
image::usb_two_ports/topology.svg[USB configuration with two USB ports topology]
|
||||
endif::testgroup[]
|
||||
ifndef::testgroup[]
|
||||
image::topology.png[USB configuration with two USB ports topology]
|
||||
image::topology.svg[USB configuration with two USB ports topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
|
||||
<!-- Title: 1x1 Pages: 1 -->
|
||||
<svg width="424pt" height="45pt"
|
||||
viewBox="0.00 0.00 424.03 45.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 41)">
|
||||
<title>1x1</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-41 420.03,-41 420.03,4 -4,4"/>
|
||||
<!-- host -->
|
||||
<g id="node1" class="node">
|
||||
<title>host</title>
|
||||
<polygon fill="none" stroke="black" points="0,-0.5 0,-36.5 100,-36.5 100,-0.5 0,-0.5"/>
|
||||
<text text-anchor="middle" x="25" y="-14.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">host</text>
|
||||
<polyline fill="none" stroke="black" points="50,-0.5 50,-36.5 "/>
|
||||
<text text-anchor="middle" x="75" y="-14.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
</g>
|
||||
<!-- target -->
|
||||
<g id="node2" class="node">
|
||||
<title>target</title>
|
||||
<polygon fill="none" stroke="black" points="300.03,-0.5 300.03,-36.5 416.03,-36.5 416.03,-0.5 300.03,-0.5"/>
|
||||
<text text-anchor="middle" x="325.03" y="-14.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="350.03,-0.5 350.03,-36.5 "/>
|
||||
<text text-anchor="middle" x="383.03" y="-14.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">target</text>
|
||||
</g>
|
||||
<!-- host--target -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>host:mgmt--target:mgmt</title>
|
||||
<path fill="none" stroke="lightgray" stroke-width="2" d="M100,-18.5C100,-18.5 300.03,-18.5 300.03,-18.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -11,6 +11,8 @@ include::ipv6_address/Readme.adoc[]
|
||||
|
||||
include::ipv4_autoconf/Readme.adoc[]
|
||||
|
||||
include::ifalias/Readme.adoc[]
|
||||
|
||||
include::iface_phys_address/Readme.adoc[]
|
||||
|
||||
include::routing_basic/Readme.adoc[]
|
||||
|
||||
@@ -12,14 +12,14 @@ Test basic connectivity to a bridge
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/bridge_basic/topology.png[Bridge basic topology]
|
||||
image::../../test/case/ietf_interfaces/bridge_basic/topology.svg[Bridge basic topology]
|
||||
endif::topdoc[]
|
||||
ifndef::topdoc[]
|
||||
ifdef::testgroup[]
|
||||
image::bridge_basic/topology.png[Bridge basic topology]
|
||||
image::bridge_basic/topology.svg[Bridge basic topology]
|
||||
endif::testgroup[]
|
||||
ifndef::testgroup[]
|
||||
image::topology.png[Bridge basic topology]
|
||||
image::topology.svg[Bridge basic topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
|
||||
@@ -3,8 +3,8 @@ graph "1x2" {
|
||||
overlap="false";
|
||||
esep="+80";
|
||||
|
||||
node [shape=record, fontname="monospace"];
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
node [shape=record, fontname="DejaVu Sans Mono, Book"];
|
||||
edge [color="cornflowerblue", penwidth="2", fontname="DejaVu Serif, Book"];
|
||||
|
||||
host [
|
||||
label="host | { <mgmt> mgmt | <data> data }",
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB |
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
|
||||
<!-- Title: 1x2 Pages: 1 -->
|
||||
<svg width="515pt" height="55pt"
|
||||
viewBox="0.00 0.00 515.04 55.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 51)">
|
||||
<title>1x2</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-51 511.04,-51 511.04,4 -4,4"/>
|
||||
<!-- host -->
|
||||
<g id="node1" class="node">
|
||||
<title>host</title>
|
||||
<polygon fill="none" stroke="black" points="0,-0.5 0,-46.5 100,-46.5 100,-0.5 0,-0.5"/>
|
||||
<text text-anchor="middle" x="25" y="-19.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">host</text>
|
||||
<polyline fill="none" stroke="black" points="50,-0.5 50,-46.5 "/>
|
||||
<text text-anchor="middle" x="75" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="50,-23.5 100,-23.5 "/>
|
||||
<text text-anchor="middle" x="75" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
|
||||
</g>
|
||||
<!-- target -->
|
||||
<g id="node2" class="node">
|
||||
<title>target</title>
|
||||
<polygon fill="none" stroke="black" points="300.04,-0.5 300.04,-46.5 507.04,-46.5 507.04,-0.5 300.04,-0.5"/>
|
||||
<text text-anchor="middle" x="325.04" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="300.04,-23.5 350.04,-23.5 "/>
|
||||
<text text-anchor="middle" x="325.04" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
|
||||
<polyline fill="none" stroke="black" points="350.04,-0.5 350.04,-46.5 "/>
|
||||
<text text-anchor="middle" x="428.54" y="-27.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">target</text>
|
||||
<text text-anchor="middle" x="428.54" y="-12.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">10.0.0.2/24 (br0)</text>
|
||||
</g>
|
||||
<!-- host--target -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>host:mgmt--target:mgmt</title>
|
||||
<path fill="none" stroke="lightgray" stroke-width="2" d="M100,-35.5C100,-35.5 299.54,-35.5 299.54,-35.5"/>
|
||||
</g>
|
||||
<!-- host--target -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>host:data--target:data</title>
|
||||
<path fill="none" stroke="black" stroke-width="2" d="M100,-11.5C100,-11.5 299.54,-11.5 299.54,-11.5"/>
|
||||
<text text-anchor="middle" x="141" y="-15.3" font-family="DejaVu Serif, Book" font-size="14.00">10.0.0.1/24</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
@@ -24,14 +24,14 @@ Ping through two bridges on two different DUTs.
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/bridge_fwd_dual_dut/topology.png[Bridge forwarding dual DUTs topology]
|
||||
image::../../test/case/ietf_interfaces/bridge_fwd_dual_dut/topology.svg[Bridge forwarding dual DUTs topology]
|
||||
endif::topdoc[]
|
||||
ifndef::topdoc[]
|
||||
ifdef::testgroup[]
|
||||
image::bridge_fwd_dual_dut/topology.png[Bridge forwarding dual DUTs topology]
|
||||
image::bridge_fwd_dual_dut/topology.svg[Bridge forwarding dual DUTs topology]
|
||||
endif::testgroup[]
|
||||
ifndef::testgroup[]
|
||||
image::topology.png[Bridge forwarding dual DUTs topology]
|
||||
image::topology.svg[Bridge forwarding dual DUTs topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
|
||||
@@ -3,8 +3,8 @@ graph "2x4" {
|
||||
overlap="false";
|
||||
esep="+26";
|
||||
|
||||
node [shape=record, fontname="monospace"];
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
node [shape=record, fontname="DejaVu Sans Mono, Book"];
|
||||
edge [color="cornflowerblue", penwidth="2", fontname="DejaVu Serif, Book"];
|
||||
|
||||
host [
|
||||
label="host | { <mgmt1> mgmt1 | <data11> data11 | <> \n\n\n| <mgmt2> mgmt2 | <data21> data21 | <data22> data22 }",
|
||||
|
||||
|
Before Width: | Height: | Size: 21 KiB |
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
|
||||
<!-- Title: 2x4 Pages: 1 -->
|
||||
<svg width="572pt" height="225pt"
|
||||
viewBox="0.00 0.00 572.04 225.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 221)">
|
||||
<title>2x4</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-221 568.04,-221 568.04,4 -4,4"/>
|
||||
<!-- host -->
|
||||
<g id="node1" class="node">
|
||||
<title>host</title>
|
||||
<polygon fill="none" stroke="black" points="0,-0.5 0,-216.5 116,-216.5 116,-0.5 0,-0.5"/>
|
||||
<text text-anchor="middle" x="25" y="-104.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">host</text>
|
||||
<polyline fill="none" stroke="black" points="50,-0.5 50,-216.5 "/>
|
||||
<text text-anchor="middle" x="83" y="-197.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt1</text>
|
||||
<polyline fill="none" stroke="black" points="50,-186.5 116,-186.5 "/>
|
||||
<text text-anchor="middle" x="83" y="-167.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data11</text>
|
||||
<polyline fill="none" stroke="black" points="50,-155.5 116,-155.5 "/>
|
||||
<polyline fill="none" stroke="black" points="50,-92.5 116,-92.5 "/>
|
||||
<text text-anchor="middle" x="83" y="-73.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt2</text>
|
||||
<polyline fill="none" stroke="black" points="50,-61.5 116,-61.5 "/>
|
||||
<text text-anchor="middle" x="83" y="-42.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">data21</text>
|
||||
<polyline fill="none" stroke="black" points="50,-31.5 116,-31.5 "/>
|
||||
<text text-anchor="middle" x="83" y="-12.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data22</text>
|
||||
</g>
|
||||
<!-- dut1 -->
|
||||
<g id="node2" class="node">
|
||||
<title>dut1</title>
|
||||
<polygon fill="none" stroke="black" points="448.04,-153.67 448.04,-215.67 564.04,-215.67 564.04,-153.67 448.04,-153.67"/>
|
||||
<text text-anchor="middle" x="477.04" y="-196.47" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="448.04,-184.67 506.04,-184.67 "/>
|
||||
<text text-anchor="middle" x="477.04" y="-165.47" font-family="DejaVu Sans Mono, Book" font-size="14.00">data1</text>
|
||||
<polyline fill="none" stroke="black" points="506.04,-153.67 506.04,-215.67 "/>
|
||||
<text text-anchor="middle" x="535.04" y="-200.47" font-family="DejaVu Sans Mono, Book" font-size="14.00">dut1 </text>
|
||||
<polyline fill="none" stroke="black" points="506.04,-176.67 564.04,-176.67 "/>
|
||||
<text text-anchor="middle" x="535.04" y="-161.47" font-family="DejaVu Sans Mono, Book" font-size="14.00">link</text>
|
||||
</g>
|
||||
<!-- host--dut1 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>host:mgmt1--dut1:mgmt</title>
|
||||
<path fill="none" stroke="lightgrey" stroke-width="2" d="M116,-201.5C116,-201.5 448.04,-200.67 448.04,-200.67"/>
|
||||
</g>
|
||||
<!-- host--dut1 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>host:data11--dut1:data1</title>
|
||||
<path fill="none" stroke="black" stroke-width="2" d="M116,-171.5C116,-171.5 448.04,-168.67 448.04,-168.67"/>
|
||||
<text text-anchor="middle" x="145.5" y="-175.3" font-family="DejaVu Serif, Book" font-size="14.00">10.0.0.2</text>
|
||||
</g>
|
||||
<!-- dut2 -->
|
||||
<g id="node3" class="node">
|
||||
<title>dut2</title>
|
||||
<polygon fill="none" stroke="black" points="448.04,-1.65 448.04,-87.65 564.04,-87.65 564.04,-1.65 448.04,-1.65"/>
|
||||
<text text-anchor="middle" x="477.04" y="-69.95" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="448.04,-59.65 506.04,-59.65 "/>
|
||||
<text text-anchor="middle" x="477.04" y="-41.45" font-family="DejaVu Sans Mono, Book" font-size="14.00">data1</text>
|
||||
<polyline fill="none" stroke="black" points="448.04,-30.65 506.04,-30.65 "/>
|
||||
<text text-anchor="middle" x="477.04" y="-12.45" font-family="DejaVu Sans Mono, Book" font-size="14.00">data2</text>
|
||||
<polyline fill="none" stroke="black" points="506.04,-1.65 506.04,-87.65 "/>
|
||||
<text text-anchor="middle" x="535.04" y="-66.45" font-family="DejaVu Sans Mono, Book" font-size="14.00">link</text>
|
||||
<polyline fill="none" stroke="black" points="506.04,-52.65 564.04,-52.65 "/>
|
||||
<text text-anchor="middle" x="535.04" y="-15.45" font-family="DejaVu Sans Mono, Book" font-size="14.00"> dut2</text>
|
||||
</g>
|
||||
<!-- host--dut2 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>host:mgmt2--dut2:mgmt</title>
|
||||
<path fill="none" stroke="lightgrey" stroke-width="2" d="M116,-76.5C116,-76.5 448.04,-73.65 448.04,-73.65"/>
|
||||
</g>
|
||||
<!-- host--dut2 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>host:data21--dut2:data1</title>
|
||||
<path fill="none" stroke="black" stroke-width="2" d="M116,-46.5C116,-46.5 448.04,-45.65 448.04,-45.65"/>
|
||||
<text text-anchor="middle" x="145.5" y="-50.3" font-family="DejaVu Serif, Book" font-size="14.00">10.0.0.3</text>
|
||||
</g>
|
||||
<!-- host--dut2 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>host:data22--dut2:data2</title>
|
||||
<path fill="none" stroke="black" stroke-width="2" d="M116,-15.5C116,-15.5 448.04,-15.65 448.04,-15.65"/>
|
||||
<text text-anchor="middle" x="145.5" y="-19.3" font-family="DejaVu Serif, Book" font-size="14.00">10.0.0.4</text>
|
||||
</g>
|
||||
<!-- dut1--dut2 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>dut1:link--dut2:link</title>
|
||||
<path fill="none" stroke="black" stroke-width="2" d="M535.04,-153.67C535.04,-153.67 535.04,-87.65 535.04,-87.65"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.3 KiB |
@@ -24,14 +24,14 @@ Tests forwarding through a DUT with two bridged interfaces on one DUT.
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/bridge_fwd_sgl_dut/topology.png[Bridge forwarding single DUTs topology]
|
||||
image::../../test/case/ietf_interfaces/bridge_fwd_sgl_dut/topology.svg[Bridge forwarding single DUTs topology]
|
||||
endif::topdoc[]
|
||||
ifndef::topdoc[]
|
||||
ifdef::testgroup[]
|
||||
image::bridge_fwd_sgl_dut/topology.png[Bridge forwarding single DUTs topology]
|
||||
image::bridge_fwd_sgl_dut/topology.svg[Bridge forwarding single DUTs topology]
|
||||
endif::testgroup[]
|
||||
ifndef::testgroup[]
|
||||
image::topology.png[Bridge forwarding single DUTs topology]
|
||||
image::topology.svg[Bridge forwarding single DUTs topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
|
||||
@@ -3,8 +3,8 @@ graph "1x3" {
|
||||
overlap="false";
|
||||
esep="+80";
|
||||
|
||||
node [shape=record, fontname="monospace"];
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
node [shape=record, fontname="DejaVu Sans Mono, Book"];
|
||||
edge [color="cornflowerblue", penwidth="2", fontname="DejaVu Serif, Book"];
|
||||
|
||||
host [
|
||||
label="host | { <mgmt> mgmt | <data1> data1 | <data2> data2 }",
|
||||
|
||||
|
Before Width: | Height: | Size: 7.5 KiB |
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
|
||||
<!-- Title: 1x3 Pages: 1 -->
|
||||
<svg width="440pt" height="78pt"
|
||||
viewBox="0.00 0.00 440.03 78.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 74)">
|
||||
<title>1x3</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-74 436.03,-74 436.03,4 -4,4"/>
|
||||
<!-- host -->
|
||||
<g id="node1" class="node">
|
||||
<title>host</title>
|
||||
<polygon fill="none" stroke="black" points="0,-0.5 0,-69.5 108,-69.5 108,-0.5 0,-0.5"/>
|
||||
<text text-anchor="middle" x="25" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">host</text>
|
||||
<polyline fill="none" stroke="black" points="50,-0.5 50,-69.5 "/>
|
||||
<text text-anchor="middle" x="79" y="-54.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="50,-46.5 108,-46.5 "/>
|
||||
<text text-anchor="middle" x="79" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data1</text>
|
||||
<polyline fill="none" stroke="black" points="50,-23.5 108,-23.5 "/>
|
||||
<text text-anchor="middle" x="79" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data2</text>
|
||||
</g>
|
||||
<!-- target -->
|
||||
<g id="node2" class="node">
|
||||
<title>target</title>
|
||||
<polygon fill="none" stroke="black" points="308.03,-0.5 308.03,-69.5 432.03,-69.5 432.03,-0.5 308.03,-0.5"/>
|
||||
<text text-anchor="middle" x="337.03" y="-54.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="308.03,-46.5 366.03,-46.5 "/>
|
||||
<text text-anchor="middle" x="337.03" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data1</text>
|
||||
<polyline fill="none" stroke="black" points="308.03,-23.5 366.03,-23.5 "/>
|
||||
<text text-anchor="middle" x="337.03" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data2</text>
|
||||
<polyline fill="none" stroke="black" points="366.03,-0.5 366.03,-69.5 "/>
|
||||
<text text-anchor="middle" x="399.03" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">target</text>
|
||||
</g>
|
||||
<!-- host--target -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>host:mgmt--target:mgmt</title>
|
||||
<path fill="none" stroke="lightgrey" stroke-width="2" d="M108,-58C108,-58 308.03,-58 308.03,-58"/>
|
||||
</g>
|
||||
<!-- host--target -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>host:data1--target:data1</title>
|
||||
<path fill="none" stroke="black" stroke-width="2" d="M108,-35C108,-35 308.03,-35 308.03,-35"/>
|
||||
<text text-anchor="middle" x="137.5" y="-38.8" font-family="DejaVu Serif, Book" font-size="14.00">10.0.0.1</text>
|
||||
</g>
|
||||
<!-- host--target -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>host:data2--target:data2</title>
|
||||
<path fill="none" stroke="black" stroke-width="2" d="M108,-12C108,-12 308.03,-12 308.03,-12"/>
|
||||
<text text-anchor="middle" x="137.5" y="-15.8" font-family="DejaVu Serif, Book" font-size="14.00">10.0.0.2</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
@@ -14,14 +14,14 @@ PING --> br0
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/bridge_veth/topology.png[Bridge with a physical port and a veth topology]
|
||||
image::../../test/case/ietf_interfaces/bridge_veth/topology.svg[Bridge with a physical port and a veth topology]
|
||||
endif::topdoc[]
|
||||
ifndef::topdoc[]
|
||||
ifdef::testgroup[]
|
||||
image::bridge_veth/topology.png[Bridge with a physical port and a veth topology]
|
||||
image::bridge_veth/topology.svg[Bridge with a physical port and a veth topology]
|
||||
endif::testgroup[]
|
||||
ifndef::testgroup[]
|
||||
image::topology.png[Bridge with a physical port and a veth topology]
|
||||
image::topology.svg[Bridge with a physical port and a veth topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
|
||||
@@ -3,8 +3,8 @@ graph "1x2" {
|
||||
overlap="false";
|
||||
esep="+80";
|
||||
|
||||
node [shape=record, fontname="monospace"];
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
node [shape=record, fontname="DejaVu Sans Mono, Book"];
|
||||
edge [color="cornflowerblue", penwidth="2", fontname="DejaVu Serif, Book"];
|
||||
|
||||
host [
|
||||
label="host | { <mgmt> mgmt | <data> data }",
|
||||
|
||||
|
Before Width: | Height: | Size: 9.5 KiB |
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
|
||||
<!-- Title: 1x2 Pages: 1 -->
|
||||
<svg width="507pt" height="55pt"
|
||||
viewBox="0.00 0.00 507.03 55.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 51)">
|
||||
<title>1x2</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-51 503.03,-51 503.03,4 -4,4"/>
|
||||
<!-- host -->
|
||||
<g id="node1" class="node">
|
||||
<title>host</title>
|
||||
<polygon fill="none" stroke="black" points="0,-0.5 0,-46.5 100,-46.5 100,-0.5 0,-0.5"/>
|
||||
<text text-anchor="middle" x="25" y="-19.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">host</text>
|
||||
<polyline fill="none" stroke="black" points="50,-0.5 50,-46.5 "/>
|
||||
<text text-anchor="middle" x="75" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="50,-23.5 100,-23.5 "/>
|
||||
<text text-anchor="middle" x="75" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
|
||||
</g>
|
||||
<!-- target -->
|
||||
<g id="node2" class="node">
|
||||
<title>target</title>
|
||||
<polygon fill="none" stroke="black" points="300.03,-0.5 300.03,-46.5 499.03,-46.5 499.03,-0.5 300.03,-0.5"/>
|
||||
<text text-anchor="middle" x="325.03" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="300.03,-23.5 350.03,-23.5 "/>
|
||||
<text text-anchor="middle" x="325.03" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
|
||||
<polyline fill="none" stroke="black" points="350.03,-0.5 350.03,-46.5 "/>
|
||||
<text text-anchor="middle" x="424.53" y="-27.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">target(br0:veth)</text>
|
||||
<text text-anchor="middle" x="424.53" y="-12.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">10.0.0.2/24</text>
|
||||
</g>
|
||||
<!-- host--target -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>host:mgmt--target:mgmt</title>
|
||||
<path fill="none" stroke="lightgray" stroke-width="2" d="M100,-35.5C100,-35.5 299.53,-35.5 299.53,-35.5"/>
|
||||
</g>
|
||||
<!-- host--target -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>host:data--target:data</title>
|
||||
<path fill="none" stroke="black" stroke-width="2" d="M100,-11.5C100,-11.5 299.53,-11.5 299.53,-11.5"/>
|
||||
<text text-anchor="middle" x="141" y="-15.3" font-family="DejaVu Serif, Book" font-size="14.00">10.0.0.1/24</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
@@ -13,14 +13,14 @@ Basic test of VLAN functionality in a bridge, tagged/untagged traffic and a VLAN
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/bridge_vlan/topology.png[Bridge VLAN topology]
|
||||
image::../../test/case/ietf_interfaces/bridge_vlan/topology.svg[Bridge VLAN topology]
|
||||
endif::topdoc[]
|
||||
ifndef::topdoc[]
|
||||
ifdef::testgroup[]
|
||||
image::bridge_vlan/topology.png[Bridge VLAN topology]
|
||||
image::bridge_vlan/topology.svg[Bridge VLAN topology]
|
||||
endif::testgroup[]
|
||||
ifndef::testgroup[]
|
||||
image::topology.png[Bridge VLAN topology]
|
||||
image::topology.svg[Bridge VLAN topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
|
||||
@@ -3,8 +3,8 @@ graph "2x2" {
|
||||
overlap="false";
|
||||
esep="+40";
|
||||
|
||||
node [shape=record, fontname="monospace"];
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
node [shape=record, fontname="DejaVu Sans Mono, Book"];
|
||||
edge [color="cornflowerblue", penwidth="2", fontname="DejaVu Serif, Book"];
|
||||
|
||||
host [
|
||||
label="host | { <mgmt1> mgmt1 | <data> data | <mgmt2> mgmt2 }",
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
|
||||
<!-- Title: 2x2 Pages: 1 -->
|
||||
<svg width="533pt" height="225pt"
|
||||
viewBox="0.00 0.00 532.79 225.02" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 221.02)">
|
||||
<title>2x2</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-221.02 528.79,-221.02 528.79,4 -4,4"/>
|
||||
<!-- host -->
|
||||
<g id="node1" class="node">
|
||||
<title>host</title>
|
||||
<polygon fill="none" stroke="black" points="0,-147.52 0,-216.52 108,-216.52 108,-147.52 0,-147.52"/>
|
||||
<text text-anchor="middle" x="25" y="-178.32" font-family="DejaVu Sans Mono, Book" font-size="14.00">host</text>
|
||||
<polyline fill="none" stroke="black" points="50,-147.52 50,-216.52 "/>
|
||||
<text text-anchor="middle" x="79" y="-201.32" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt1</text>
|
||||
<polyline fill="none" stroke="black" points="50,-193.52 108,-193.52 "/>
|
||||
<text text-anchor="middle" x="79" y="-178.32" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
|
||||
<polyline fill="none" stroke="black" points="50,-170.52 108,-170.52 "/>
|
||||
<text text-anchor="middle" x="79" y="-155.32" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt2</text>
|
||||
</g>
|
||||
<!-- dut1 -->
|
||||
<g id="node2" class="node">
|
||||
<title>dut1</title>
|
||||
<polygon fill="none" stroke="black" points="375.79,-147.52 375.79,-216.52 524.79,-216.52 524.79,-147.52 375.79,-147.52"/>
|
||||
<text text-anchor="middle" x="400.79" y="-201.32" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="375.79,-193.52 425.79,-193.52 "/>
|
||||
<text text-anchor="middle" x="400.79" y="-178.32" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
|
||||
<polyline fill="none" stroke="black" points="375.79,-170.52 425.79,-170.52 "/>
|
||||
<text text-anchor="middle" x="400.79" y="-155.32" font-family="DejaVu Sans Mono, Book" font-size="14.00">link</text>
|
||||
<polyline fill="none" stroke="black" points="425.79,-147.52 425.79,-216.52 "/>
|
||||
<text text-anchor="middle" x="475.29" y="-185.82" font-family="DejaVu Sans Mono, Book" font-size="14.00">dut1</text>
|
||||
<text text-anchor="middle" x="475.29" y="-170.82" font-family="DejaVu Sans Mono, Book" font-size="14.00">(10.0.0.2)</text>
|
||||
</g>
|
||||
<!-- host--dut1 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>host:mgmt1--dut1:mgmt</title>
|
||||
<path fill="none" stroke="lightgray" stroke-width="2" d="M108,-205.02C108,-205.02 375.29,-205.02 375.29,-205.02"/>
|
||||
</g>
|
||||
<!-- host--dut1 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>host:data--dut1:data</title>
|
||||
<path fill="none" stroke="black" stroke-width="2" d="M108,-182.02C108,-182.02 375.29,-182.02 375.29,-182.02"/>
|
||||
</g>
|
||||
<!-- dut2 -->
|
||||
<g id="node3" class="node">
|
||||
<title>dut2</title>
|
||||
<polygon fill="none" stroke="black" points="375.79,-0.5 375.79,-46.5 524.79,-46.5 524.79,-0.5 375.79,-0.5"/>
|
||||
<text text-anchor="middle" x="400.79" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">link</text>
|
||||
<polyline fill="none" stroke="black" points="375.79,-23.5 425.79,-23.5 "/>
|
||||
<text text-anchor="middle" x="400.79" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="425.79,-0.5 425.79,-46.5 "/>
|
||||
<text text-anchor="middle" x="475.29" y="-27.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">dut2</text>
|
||||
<text text-anchor="middle" x="475.29" y="-12.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">(10.0.0.3)</text>
|
||||
</g>
|
||||
<!-- host--dut2 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>host:mgmt2--dut2:mgmt</title>
|
||||
<path fill="none" stroke="lightgray" stroke-width="2" d="M108,-159.02C108,-159.02 375.29,-11.5 375.29,-11.5"/>
|
||||
</g>
|
||||
<!-- dut1--dut2 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>dut1:link--dut2:link</title>
|
||||
<path fill="none" stroke="black" stroke-width="2" d="M400.29,-147.02C400.29,-147.02 400.29,-46.5 400.29,-46.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
@@ -23,14 +23,14 @@ Test that two VLANs are correctly separated in the bridge
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/bridge_vlan_separation/topology.png[Bridge VLAN separation topology]
|
||||
image::../../test/case/ietf_interfaces/bridge_vlan_separation/topology.svg[Bridge VLAN separation topology]
|
||||
endif::topdoc[]
|
||||
ifndef::topdoc[]
|
||||
ifdef::testgroup[]
|
||||
image::bridge_vlan_separation/topology.png[Bridge VLAN separation topology]
|
||||
image::bridge_vlan_separation/topology.svg[Bridge VLAN separation topology]
|
||||
endif::testgroup[]
|
||||
ifndef::testgroup[]
|
||||
image::topology.png[Bridge VLAN separation topology]
|
||||
image::topology.svg[Bridge VLAN separation topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
|
||||
@@ -3,8 +3,8 @@ graph "2x4" {
|
||||
overlap="false";
|
||||
esep="+22";
|
||||
|
||||
node [shape=record, fontname="monospace"];
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
node [shape=record, fontname="DejaVu Sans Mono, Book"];
|
||||
edge [color="cornflowerblue", penwidth="2", fontname="DejaVu Serif, Book"];
|
||||
|
||||
host [
|
||||
label="host | { <mgmt1> mgmt1 | <data10> data10 | <data11> data11 | <> \n\n\n | <mgmt2> mgmt2 | <data20> data20 | <data21> data21 }",
|
||||
|
||||
|
Before Width: | Height: | Size: 29 KiB |
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
|
||||
<!-- Title: 2x4 Pages: 1 -->
|
||||
<svg width="628pt" height="205pt"
|
||||
viewBox="0.00 0.00 628.05 205.01" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 201.01)">
|
||||
<title>2x4</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-201.01 624.05,-201.01 624.05,4 -4,4"/>
|
||||
<!-- host -->
|
||||
<g id="node1" class="node">
|
||||
<title>host</title>
|
||||
<polygon fill="none" stroke="black" points="0,-1.51 0,-195.51 116,-195.51 116,-1.51 0,-1.51"/>
|
||||
<text text-anchor="middle" x="25" y="-94.81" font-family="DejaVu Sans Mono, Book" font-size="14.00">host</text>
|
||||
<polyline fill="none" stroke="black" points="50,-1.51 50,-195.51 "/>
|
||||
<text text-anchor="middle" x="83" y="-180.31" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt1</text>
|
||||
<polyline fill="none" stroke="black" points="50,-172.51 116,-172.51 "/>
|
||||
<text text-anchor="middle" x="83" y="-157.31" font-family="DejaVu Sans Mono, Book" font-size="14.00">data10</text>
|
||||
<polyline fill="none" stroke="black" points="50,-149.51 116,-149.51 "/>
|
||||
<text text-anchor="middle" x="83" y="-134.31" font-family="DejaVu Sans Mono, Book" font-size="14.00">data11</text>
|
||||
<polyline fill="none" stroke="black" points="50,-126.51 116,-126.51 "/>
|
||||
<polyline fill="none" stroke="black" points="50,-70.51 116,-70.51 "/>
|
||||
<text text-anchor="middle" x="83" y="-55.31" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt2</text>
|
||||
<polyline fill="none" stroke="black" points="50,-47.51 116,-47.51 "/>
|
||||
<text text-anchor="middle" x="83" y="-32.31" font-family="DejaVu Sans Mono, Book" font-size="14.00">data20</text>
|
||||
<polyline fill="none" stroke="black" points="50,-24.51 116,-24.51 "/>
|
||||
<text text-anchor="middle" x="83" y="-9.31" font-family="DejaVu Sans Mono, Book" font-size="14.00">data21</text>
|
||||
</g>
|
||||
<!-- dut1 -->
|
||||
<g id="node2" class="node">
|
||||
<title>dut1</title>
|
||||
<polygon fill="none" stroke="black" points="504.05,-126.51 504.05,-196.51 620.05,-196.51 620.05,-126.51 504.05,-126.51"/>
|
||||
<text text-anchor="middle" x="531.05" y="-181.91" font-family="DejaVu Sans Mono, Book" font-size="12.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="504.05,-173.51 558.05,-173.51 "/>
|
||||
<text text-anchor="middle" x="531.05" y="-158.91" font-family="DejaVu Sans Mono, Book" font-size="12.00">data1</text>
|
||||
<polyline fill="none" stroke="black" points="504.05,-150.51 558.05,-150.51 "/>
|
||||
<text text-anchor="middle" x="531.05" y="-135.41" font-family="DejaVu Sans Mono, Book" font-size="12.00">data2</text>
|
||||
<polyline fill="none" stroke="black" points="558.05,-126.51 558.05,-196.51 "/>
|
||||
<text text-anchor="middle" x="589.05" y="-168.91" font-family="DejaVu Sans Mono, Book" font-size="12.00"> dut1 </text>
|
||||
<polyline fill="none" stroke="black" points="558.05,-147.51 620.05,-147.51 "/>
|
||||
<text text-anchor="middle" x="589.05" y="-133.91" font-family="DejaVu Sans Mono, Book" font-size="12.00">link</text>
|
||||
</g>
|
||||
<!-- host--dut1 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>host:mgmt1--dut1:mgmt</title>
|
||||
<path fill="none" stroke="lightgray" stroke-width="2" d="M116,-184.51C116,-184.51 504.05,-185.51 504.05,-185.51"/>
|
||||
</g>
|
||||
<!-- host--dut1 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>host:data10--dut1:data1</title>
|
||||
<path fill="none" stroke="purple" stroke-width="2" d="M116,-161.51C116,-161.51 504.05,-162.51 504.05,-162.51"/>
|
||||
<text text-anchor="middle" x="466.05" y="-166.31" font-family="DejaVu Serif, Book" font-size="14.00" fill="purple">VLAN10 U</text>
|
||||
<text text-anchor="middle" x="145.5" y="-165.31" font-family="DejaVu Serif, Book" font-size="14.00" fill="purple">10.0.0.1</text>
|
||||
</g>
|
||||
<!-- host--dut1 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>host:data11--dut1:data2</title>
|
||||
<path fill="none" stroke="darkgreen" stroke-width="2" d="M116,-138.51C116,-138.51 504.05,-138.51 504.05,-138.51"/>
|
||||
<text text-anchor="middle" x="466.05" y="-142.31" font-family="DejaVu Serif, Book" font-size="14.00" fill="darkgreen">VLAN20 U</text>
|
||||
<text text-anchor="middle" x="145.5" y="-142.31" font-family="DejaVu Serif, Book" font-size="14.00" fill="darkgreen">10.0.0.2</text>
|
||||
</g>
|
||||
<!-- dut2 -->
|
||||
<g id="node3" class="node">
|
||||
<title>dut2</title>
|
||||
<polygon fill="none" stroke="black" points="504.05,-0.5 504.05,-70.5 620.05,-70.5 620.05,-0.5 504.05,-0.5"/>
|
||||
<text text-anchor="middle" x="531.05" y="-55.9" font-family="DejaVu Sans Mono, Book" font-size="12.00">mgmt</text>
|
||||
<polyline fill="none" stroke="black" points="504.05,-47.5 558.05,-47.5 "/>
|
||||
<text text-anchor="middle" x="531.05" y="-32.9" font-family="DejaVu Sans Mono, Book" font-size="12.00">data1</text>
|
||||
<polyline fill="none" stroke="black" points="504.05,-24.5 558.05,-24.5 "/>
|
||||
<text text-anchor="middle" x="531.05" y="-9.4" font-family="DejaVu Sans Mono, Book" font-size="12.00">data2</text>
|
||||
<polyline fill="none" stroke="black" points="558.05,-0.5 558.05,-70.5 "/>
|
||||
<text text-anchor="middle" x="589.05" y="-56.9" font-family="DejaVu Sans Mono, Book" font-size="12.00">link</text>
|
||||
<polyline fill="none" stroke="black" points="558.05,-49.5 620.05,-49.5 "/>
|
||||
<text text-anchor="middle" x="589.05" y="-21.9" font-family="DejaVu Sans Mono, Book" font-size="12.00"> dut2 </text>
|
||||
</g>
|
||||
<!-- host--dut2 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>host:mgmt2--dut2:mgmt</title>
|
||||
<path fill="none" stroke="lightgrey" stroke-width="2" d="M116,-58.51C116,-58.51 504.05,-59.5 504.05,-59.5"/>
|
||||
</g>
|
||||
<!-- host--dut2 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>host:data20--dut2:data1</title>
|
||||
<path fill="none" stroke="purple" stroke-width="2" d="M116,-35.51C116,-35.51 504.05,-36.5 504.05,-36.5"/>
|
||||
<text text-anchor="middle" x="466.05" y="-40.3" font-family="DejaVu Serif, Book" font-size="14.00" fill="purple">VLAN10 U</text>
|
||||
<text text-anchor="middle" x="145.5" y="-39.31" font-family="DejaVu Serif, Book" font-size="14.00" fill="purple">10.0.0.3</text>
|
||||
</g>
|
||||
<!-- host--dut2 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>host:data21--dut2:data2</title>
|
||||
<path fill="none" stroke="darkgreen" stroke-width="2" d="M116,-12.51C116,-12.51 504.05,-12.5 504.05,-12.5"/>
|
||||
<text text-anchor="middle" x="466.05" y="-16.3" font-family="DejaVu Serif, Book" font-size="14.00" fill="darkgreen">VLAN20 U</text>
|
||||
<text text-anchor="middle" x="145.5" y="-16.31" font-family="DejaVu Serif, Book" font-size="14.00" fill="darkgreen">10.0.0.4</text>
|
||||
</g>
|
||||
<!-- dut1--dut2 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>dut1:link--dut2:link</title>
|
||||
<path fill="none" stroke="black" stroke-width="2" d="M589.05,-126.51C589.05,-126.51 589.05,-70.5 589.05,-70.5"/>
|
||||
<text text-anchor="middle" x="545.55" y="-101.91" font-family="DejaVu Serif, Book" font-size="12.00">VLAN 10,20 T</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.7 KiB |
@@ -10,14 +10,14 @@ PC - target:data veth0a - veth0b
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/dual_bridge/topology.png[Dual bridges on one device topology]
|
||||
image::../../test/case/ietf_interfaces/dual_bridge/topology.svg[Dual bridges on one device topology]
|
||||
endif::topdoc[]
|
||||
ifndef::topdoc[]
|
||||
ifdef::testgroup[]
|
||||
image::dual_bridge/topology.png[Dual bridges on one device topology]
|
||||
image::dual_bridge/topology.svg[Dual bridges on one device topology]
|
||||
endif::testgroup[]
|
||||
ifndef::testgroup[]
|
||||
image::topology.png[Dual bridges on one device topology]
|
||||
image::topology.svg[Dual bridges on one device topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
|
||||
|
Before Width: | Height: | Size: 5.5 KiB |