Repository navigation
Drop DATA packets with no payload in homa_add_packet - #19
Closed
Stuartwastaken wants to merge 1 commit into
Closed
Stuartwastaken wants to merge 1 commit into
Stuartwastaken wants to merge 1 commit into
Conversation
A DATA packet with no bytes after its header at offset recv_end took the sequential path: it was queued on msgin.packets but advanced neither recv_end nor bytes_remaining, so a peer could queue the same offset over and over. Senders never generate such packets.
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 only checks that a DATA packet is at least as long as struct homa_data_hdr, so a packet with no payload reaches homa_add_packet. If its offset is msgin.recv_end it takes the sequential path and is queued on msgin.packets, but recv_end and bytes_remaining don't move, so the same offset can be queued again and again until the application drains it or the RPC is reaped. This drops such packets with SKB_DROP_REASON_PKT_TOO_SMALL; sendmsg and homa_message_in_init already reject zero-length messages, so no sender produces them.
The new unit test homa_add_packet__no_data fails without the change (the packet is queued and the return is 0).