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

🙉 Enable NACKs behind a feature toggle #127

Merged
merged 9 commits into from
Apr 27, 2021

Conversation

danstiner
Copy link
Collaborator

@danstiner danstiner commented Apr 20, 2021

Meant to be a minimal set of changes to bring back the NACK. Further refactoring can come later.

Tested on the homelab without/with feature enabled. Enabling this makes a substantial improvement in all the simulated packet loss scenarios I've done.

Fixes #95

@danstiner danstiner changed the base branch from master to danstiner/threadless-transports April 20, 2021 16:28
@danstiner danstiner linked an issue Apr 20, 2021 that may be closed by this pull request
Base automatically changed from danstiner/threadless-transports to master April 20, 2021 23:52
@danstiner
Copy link
Collaborator Author

I'm a bit torn how far to go with adding tests to this PR, I think to really make the logic testable it should be pulled into more specialized buffer/nack tracking classes.

Maybe before merging I should add at least one happy path test of relaying packets, and then as we refactor this we can add more tests.

@danstiner danstiner marked this pull request as ready for review April 23, 2021 03:33
@danstiner danstiner requested a review from haydenmc April 23, 2021 03:33
Copy link
Member

@haydenmc haydenmc left a comment

Choose a reason for hiding this comment

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

Couple nits, then good to merge :)

src/FtlServer.h Outdated
@@ -66,7 +66,7 @@ class FtlServer : public FtlControlConnectionManager
/**
* @brief Starts listening for FTL connections on a new thread.
*/
void StartAsync();
void StartAsync(bool nackLostPackets);
Copy link
Member

Choose a reason for hiding this comment

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

Any reason nackLostPackets can't be a constructor parameter?

Copy link
Collaborator Author

@danstiner danstiner Apr 27, 2021

Choose a reason for hiding this comment

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

Yeah it is weird. The issue is FtlServer is constructed before configuration is loaded in Init.
https://github.com/Glimesh/janus-ftl-plugin/blob/master/src/JanusFtl.cpp#L40

We could just move construction of the FtlServer into Init? I think that makes sense, though I'd also then move the control listener construction Init.
Edit: Did that, seems like an improvement

@danstiner danstiner merged commit 48ba30e into master Apr 27, 2021
@danstiner danstiner deleted the danstiner/re-enable_nacks branch April 27, 2021 17:14
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.

Fix NACKs to more gracefully handle RTP sequence # rollover
2 participants