RFC: support for TCP Segmentation Offloading (TSO) #830
+97
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I tried to extend a driver to support TCP segmentation offloading (TSO). In this case, smoltcp has to create one header (Ethernert+IP+TCP) followed by multiple payloads. To support TSO, I extended the
DeviceCapabilities
withTsoCapabilities
.TsoCapabilities
can describe, if TSO is supported for IPv4, IPv6 or both. In case TSO is supported, smoltcp emits packets with the maximum size of the remote window to the device driver.Maybe my solution is a little bit naive. I am not an TCP expert. My test driver is a revised driver for Virtio. Consquently, my VM uses virtio to forward messages to a tap device. Afterwards, the host forwards the packets over a 10 Gbit/s device to a server, which sends a response back. Both devices (tap and the ethernet device) supports TSO. I monitored the communication with Wireshark. It seems to work and I don't see any strange behavior.
I would appreciate comments to improve my work.