Skip to content

prevent scheduled ACKs from getting cancelled#462

Open
Lanius-collaris wants to merge 3 commits intopion:masterfrom
Lanius-collaris:quicker-ack
Open

prevent scheduled ACKs from getting cancelled#462
Lanius-collaris wants to merge 3 commits intopion:masterfrom
Lanius-collaris:quicker-ack

Conversation

@Lanius-collaris
Copy link

Description

I hope it works. 😇

Reference issue

Fixes #461

@codecov
Copy link

codecov bot commented Mar 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.16%. Comparing base (e3a1986) to head (b2c3092).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #462      +/-   ##
==========================================
+ Coverage   84.13%   84.16%   +0.03%     
==========================================
  Files          54       54              
  Lines        4287     4283       -4     
==========================================
- Hits         3607     3605       -2     
+ Misses        494      493       -1     
+ Partials      186      185       -1     
Flag Coverage Δ
go 84.16% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@JoTurk JoTurk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will have extra cost of sending some ACKs slightly earlier in a few bursty cases under high throughput. But i think this is fine, we can benchmark it later.
We'll need a unit test for this behavior before we can merge it.

@Lanius-collaris
Copy link
Author

Lanius-collaris commented Mar 14, 2026

This will have extra cost of sending some ACKs slightly earlier in a few bursty cases under high throughput.

Two controllers in cc-alg branch have CanSend() method to tell the caller when to send packets.
https://github.com/Lanius-collaris/pion-sctp/blob/5af9dde48b75c9cc3c6bbb00310976daf4f57e65/cc_alg/frcc.go#L700
https://github.com/Lanius-collaris/pion-sctp/blob/5af9dde48b75c9cc3c6bbb00310976daf4f57e65/cc_alg/reno.go#L71
Do you want to merge it first?

Interleaving nonblocking Read() with "blocking" Read() ( e.g. net.Conn.Read ) can reduce ACKs too.

@Lanius-collaris
Copy link
Author

Lanius-collaris commented Mar 14, 2026

We'll need a unit test for this behavior before we can merge it.

I don't know how to write unit tests for multi-threaded code.

This will have extra cost of sending some ACKs slightly earlier in a few bursty cases under high throughput. But i think this is fine, we can benchmark it later. We'll need a unit test for this behavior before we can merge it.

If you have time, could you benchmark my reno.go? I didn't change the default algorithm in cc-alg branch.
https://github.com/Lanius-collaris/pion-sctp/blob/5af9dde48b75c9cc3c6bbb00310976daf4f57e65/association.go#L633-L679

Also, Reno-style CCAs' AIMD behavior (additive-increase, multiplicative-decrease) make them unable to utilize most of available bandwidth when the bandwidth × delay product is large or the packet loss rate isn't small enough, so don't worry.
https://intronetworks.cs.luc.edu/current/html/dynamicsB.html#the-high-bandwidth-tcp-problem
https://intronetworks.cs.luc.edu/current/html/dynamicsB.html#the-lossy-link-tcp-problem

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.

if n packets ( n % 2 != 0 ) are received within 100 µs, the latest ACK may be delayed up to 200ms

2 participants