File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 12
12
kernel initrdPath
13
13
storeOnDisk storeDisk ;
14
14
15
+ tapMultiQueue = vcpu > 1 ;
16
+
15
17
inherit ( import ../. { nixpkgs-lib = pkgs . lib ; } ) withDriveLetters ;
16
18
volumes = withDriveLetters microvmConfig ;
17
19
26
28
aarch64-linux = "virt" ;
27
29
} . ${ system } ;
28
30
29
- tapMultiQueue = vcpu > 1 ;
30
-
31
31
console = {
32
32
x86_64-linux = "ttyS0" ;
33
33
aarch64-linux = "ttyAMA0" ;
111
111
[
112
112
( if type == "macvtap" then "tap" else "${ type } " )
113
113
"id=${ id } "
114
+ "queues=${ toString ( lib . min 16 vcpu ) } "
114
115
]
115
116
++ lib . optionals ( type == "user" && forwardPortsOptions != [ ] ) forwardPortsOptions
116
117
++ lib . optionals ( type == "bridge" ) [
@@ -128,7 +129,15 @@ in {
128
129
)
129
130
)
130
131
# TODO: devType (0x10 + i)
131
- "-device" "virtio-net-${ devType 30 } ,id=net_${ id } ,netdev=${ id } ,mac=${ mac } "
132
+ "-device" (
133
+ lib . concatStringsSep "," [
134
+ "virtio-net-${ devType 30 } "
135
+ "id=net_${ id } "
136
+ "netdev=${ id } "
137
+ "mac=${ mac } "
138
+ "mq=${ if tapMultiQueue then "on" else "off" } "
139
+ ]
140
+ )
132
141
] ) interfaces
133
142
)
134
143
++
You can’t perform that action at this time.
0 commit comments