feat: igb nic, jumbo frames and tap offloads on the guest link
This commit is contained in:
15
scripts/libvirt-hook-vnet-offload.sh
Executable file
15
scripts/libvirt-hook-vnet-offload.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# libvirt qemu hook: turn GSO and GRO on for the guest's tap.
|
||||
#
|
||||
# QEMU leaves them off and sets the tap up after udev has run, so it has to
|
||||
# happen here. Paired with MTU 9000 they are the difference between 2.5 and
|
||||
# 14 Gbit/s into the guest; neither helps alone. Tap names come from the domain
|
||||
# XML on stdin, so the hook never calls virsh, which would deadlock libvirtd.
|
||||
|
||||
[ "$2" = started ] || exit 0
|
||||
|
||||
for tap in $(grep -oE "<target dev='(vnet|tap|macvtap)[^']*'" | sed "s/.*dev='//; s/'$//"); do
|
||||
ethtool -K "$tap" gso on gro on 2>/dev/null
|
||||
done
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user