Open
Conversation
608321e to
df413f5
Compare
e682c0c to
d4e5b39
Compare
d4e5b39 to
f38cd8f
Compare
The udp/ip underlay provider now uses priority queues to send the received packets. This is done by reading first all of the priority queue, and only then reading the best-effort one. Also, modify the layout of the Packet struct to automatically align to 64 bytes, instead of manually adding padding (which failed for zero padding bytes).
f38cd8f to
fa11d3f
Compare
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.
This PR introduces priority forwarding queues at the border router.
The main changes are:
Packetdata structure now contains aQueueIndexfield, that denotes the priority of the packet. It can be set toWithPriorityor toWithBestEffort.udpip.gothat reads the packets from the packet processor output channel, and sends them viaWriteBatchhas changed, mainly inside the functionreadUpTo, where priority packets are always read before anything else.sendandreadUpTouse now circular iterators (ring buffer iterators). See clarification below.Because we are now reading from two distinct Go channels (in priority order), the amount of time needed to send N packets with the new feature is greater than before.
To improve performance, circular iterators are used in the function
udpConnection.send.Accompanying benchmarks are in the PR, mainly to ease the discussion on how not to impact performance (too much) while still having priority queues.
This PR had been originally opened as a draft on scionproto#4866
This change is