Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LiliDeng committed Feb 13, 2025
1 parent ca50e13 commit aa02b08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lisa/tools/qemu.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ def create_vm(
f"-device {nic_model},netdev=nettap{self.interface_count},"
f"mac={random_mac_address} "
)
# vhost-net is a kernel module that accelerates virtio-net performance
# by offloading packet processing from QEMU's user space to the host
# kernel reducing latency and CPU overhead
if self.node.tools[KernelConfig].is_enabled("CONFIG_VHOST_NET"):
# vhose-net depends on CONFIG_VHOST_NET kernel config
cmd += f"-netdev tap,id=nettap{self.interface_count},vhost=on,script=no "
else:
cmd += f"-netdev tap,id=nettap{self.interface_count},script=no "
Expand Down

0 comments on commit aa02b08

Please sign in to comment.