Skip to content

feat(network): Use ip= parameter for configuring networking - #2638

Open
Gelbpunkt wants to merge 3 commits into
hermit-os:mainfrom
Gelbpunkt:parse-ip-param
Open

feat(network): Use ip= parameter for configuring networking#2638
Gelbpunkt wants to merge 3 commits into
hermit-os:mainfrom
Gelbpunkt:parse-ip-param

Conversation

@Gelbpunkt

Copy link
Copy Markdown
Member

This is a breaking change and replaces HERMIT_IP, HERMIT_MASK, HERMIT_GATEWAY, HERMIT_DNS1 and HERMIT_DNS2 with a single command-line parameter, ip=, which is heavily inspired by Linux.

The kernel will fall back to DHCP if it is enabled, otherwise it will now also no longer fall back to "magic" IPs, instead it will leave the interface unconfigured. Instead, only xtask contains the default static IP configuration that used to reside there and in the kernel.

This is in preparation for adding IPv6 support, which we decided against introducing new variables for. The same mechanism introduced here can be used to support IPv6 with minimal changes.

…MASK

Setting just HERMIT_IP=10.0.5.3/24 is much more convenient than
HERMIT_IP=10.0.5.3 and HERMIT_MASK=255.255.255.0 and lets us avoid
variable hell once we end up adding proper IPv6 support.
@mkroening

Copy link
Copy Markdown
Member

@jounathaen and @sarahspberrypi are okay with the concept. Is this also ok for you, @stlankes?

@Gelbpunkt
Gelbpunkt force-pushed the parse-ip-param branch 2 times, most recently from a939253 to 246ad6c Compare August 13, 2026 16:09
This is heavily inspired by Linux' ip= parameter, see
https://docs.kernel.org/admin-guide/nfs/nfsroot.html#kernel-command-line

The facilities are currently unused and will be replacing HERMIT_IP and
HERMIT_GATEWAY in a followup commit.
@Gelbpunkt
Gelbpunkt force-pushed the parse-ip-param branch 2 times, most recently from 57eb68d to af2377c Compare August 13, 2026 17:19

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Results

Details
Benchmark Current: 76d38c0 Previous: 2e23902 Performance Ratio
startup_benchmark Build Time 220.09 s 80.34 s 2.74
startup_benchmark File Size 0.78 MB 0.80 MB 0.99
Startup Time - 1 core 2.37 s (±0.22 s) 0.75 s (±0.02 s) 3.17
Startup Time - 2 cores 2.30 s (±0.25 s) 0.74 s (±0.02 s) 3.13
Startup Time - 4 cores 2.32 s (±0.16 s) 0.74 s (±0.02 s) 3.12
multithreaded_benchmark Build Time 216.01 s 82.11 s 2.63
multithreaded_benchmark File Size 0.87 MB 0.86 MB 1.02
Multithreaded Pi Efficiency - 2 Threads 76.84 % (±12.76 %) 85.89 % (±6.61 %) 0.89
Multithreaded Pi Efficiency - 4 Threads 50.24 % (±9.04 %) 43.43 % (±2.56 %) 1.16
Multithreaded Pi Efficiency - 8 Threads 31.20 % (±6.37 %) 25.76 % (±1.53 %) 1.21
micro_benchmarks Build Time 202.44 s 80.40 s 2.52
micro_benchmarks File Size 0.88 MB 0.86 MB 1.02
Scheduling time - 1 thread 169.93 ticks (±34.62 ticks) 62.65 ticks (±4.06 ticks) 2.71
Scheduling time - 2 threads 95.88 ticks (±24.39 ticks) 34.08 ticks (±4.10 ticks) 2.81
Micro - Time for syscall (getpid) 10.02 ticks (±5.66 ticks) 3.45 ticks (±0.58 ticks) 2.91
Memcpy speed - (built_in) block size 4096 58690.97 MByte/s (±40996.27 MByte/s) 82448.38 MByte/s (±56997.13 MByte/s) 0.71
Memcpy speed - (built_in) block size 1048576 15180.40 MByte/s (±12951.25 MByte/s) 30585.98 MByte/s (±24707.84 MByte/s) 0.50
Memcpy speed - (built_in) block size 16777216 13853.83 MByte/s (±11602.93 MByte/s) 26340.06 MByte/s (±21720.96 MByte/s) 0.53
Memset speed - (built_in) block size 4096 58908.23 MByte/s (±41145.80 MByte/s) 82292.76 MByte/s (±56891.50 MByte/s) 0.72
Memset speed - (built_in) block size 1048576 15341.33 MByte/s (±13042.32 MByte/s) 31323.85 MByte/s (±25145.86 MByte/s) 0.49
Memset speed - (built_in) block size 16777216 14141.38 MByte/s (±11739.53 MByte/s) 27104.68 MByte/s (±22209.94 MByte/s) 0.52
Memcpy speed - (rust) block size 4096 50860.22 MByte/s (±37216.25 MByte/s) 74097.96 MByte/s (±51811.44 MByte/s) 0.69
Memcpy speed - (rust) block size 1048576 15039.09 MByte/s (±12699.70 MByte/s) 30361.60 MByte/s (±24602.37 MByte/s) 0.50
Memcpy speed - (rust) block size 16777216 13974.53 MByte/s (±11727.81 MByte/s) 27625.34 MByte/s (±22806.88 MByte/s) 0.51
Memset speed - (rust) block size 4096 51328.34 MByte/s (±37544.30 MByte/s) 74373.47 MByte/s (±51976.48 MByte/s) 0.69
Memset speed - (rust) block size 1048576 15398.31 MByte/s (±12888.55 MByte/s) 31110.89 MByte/s (±25033.24 MByte/s) 0.49
Memset speed - (rust) block size 16777216 14366.89 MByte/s (±11955.89 MByte/s) 28386.93 MByte/s (±23265.03 MByte/s) 0.51
alloc_benchmarks Build Time 194.09 s 74.76 s 2.60
alloc_benchmarks File Size 0.86 MB 0.87 MB 0.99
Allocations - Allocation success 91.35 % 91.31 % 1.00
Allocations - Deallocation success 100.00 % 100.00 % 1
Allocations - Pre-fail Allocations 61.55 % 61.44 % 1.00
Allocations - Average Allocation time 16581.12 Ticks (±660.59 Ticks) 5860.58 Ticks (±98.43 Ticks) 2.83
Allocations - Average Allocation time (no fail) 17667.84 Ticks (±956.52 Ticks) 6554.81 Ticks (±92.86 Ticks) 2.70
Allocations - Average Deallocation time 5155.48 Ticks (±1233.90 Ticks) 1805.01 Ticks (±250.35 Ticks) 2.86
mutex_benchmark Build Time 199.08 s 79.82 s 2.49
mutex_benchmark File Size 0.88 MB 0.86 MB 1.02
Mutex Stress Test Average Time per Iteration - 1 Threads 31.60 ns (±6.68 ns) 12.10 ns (±0.41 ns) 2.61
Mutex Stress Test Average Time per Iteration - 2 Threads 30.46 ns (±7.78 ns) 40.26 ns (±1.68 ns) 0.76

This comment was automatically generated by workflow using github-action-benchmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants