-
Notifications
You must be signed in to change notification settings - Fork 679
Expand file tree
/
Copy path0002-ip-introduce-the-ecn_low-per-route-feature.patch
More file actions
120 lines (108 loc) · 4.56 KB
/
0002-ip-introduce-the-ecn_low-per-route-feature.patch
File metadata and controls
120 lines (108 loc) · 4.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
From 537b1b761e1d0036923adba7a80d3655cfff095d Mon Sep 17 00:00:00 2001
From: David Morley <morleyd@google.com>
Date: Fri, 21 Jul 2023 09:20:46 +0000
Subject: [PATCH 1/2] ip: introduce the ecn_low per-route feature
Add a a new "ecn_low" feature that administrators can add to a
particular ip route. The ecn_low feature indicates that the given
destination network is a low-latency ECN environment, meaning both
that ECN CE marks are applied by the network using a low-latency
marking threshold and also that TCP endpoints provide precise
per-data-segment ECN feedback in ACKs (where the ACK ECE flag echoes
the received CE status of all newly-acknowledged data segments). This
ecn_low feature indication can be used by congestion control
algorithms to decide how to interpret ECN signals over the given
destination network.
Signed-off-by: David Morley <morleyd@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
---
include/uapi/linux/rtnetlink.h | 4 +++-
ip/iproute.c | 8 +++++++-
man/man8/ip-route.8.in | 19 ++++++++++++++-----
3 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index 2132e941b93a..66e3237ea915 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -506,9 +506,11 @@ enum {
#define RTAX_FEATURE_SACK (1 << 1)
#define RTAX_FEATURE_TIMESTAMP (1 << 2)
#define RTAX_FEATURE_ALLFRAG (1 << 3)
+#define RTAX_FEATURE_ECN_LOW (1 << 4)
#define RTAX_FEATURE_MASK (RTAX_FEATURE_ECN | RTAX_FEATURE_SACK | \
- RTAX_FEATURE_TIMESTAMP | RTAX_FEATURE_ALLFRAG)
+ RTAX_FEATURE_TIMESTAMP | RTAX_FEATURE_ALLFRAG | \
+ RTAX_FEATURE_ECN_LOW)
struct rta_session {
__u8 proto;
diff --git a/ip/iproute.c b/ip/iproute.c
index fdf1f9a9dd0a..bd5d783cfdbb 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -96,7 +96,7 @@ static void usage(void)
"PREF := [ low | medium | high ]\n"
"TIME := NUMBER[s|ms]\n"
"BOOL := [1|0]\n"
- "FEATURES := ecn\n"
+ "FEATURES := [ ecn | ecn_low ]\n"
"ENCAPTYPE := [ mpls | ip | ip6 | seg6 | seg6local | rpl | ioam6 | xfrm ]\n"
"ENCAPHDR := [ MPLSLABEL | SEG6HDR | SEG6LOCAL | IOAM6HDR | XFRMINFO ]\n"
"SEG6HDR := [ mode SEGMODE ] segs ADDR1,ADDRi,ADDRn [hmac HMACKEYID] [cleanup]\n"
@@ -350,6 +350,10 @@ static void print_rtax_features(FILE *fp, unsigned int features)
print_null(PRINT_ANY, "ecn", "ecn ", NULL);
features &= ~RTAX_FEATURE_ECN;
}
+ if (features & RTAX_FEATURE_ECN_LOW) {
+ print_null(PRINT_ANY, "ecn_low", "ecn_low ", NULL);
+ features &= ~RTAX_FEATURE_ECN_LOW;
+ }
if (features)
print_0xhex(PRINT_ANY,
@@ -1349,6 +1353,8 @@ static int iproute_modify(int cmd, unsigned int flags, int argc, char **argv)
if (strcmp(*argv, "ecn") == 0)
features |= RTAX_FEATURE_ECN;
+ else if (strcmp(*argv, "ecn_low") == 0)
+ features |= RTAX_FEATURE_ECN_LOW;
else
invarg("\"features\" value not valid\n", *argv);
break;
diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in
index c2b00833e507..10f35f38e6a2 100644
--- a/man/man8/ip-route.8.in
+++ b/man/man8/ip-route.8.in
@@ -181,7 +181,7 @@ throw " | " unreachable " | " prohibit " | " blackhole " | " nat " ]"
.ti -8
.IR FEATURES " := [ "
-.BR ecn " | ]"
+.BR ecn " | " ecn_low " ] "
.ti -8
.IR PREF " := [ "
@@ -544,16 +544,25 @@ The default value is zero, meaning to use Slow Start value.
.TP
.BI features " FEATURES " (Linux 3.18+ only)
-Enable or disable per-route features. Only available feature at this
-time is
-.B ecn
-to enable explicit congestion notification when initiating connections to the
+Enable or disable per-route features. Available features include:
+
+.BI ecn
+- to enable explicit congestion notification when initiating connections to the
given destination network.
When responding to a connection request from the given network, ecn will
also be used even if the
.B net.ipv4.tcp_ecn
sysctl is set to 0.
+.BI ecn_low
+- to indicate that the given destination network is a low-latency ECN
+environment, meaning both that ECN CE marks are applied by the network using a
+low-latency marking threshold and also that TCP endpoints provide precise
+per-data-segment ECN feedback in ACKs (where the ACK ECE flag echoes the
+received CE status of all newly-acknowledged data segments). This ecn_low
+feature indication can be used by congestion control algorithms to decide how
+to interpret ECN signals over the given destination network (Linux 6.7+ only).
+
.TP
.BI quickack " BOOL " "(Linux 3.11+ only)"
Enable or disable quick ack for connections to this destination.
--
2.41.0.487.g6d72f3e995-goog