kernel: add vhost-net module
vhost-net is used to accelerate traffic to virtualisation
guests that use the virtio-net network card in QEMU.
Generally it is invoked by specifying "vhost=on" to a
QEMU -netdev device:
qemu-system-aarch64 -nographic -M virt -cpu host \
        --enable-kvm -bios u-boot.bin -smp 1 -m 2048 \
        -drive file=openwrt-armsr-armv8.img,format=raw,index=0,media=disk \
        -device "virtio-net,netdev=landev,disable-legacy=off,disable-modern=off" \
        -netdev "tap,id=landev,helper=/usr/lib/qemu-bridge-helper --br=br-lan,vhost=on"
Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit d188db8aed74547f98b905254d4f57baf225f1d6)
			
			
This commit is contained in:
		
				
					committed by
					
						
						Hauke Mehrtens
					
				
			
			
				
	
			
			
			
						parent
						
							6897270491
						
					
				
				
					commit
					5edeb1ee0c
				
			@@ -117,3 +117,27 @@ define KernelPackage/vfio-pci/description
 | 
				
			|||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(eval $(call KernelPackage,vfio-pci))
 | 
					$(eval $(call KernelPackage,vfio-pci))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define KernelPackage/vhost
 | 
				
			||||||
 | 
					  SUBMENU:=Virtualization
 | 
				
			||||||
 | 
					  TITLE:=Host kernel accelerator for virtio (base)
 | 
				
			||||||
 | 
					  KCONFIG:=CONFIG_VHOST
 | 
				
			||||||
 | 
					  FILES:=$(LINUX_DIR)/drivers/vhost/vhost.ko \
 | 
				
			||||||
 | 
					    $(LINUX_DIR)/drivers/vhost/vhost_iotlb.ko
 | 
				
			||||||
 | 
					  AUTOLOAD:=$(call AutoProbe,vhost vhost_iotlb)
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$(eval $(call KernelPackage,vhost))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define KernelPackage/vhost-net
 | 
				
			||||||
 | 
					  SUBMENU:=Virtualization
 | 
				
			||||||
 | 
					  TITLE:=Host kernel accelerator for virtio-net
 | 
				
			||||||
 | 
					  DEPENDS:=+kmod-tun +kmod-vhost
 | 
				
			||||||
 | 
					  KCONFIG:=CONFIG_VHOST_NET
 | 
				
			||||||
 | 
					  FILES:=$(LINUX_DIR)/drivers/vhost/vhost_net.ko
 | 
				
			||||||
 | 
					  AUTOLOAD:=$(call AutoProbe,vhost_net)
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$(eval $(call KernelPackage,vhost-net))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user