Page MenuHomeFreeBSD

vtnet: disable hardware TCP LRO by default
ClosedPublic

Authored by tuexen on Mon, Sep 22, 8:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 9:57 PM
Unknown Object (File)
Fri, Oct 10, 9:57 PM
Unknown Object (File)
Fri, Oct 10, 9:57 PM
Unknown Object (File)
Fri, Oct 10, 4:05 PM
Unknown Object (File)
Fri, Oct 10, 8:19 AM
Unknown Object (File)
Thu, Oct 9, 4:22 PM
Unknown Object (File)
Fri, Oct 3, 7:01 PM
Unknown Object (File)
Fri, Oct 3, 4:58 PM
Subscribers

Details

Summary

Hardware TCP LRO results in problems in settings with IP forwarding being enabled. In case of nodes without IP forwarding, using software LRO is also beneficial in general, since it can provide better information about what was received on the wire.
Therefore, disable hardware TCP LRO by defaults. By tuning the loader tunable, this can be changed.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I did some tests to understand the consequence of disabling "hardware LRO".

If the guest disables hardware LRO, the host cannot send an oversized packet to the guest. If the host receives an oversized packet - from another guest whose driver used TSO or from a physical interface whose driver performed LRO - it must perform TSO in software before it can send the resulting smaller segments to the guest. This makes the packet transfer less efficient.

It's easier for the host if the guest has hardware LRO enabled. However, the big issue is that a FreeBSD guest cannot route and send an oversized packet out via another interface. It could use TSO of the outgoing interface or perform TSO in software if the outgoing interface does not offer TSO, but this is not implemented, and implementing it needs some time. Until then, disabling hardware LRO seems to be the better default setting.

share/man/man4/vtnet.4
62

The user does not have the option to use both, right? I would replace the should with a can.

This revision is now accepted and ready to land.Tue, Sep 30, 1:02 PM
This revision was automatically updated to reflect the committed changes.