TX/RX offloading on tap interface

Marathon

Member
Apr 7, 2019
40
1
6
54
HI All,

Is there a way to enable offloading on a tap interface while the VM is starting ?

Code:
/sbin/ethtool -K tap101i0 rx off tx off

I have been busy with startup scripts and such but didn't succeed.

What I do see is that on start of the VM the offloading is actually there but after some seconds it's enabled and I cannot see where.

Any ideas how to accomplish this ?
 
It's an interface, virtual indeed, that is why you want to turn off Hardware Offloading, it's on by default.
 
I'm thinking that many of the values ethtool returns for such an interface are meaningless.

ETA: Recall that a for a tap interface the "hardware" is a user-space program that reads/writes raw Ethernet frames to the /dev/tap character device. It is always responsible for calculating checksums. So changing the setting with ethtool would be useless.
 
Last edited:
You might think it's useless but if I run VyOS with DHCP relay on it the DHCP relay only works when I offload on tap-interface on the hypervisor.

It's a known KVM thing, even oVIrt has an option to disable it on KVM level for a Host/VM.
 
HI,

Thanks I will look into the hooks (again).

I think an option would be best as you actually hack that in anyways using a hook script.

Would that be a lot of work ?

Thanks again!
 
Interesting issue. I have no solution but want to make sure my understanding of the problem is correct.

Apparently qemu net drivers do checksum offload by simply not calculating or validating checksums, there being no hardware to offload to. For guests with offload disabled qemu fixes any bad checksums on oncoming packets.

For traffic between guests on the same host this is almost always fine. Corruption/loss should never happen and very few apps look at the IP headers. For outside packets the host IP stack and net drivers will do the work. Problem comes if a guest looks at the raw ethernet frame and finds a bad checksum. DHCP is one of those cases. So you want to disable offloading for DHCP servers that serve other guests on the same host.

Is that about right?
 
Last edited:
You are not completely right there, I see a change in traffic when I disable rx/rx offload on tap interface and yes, DHCP traffic. If I don't, it doesn't work in the VM, so the one being DHCP relay.

I think the same happens for firewalls, check oVirt it has an option to disable it on KVM with a reason.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!