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

ackhandler: immediately acknowledge ECN-CE marked packets #4147

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

marten-seemann
Copy link
Member

Fixes #4146.

Sending an ACK immediately when receiving an ECN-CE marked packet allows the sender to react to the marking faster. This is expected to be crucial for L4S to work properly, especially when used in conjunction with the ACK frequency extension.


// queue an ACK if the packet was ECN-CE marked
if ecn == protocol.ECNCE {
if h.logger.Debug() {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is likely important for performance. When using L4S, we expect 2 CE-markings per RTT, so we want to avoid calls to Debugf when we're not actually outputting logs.

Copy link
Collaborator

@sukunrt sukunrt Nov 2, 2023

Choose a reason for hiding this comment

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

Do we need this? The Debugf implementation is doing the same check.

// Debugf logs something
func (l *defaultLogger) Debugf(format string, args ...interface{}) {
	if l.logLevel == LogLevelDebug {
		l.logMessage(format, args...)
	}
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Right. It's only important when passing arguments to the function, because that would allocate a slice.

@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #4147 (fc8180f) into master (a360354) will increase coverage by 0.10%.
Report is 2 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4147      +/-   ##
==========================================
+ Coverage   83.75%   83.84%   +0.10%     
==========================================
  Files         150      150              
  Lines       15411    15454      +43     
==========================================
+ Hits        12906    12957      +51     
+ Misses       2007     1998       -9     
- Partials      498      499       +1     
Files Coverage Δ
internal/ackhandler/received_packet_tracker.go 82.93% <100.00%> (+0.28%) ⬆️

... and 3 files with indirect coverage changes

@marten-seemann marten-seemann merged commit 9414ea4 into master Nov 3, 2023
34 checks passed
@marten-seemann marten-seemann deleted the ecn-ce-immediate-ack branch November 3, 2023 15:31
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.

send an immediate ACK for CE-marked packets
2 participants