Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon
Commits
8dcf714b
Commit
8dcf714b
authored
3 years ago
by
Nico
Committed by
FFS Buildbot
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
add patch to remove fastd random delay on inital handshake
parent
221d5078
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
patches/packages/packages/0002-fastd-remove-random-delay-on-inital-handshake.patch
+37
-0
37 additions, 0 deletions
.../0002-fastd-remove-random-delay-on-inital-handshake.patch
with
37 additions
and
0 deletions
patches/packages/packages/0002-fastd-remove-random-delay-on-inital-handshake.patch
0 → 100644
+
37
−
0
View file @
8dcf714b
From: Nico <github@nicoboehr.de>
Date: Mon, 26 Apr 2021 14:12:43 +0000
Subject: fastd: remove random delay on inital handshake
When a peer limit is defined, fastd will by default randomly delay
the inital handshake. As our gateways delay their handshake to
better distribute their load, this is undesireable.
diff --git a/net/fastd/patches/0100-remove-random-delay-on-inital-handshake.patch b/net/fastd/patches/0100-remove-random-delay-on-inital-handshake.patch
new file mode 100644
index 0000000000000000000000000000000000000000..40ca26812bda65d8b08a1034e23d1b2335c77259
--- /dev/null
+++ b/net/fastd/patches/0100-remove-random-delay-on-inital-handshake.patch
@@ -0,0 +1,23 @@
+--- a/src/peer.c
++++ b/src/peer.c
+@@ -322,19 +322,11 @@ static void reset_peer(fastd_peer_t *pee
+
+ /**
+ Starts the first handshake with a newly setup peer
+-
+- If a peer group has a peer limit the handshakes will be delayed between 0 and 3 seconds
+- make the choice of peers random (it will be biased by the latency, which might or might not be
+- what a user wants)
+ */
+ static void init_handshake(fastd_peer_t *peer) {
+- unsigned delay = 0;
+- if (has_group_config_constraints(peer->group))
+- delay = fastd_rand(0, 3000);
+-
+ peer->state = STATE_HANDSHAKE;
+
+- fastd_peer_schedule_handshake(peer, delay);
++ fastd_peer_schedule_handshake(peer, 0);
+ }
+
+ /** Handles an asynchronous DNS resolve response */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment