mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-06-16 02:15:47 +00:00
4f56d42c78
This patch implement virtio network device. Use '-n virtio or --network=virtio' to enable it. The current implementation uses tap which needs root privileges to create a virtual network device (tap0) on host side. Actually, what we need is CAP_NET_ADMIN. The host side tap0 is set to 192.168.33.2/24. You need to configure the guest side eth0 to any ip address in 192.168.33.0/24. Here are some scp performance test for differenct implementations: None of rx and tx as thread: guest to host 3.2MB/s host to guest 3.1MB/s Only rx as thread: guest to host 14.7MB/s host to guest 33.4MB/s Both rx and tx as thread(This patch works this way): guest to host 19.8MB/s host to guest 32.5MB/s Signed-off-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
8 lines
161 B
C
8 lines
161 B
C
#ifndef KVM_TYPES_H
|
|
#define KVM_TYPES_H
|
|
|
|
/* FIXME: include/linux/if_tun.h and include/linux/if_ether.h complains */
|
|
#define __be16 u16
|
|
|
|
#endif /* KVM_TYPES_H */
|