Repository navigation
Don't split IP-reassembled packets in homa_softirq - #13
Closed
Stuartwastaken wants to merge 1 commit into
Closed
Stuartwastaken wants to merge 1 commit into
Stuartwastaken wants to merge 1 commit into
Conversation
homa_softirq assumed that any frag_list was a batch built by Homa's GRO and processed each entry as a separate Homa packet. IP reassembly also leaves fragments on frag_list, and those are pieces of one packet: their bytes are counted in the head's len, their payload was parsed as Homa headers, and their dev is NULL, so dev_net crashed in homa_dispatch_pkts. Any remote host can send fragmented Homa packets, and in the stripped build, which has no GRO, every frag_list comes from reassembly. Homa's GRO doesn't add batched packets to the head's len, so split the list only when skb->len == skb_pagelen(skb).
Owner
Author
|
Raised upstream as PlatformLab#155. |
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.
homa_softirq treats any frag_list as a batch from Homa's GRO, but IP reassembly also builds one when a Homa packet arrives in fragments. The fragments then get dispatched as separate Homa packets with skb->dev == NULL, so dev_net() faults in homa_dispatch_pkts. Any remote host can trigger this, and in the stripped build (no GRO) a frag_list can only come from reassembly.
Reassembly counts the fragments in skb->len and Homa's GRO doesn't, so this only splits the list when skb->len == skb_pagelen(skb). The new unit test homa_softirq__frag_list_from_ip_reassembly crashes in dev_net under ASan without the fix; all 887 unit tests pass with it.