Commit 02a9e08
committed
Factor alloc_utils out.
Currently, we statically allocate resources--namely, tap interfaces--for
a given number of instances. This means that we are creating many
interfaces that we may not actually use.
The previous mechanism partially implemented to solve this problem was
to delegate allocation to a sidecar daemon, allocd, that would receive
RPCs to signal that resources should be allocated and tore down.
However, we can use a simpler design that creates interfaces before the
vmm starts and tears them down after the vmm exits.
The existing implementation shells out to use the platform ip(8),
ebtables(8), and dnsmasq(8) commands to make the necessary network
changes. While we could reimplemnt these using netlink, for now, it makes
sense to just expose the existing implementation from allocd so we can
borrow it later.1 parent 7354bfd commit 02a9e08
2 files changed
+16
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
| |||
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
| 29 | + | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
0 commit comments