-
-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic Send Offload (GSO) Support #1024
Commits on Feb 17, 2021
-
Allow to query for more data than "mtu" in the pacing module
With GSO, we need to ask whether we can send 2 additional datagrams.
Configuration menu - View commit details
-
Copy full SHA for 9167f61 - Browse repository at this point
Copy the full SHA 9167f61View commit details -
Wit GSO activated, encoding cmsgs paniced since not enough space was available. We need a minimum of 88 bytes.
Configuration menu - View commit details
-
Copy full SHA for ad6e127 - Browse repository at this point
Copy the full SHA ad6e127View commit details -
Move the check for sendable data in a space
`space_can_send` is now a separate function which returns whether there is sendable data in a certain space.
Matthias Einwag committedFeb 17, 2021 Configuration menu - View commit details
-
Copy full SHA for f0ad120 - Browse repository at this point
Copy the full SHA f0ad120View commit details -
Update congestion_blocked function for multiple datagrams
With GSO we need to be able to check whether multiple datagrams are sendable.
Matthias Einwag committedFeb 17, 2021 Configuration menu - View commit details
-
Copy full SHA for 085fe9a - Browse repository at this point
Copy the full SHA 085fe9aView commit details
Commits on Feb 22, 2021
-
Store
tag_len
andack_eliciting
inPacketBuilder
This allows easy access the information later on.
Configuration menu - View commit details
-
Copy full SHA for 59ae00d - Browse repository at this point
Copy the full SHA 59ae00dView commit details -
Store the transmit buffer outside of
PacketBuilder
With GSO storing the buffer inside the builder does not work due to lifetime issues - we need to hold the buffer across various packets. This keeps the buffer outside of the builder and just references the start of a packet via an offset. This also removes the lifetime from `PacketBuilder`.
Configuration menu - View commit details
-
Copy full SHA for 09394bf - Browse repository at this point
Copy the full SHA 09394bfView commit details -
Move packet finalization into a seperate function
`finish_and_track_packet` will now take information from the builder when finalizing the packet.
Configuration menu - View commit details
-
Copy full SHA for 292d025 - Browse repository at this point
Copy the full SHA 292d025View commit details -
This adds a new stat for the number of transmit calls and fixes the metrics for path challenges.
Configuration menu - View commit details
-
Copy full SHA for dedd95d - Browse repository at this point
Copy the full SHA dedd95dView commit details -
Set
segment_size
based on the amount of sent datagramsThe option only needs to be sent for GSO (multiple datagrams in a buffer).
Configuration menu - View commit details
-
Copy full SHA for ca4faa3 - Browse repository at this point
Copy the full SHA ca4faa3View commit details -
This change defers padding packets as a runtime decision while the packet is populated. For individual packets, we store in `SentFrames` whether a padding is required. If padding is required a `min_datagram_size` variable is increased, which will later on assure that only the last packet in a datagram gets padded.
Configuration menu - View commit details
-
Copy full SHA for 463ed09 - Browse repository at this point
Copy the full SHA 463ed09View commit details -
Generic Send Offload (GSO) Support
This change implements an initial version of GSO support [1][2][3] for Linux, which improves the effiency of sending data. The approach taken in this change is to create a buffer which contains multiple datagrams in `Connection::poll_transmit`. This was picked over trying to merge packets in the endpoint task, since packets seem to need to be padded to a common segment size in order to make them sendable via GSO. In order to to this in an efficient fashion, the `poll_transmit` method was restructred. Instead of selecting spaces upfront, it will now loop through all possible packet spaces, check if there is pending data to send and create packets and datagrams out of this. The last packet which was written to a datagram buffer is not finalized until it is clear whether follow-up packets need to be written, since we need to know whether this packet should get padded to MTU length or not. This change doesn't enable GSO yet, since it will only produce a single datagram. I will create a separate change for this. Performance measurements: **No GSO:** ``` Sent 1073741824 bytes on 1 streams in 4.31s (237.66 MiB/s) ``` **With GSO (up to 8 packets):** ``` Sent 1073741824 bytes on 1 streams in 3.02s (339.18 MiB/s) ``` [1] http://vger.kernel.org/lpc_net2018_talks/willemdebruijn-lpc2018-udpgso-paper-DRAFT-1.pdf [2] http://vger.kernel.org/lpc_net2018_talks/willemdebruijn-lpc2018-udpgso-presentation-20181104.pdf [3] https://lwn.net/Articles/752956/
Configuration menu - View commit details
-
Copy full SHA for 88aed6f - Browse repository at this point
Copy the full SHA 88aed6fView commit details