Commit 2cf1578
committed
Autoconfigure network without DHCP
Passt includes a DHCP server to allow guests to easily configure the
network without being aware passt is on the other side. But we _are_
aware of that, so we can take advantage of it.
Instead of using DHCP, read the configuration output from passt,
marshall it into some environment variables, pass it to the guest, and
have krun-guest read it and apply it using rtnetlink.
By doing that, we reduce the startup time in half, from...
$ time krun /bin/false
(...)
real 0m4,301s
... to ...
$ time krun /bin/false
(...)
real 0m1,966s
Signed-off-by: Sergio Lopez <[email protected]>1 parent f8cebac commit 2cf1578
6 files changed
Lines changed: 304 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
190 | 196 | | |
191 | 197 | | |
192 | 198 | | |
193 | 199 | | |
194 | 200 | | |
195 | 201 | | |
196 | | - | |
| 202 | + | |
197 | 203 | | |
198 | 204 | | |
199 | 205 | | |
| |||
330 | 336 | | |
331 | 337 | | |
332 | 338 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | 339 | | |
339 | 340 | | |
340 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| |||
0 commit comments