Skip to content
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

Pick up and send undersized uTP packets when a packet is 'forced' #7056

Merged
merged 1 commit into from Sep 9, 2022
Merged

Pick up and send undersized uTP packets when a packet is 'forced' #7056

merged 1 commit into from Sep 9, 2022

Conversation

thrnz
Copy link
Contributor

@thrnz thrnz commented Sep 8, 2022

Undersized (<MTU) uTP packets are held back in order to reduce overhead (ie. large headers relative to actual payload). Currently, libtorrent can 'force' send a uTP header-only packet without a payload (such as a deferred ack) while an undersized packet is being held back, negating any gains made from holding it back.

This suggested change will pick up and send the undersized packet when a uTP packet is being 'forced' out if there is room in the congestion window to do so.

See #6935

@arvidn
Copy link
Owner

arvidn commented Sep 8, 2022

this looks reasonable

@arvidn
Copy link
Owner

arvidn commented Sep 8, 2022

there is at least one simulation test that counts exactly how many packets are sent in a few scenarios. You'll need to update those numbers to make the test pass. (and make sure those changes matches your understanding of what aught to happen with this patch).

@arvidn
Copy link
Owner

arvidn commented Sep 8, 2022

see this test:
https://github.com/arvidn/libtorrent/runs/8244652336?check_suite_focus=true#step:5:701

This is simulations/test_utp.cpp

@thrnz
Copy link
Contributor Author

thrnz commented Sep 8, 2022

Those numbers look about right. An increase in payload packets transferred as the undersized packets are now piggy-backing on the previously 'ack only' packets, and a decrease in total packets transferred. I'll update the expected test numbers to match.

…room in the congestion window when 'forcing' a packet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants