* [PATCH iproute2] ip: add fastopen_no_cookie option to ip route
@ 2017-10-26 18:10 Christoph Paasch
2017-10-27 6:40 ` Stephen Hemminger
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Paasch @ 2017-10-26 18:10 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, Yuchung Cheng, Eric Dumazet
This patch adds fastopen_no_cookie option to enable/disable TCP fastopen
without a cookie on a per-route basis.
Support in Linux was added with 71c02379c762 (tcp: Configure TFO without
cookie per socket and/or per route).
Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Christoph Paasch <cpaasch@apple.com>
---
include/uapi/linux/rtnetlink.h | 2 ++
ip/iproute.c | 42 ++++++++++++++++++++++++++----------------
man/man8/ip-route.8.in | 6 ++++++
3 files changed, 34 insertions(+), 16 deletions(-)
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index 813e9e0767d3..ff0eec7329c6 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -430,6 +430,8 @@ enum {
#define RTAX_QUICKACK RTAX_QUICKACK
RTAX_CC_ALGO,
#define RTAX_CC_ALGO RTAX_CC_ALGO
+ RTAX_FASTOPEN_NO_COOKIE,
+#define RTAX_FASTOPEN_NO_COOKIE RTAX_FASTOPEN_NO_COOKIE
__RTAX_MAX
};
diff --git a/ip/iproute.c b/ip/iproute.c
index e81bc05ec16c..eadf0394de7f 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -41,21 +41,22 @@ enum list_action {
IPROUTE_SAVE,
};
static const char *mx_names[RTAX_MAX+1] = {
- [RTAX_MTU] = "mtu",
- [RTAX_WINDOW] = "window",
- [RTAX_RTT] = "rtt",
- [RTAX_RTTVAR] = "rttvar",
- [RTAX_SSTHRESH] = "ssthresh",
- [RTAX_CWND] = "cwnd",
- [RTAX_ADVMSS] = "advmss",
- [RTAX_REORDERING] = "reordering",
- [RTAX_HOPLIMIT] = "hoplimit",
- [RTAX_INITCWND] = "initcwnd",
- [RTAX_FEATURES] = "features",
- [RTAX_RTO_MIN] = "rto_min",
- [RTAX_INITRWND] = "initrwnd",
- [RTAX_QUICKACK] = "quickack",
- [RTAX_CC_ALGO] = "congctl",
+ [RTAX_MTU] = "mtu",
+ [RTAX_WINDOW] = "window",
+ [RTAX_RTT] = "rtt",
+ [RTAX_RTTVAR] = "rttvar",
+ [RTAX_SSTHRESH] = "ssthresh",
+ [RTAX_CWND] = "cwnd",
+ [RTAX_ADVMSS] = "advmss",
+ [RTAX_REORDERING] = "reordering",
+ [RTAX_HOPLIMIT] = "hoplimit",
+ [RTAX_INITCWND] = "initcwnd",
+ [RTAX_FEATURES] = "features",
+ [RTAX_RTO_MIN] = "rto_min",
+ [RTAX_INITRWND] = "initrwnd",
+ [RTAX_QUICKACK] = "quickack",
+ [RTAX_CC_ALGO] = "congctl",
+ [RTAX_FASTOPEN_NO_COOKIE] = "fastopen_no_cookie"
};
static void usage(void) __attribute__((noreturn));
@@ -89,7 +90,7 @@ static void usage(void)
fprintf(stderr, " [ ssthresh NUMBER ] [ realms REALM ] [ src ADDRESS ]\n");
fprintf(stderr, " [ rto_min TIME ] [ hoplimit NUMBER ] [ initrwnd NUMBER ]\n");
fprintf(stderr, " [ features FEATURES ] [ quickack BOOL ] [ congctl NAME ]\n");
- fprintf(stderr, " [ pref PREF ] [ expires TIME ]\n");
+ fprintf(stderr, " [ pref PREF ] [ expires TIME ] [ fastopen_no_cookie BOOL ]\n");
fprintf(stderr, "TYPE := { unicast | local | broadcast | multicast | throw |\n");
fprintf(stderr, " unreachable | prohibit | blackhole | nat }\n");
fprintf(stderr, "TABLE_ID := [ local | main | default | all | NUMBER ]\n");
@@ -1216,6 +1217,15 @@ static int iproute_modify(int cmd, unsigned int flags, int argc, char **argv)
addattr8(&req.n, sizeof(req), RTA_TTL_PROPAGATE,
ttl_prop);
+ } else if (matches(*argv, "fastopen_no_cookie") == 0) {
+ unsigned int fastopen_no_cookie;
+
+ NEXT_ARG();
+ if (get_unsigned(&fastopen_no_cookie, *argv, 0))
+ invarg("\"fastopen_no_cookie\" value is invalid\n", *argv);
+ if (fastopen_no_cookie != 1 && fastopen_no_cookie != 0)
+ invarg("\"fastopen_no_cookie\" value should be 0 or 1\n", *argv);
+ rta_addattr32(mxrta, sizeof(mxbuf), RTAX_FASTOPEN_NO_COOKIE, fastopen_no_cookie);
} else {
int type;
inet_prefix dst;
diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in
index 705ceb2054dc..a863769526f3 100644
--- a/man/man8/ip-route.8.in
+++ b/man/man8/ip-route.8.in
@@ -142,6 +142,8 @@ replace " } "
.IR PREF " ] [ "
.B expires
.IR TIME " ]"
+.B fastopen_no_cookie
+.IR BOOL " ] [ "
.ti -8
.IR TYPE " := [ "
@@ -524,6 +526,10 @@ sysctl is set to 0.
.BI quickack " BOOL " "(3.11+ only)"
Enable or disable quick ack for connections to this destination.
+.TP
+.BI fastopen_no_cookie " BOOL " "(4.15+ only)"
+Enable TCP Fastopen without a cookie for connections to this destination.
+
.TP
.BI congctl " NAME " "(3.20+ only)"
.TP
--
2.14.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH iproute2] ip: add fastopen_no_cookie option to ip route
2017-10-26 18:10 [PATCH iproute2] ip: add fastopen_no_cookie option to ip route Christoph Paasch
@ 2017-10-27 6:40 ` Stephen Hemminger
2017-10-31 19:35 ` Christoph Paasch
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2017-10-27 6:40 UTC (permalink / raw)
To: Christoph Paasch; +Cc: netdev, Yuchung Cheng, Eric Dumazet
On Thu, 26 Oct 2017 11:10:38 -0700
Christoph Paasch <cpaasch@apple.com> wrote:
> This patch adds fastopen_no_cookie option to enable/disable TCP fastopen
> without a cookie on a per-route basis.
>
> Support in Linux was added with 71c02379c762 (tcp: Configure TFO without
> cookie per socket and/or per route).
>
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Christoph Paasch <cpaasch@apple.com>
Applied, thanks Christoph.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH iproute2] ip: add fastopen_no_cookie option to ip route
2017-10-27 6:40 ` Stephen Hemminger
@ 2017-10-31 19:35 ` Christoph Paasch
2017-10-31 21:20 ` Stephen Hemminger
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Paasch @ 2017-10-31 19:35 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, Yuchung Cheng, Eric Dumazet
Hello Stephen,
On 27/10/17 - 08:40:03, Stephen Hemminger wrote:
> On Thu, 26 Oct 2017 11:10:38 -0700
> Christoph Paasch <cpaasch@apple.com> wrote:
>
> > This patch adds fastopen_no_cookie option to enable/disable TCP fastopen
> > without a cookie on a per-route basis.
> >
> > Support in Linux was added with 71c02379c762 (tcp: Configure TFO without
> > cookie per socket and/or per route).
> >
> > Cc: Stephen Hemminger <stephen@networkplumber.org>
> > Signed-off-by: Christoph Paasch <cpaasch@apple.com>
>
> Applied, thanks Christoph.
I see that this patch is not yet in your repo.
With the recent changes that went in, it also won't apply cleanly.
Do you want me to rebase & resubmit the patch?
Christoph
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH iproute2] ip: add fastopen_no_cookie option to ip route
2017-10-31 19:35 ` Christoph Paasch
@ 2017-10-31 21:20 ` Stephen Hemminger
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2017-10-31 21:20 UTC (permalink / raw)
To: Christoph Paasch; +Cc: netdev, Yuchung Cheng, Eric Dumazet
On Tue, 31 Oct 2017 12:35:10 -0700
Christoph Paasch <cpaasch@apple.com> wrote:
> Hello Stephen,
>
> On 27/10/17 - 08:40:03, Stephen Hemminger wrote:
> > On Thu, 26 Oct 2017 11:10:38 -0700
> > Christoph Paasch <cpaasch@apple.com> wrote:
> >
> > > This patch adds fastopen_no_cookie option to enable/disable TCP fastopen
> > > without a cookie on a per-route basis.
> > >
> > > Support in Linux was added with 71c02379c762 (tcp: Configure TFO without
> > > cookie per socket and/or per route).
> > >
> > > Cc: Stephen Hemminger <stephen@networkplumber.org>
> > > Signed-off-by: Christoph Paasch <cpaasch@apple.com>
> >
> > Applied, thanks Christoph.
>
> I see that this patch is not yet in your repo.
>
> With the recent changes that went in, it also won't apply cleanly.
>
> Do you want me to rebase & resubmit the patch?
>
>
> Christoph
Not sure where it got lost. Please resubmit against net-next branch
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-31 21:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26 18:10 [PATCH iproute2] ip: add fastopen_no_cookie option to ip route Christoph Paasch
2017-10-27 6:40 ` Stephen Hemminger
2017-10-31 19:35 ` Christoph Paasch
2017-10-31 21:20 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).