feat(phy): add TCP segmentation support#1148
Open
cagatay-y wants to merge 2 commits into
Open
Conversation
It is possible for packets larger than the current capture limits to be sent with the segmentation offload feature.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1148 +/- ##
==========================================
- Coverage 81.48% 81.48% -0.01%
==========================================
Files 81 81
Lines 25007 25014 +7
==========================================
+ Hits 20378 20383 +5
- Misses 4629 4631 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The Windows and Linux documentations for the same feature were used as references. It was more difficult to find information on how devices support the feature, so the interface is mostly based on how virtio-net devices expect to be driven. The code was tested on the Hermit kernel with a virtio-net device, but only with IPv4, as Hermit does not support IPv6.
Design rationale
packetmeta-id.TcpPackets to set the partial checksum in our case) functional for sufficiently small unsegmented packets. On the other hand, it can also be argued that causing a failure even for smaller packets can help uncover the error case with the larger packets earlier in the development of the device drivers.Comparison to #830
ChecksumCapabilities. This PR does not do so for the following reasons:SegmentationCapabilitiesrather than the TCP specific nameTsoCapabilities. I believe the current structure can be expanded to support UDP, though I currently do not have a prototype for that.set_metacalls seems correct to me but because it is not segmentation offload specific and I was not able to test its necessity because of the lack of IPv6 support on our test platform, I did not include it in this PR.