-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Config] Backport Config Changes from Upstreams (#42)
* config: backport config changes from 2 upstreams * patch: fix BBRv3 code for clang clang warns use of `&&` with constant, which breaks build as `-Werror` is enabled (by default)
- Loading branch information
Showing
3 changed files
with
48 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From 229949907e120db70b12fa76e34a9b4cc013c7c9 Mon Sep 17 00:00:00 2001 | ||
From: xingxing <[email protected]> | ||
Date: Tue, 29 Aug 2023 19:23:03 +0800 | ||
Subject: [PATCH] bbrv3: fix clang build | ||
|
||
--- | ||
net/ipv4/tcp_bbr.c | 6 +++--- | ||
1 file changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c | ||
index f4f477a69..294bafe39 100644 | ||
--- a/net/ipv4/tcp_bbr.c | ||
+++ b/net/ipv4/tcp_bbr.c | ||
@@ -1077,7 +1077,7 @@ static int bbr_update_ecn_alpha(struct sock *sk) | ||
|
||
/* See if we should use ECN sender logic for this connection. */ | ||
if (!bbr->ecn_eligible && bbr_can_use_ecn(sk) && | ||
- bbr_param(sk, ecn_factor) && | ||
+ !!bbr_param(sk, ecn_factor) && | ||
(bbr->min_rtt_us <= bbr_ecn_max_rtt_us || | ||
!bbr_ecn_max_rtt_us)) | ||
bbr->ecn_eligible = 1; | ||
@@ -1184,7 +1184,7 @@ static bool bbr_is_inflight_too_high(const struct sock *sk, | ||
} | ||
|
||
if (rs->delivered_ce > 0 && rs->delivered > 0 && | ||
- bbr->ecn_eligible && bbr_param(sk, ecn_thresh)) { | ||
+ bbr->ecn_eligible && !!bbr_param(sk, ecn_thresh)) { | ||
ecn_thresh = (u64)rs->delivered * bbr_param(sk, ecn_thresh) >> | ||
BBR_SCALE; | ||
if (rs->delivered_ce > ecn_thresh) { | ||
@@ -1382,7 +1382,7 @@ static void bbr_adapt_lower_bounds(struct sock *sk, | ||
return; | ||
|
||
/* ECN response. */ | ||
- if (bbr->ecn_in_round && bbr_param(sk, ecn_factor)) { | ||
+ if (bbr->ecn_in_round && !!bbr_param(sk, ecn_factor)) { | ||
bbr_init_lower_bounds(sk, false); | ||
bbr_ecn_lower_bounds(sk, &ecn_inflight_lo); | ||
} | ||
-- | ||
2.41.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters