Skip to content

Commit fbb0765

Browse files
authored
Merge pull request #811 from hermit-os/netbench
feat(netbench): automate TAP device setup
2 parents 7fcd319 + 7c5b360 commit fbb0765

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

benches/netbench/run.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@ hermit() {
1818
cargo build --manifest-path "$netbench_dir"/Cargo.toml --bin $bin \
1919
-Zbuild-std=core,alloc,std,panic_abort -Zbuild-std-features=compiler-builtins-mem \
2020
--target x86_64-unknown-hermit \
21+
--features hermit/virtio-net \
2122
--release
2223

2324
echo "Launching $bin image on QEMU"
2425

25-
qemu-system-x86_64 -cpu host \
26+
sudo qemu-system-x86_64 -cpu host \
2627
-enable-kvm -display none -smp 1 -m 1G -serial stdio \
2728
-kernel "$root_dir"/kernel/hermit-loader-x86_64 \
2829
-initrd "$root_dir"/target/x86_64-unknown-hermit/release/$bin \
29-
-netdev tap,id=net0,ifname=tap10,script=no,downscript=no,vhost=on \
30+
-netdev tap,id=net0,script="$root_dir"/kernel/xtask/hermit-ifup,vhost=on \
3031
-device virtio-net-pci,netdev=net0,disable-legacy=on \
3132
-append "-- --address 10.0.5.1 $args"
3233
}

0 commit comments

Comments
 (0)