2

I have a virtual network for connecting KVM guests with the host.

I need to disable TCP checksum offloading on this network. The ethtool works fine but I want to disable it permanently and I could not find anything in virsh or QEMU documentation. Adding /etc/sysconfig/network-scripts/ifcfg-virbr1 file with the corresponding options also does not work.

jackhab
  • 751
  • 1
  • 8
  • 20
  • 1
    You want to disable offloading on a _virtual_ network?! – Michael Hampton Mar 11 '14 at 15:05
  • 1
    The client on the virtual guest is connecting to the server running on its virtual host. When the tx checksum offloading of the host virtual network is on the client receives packets with wrong checksum. When I turn off the offloading the problem disappears. – jackhab Mar 11 '14 at 18:17
  • @jackhab Weird problem. How did you notice it? I'm just curious. – Ryan Babchishin Aug 17 '16 at 06:31
  • @RyanBabchishin well, I noticed HTTP requests are stuck so I looked at the traffic in Wireshark. – jackhab Aug 17 '16 at 17:40

3 Answers3

3

ethtool -K eth0 tso off in rc.local or the vm startup script. You could probably do it as a libvirt hook too

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
dyasny
  • 18,482
  • 6
  • 48
  • 63
2

I recommend doing this with a udev rule. I put this in /etc/udev/rules.d/81-bridge.rules:

ACTION=="add", SUBSYSTEM=="net", NAME=="virbr*", RUN+="/sbin/ethtool -K $env{INTERFACE} tx off"

More sophisticated approaches are possible, depending on your needs.

Falcon Momot
  • 24,975
  • 13
  • 61
  • 92
1

You can disable it in the guest's interface xml:

<driver>
      <host csum='off'/>
      <guest csum='off'/>
    </driver>

Refer to https://libvirt.org/formatdomain.html#setting-nic-driver-specific-options