* [PATCH] Add initrwnd to iproute2
@ 2009-12-15 23:05 chavey
2009-12-26 19:08 ` Stephen Hemminger
0 siblings, 1 reply; 5+ messages in thread
From: chavey @ 2009-12-15 23:05 UTC (permalink / raw)
To: shemminger; +Cc: netdev, therbert, chavey, eric.dumazet
Add initrwnd option parsing to iproute. This option uses the new
rtnetlink init_rcvwnd to set the TCP initial receive window size
advertised by passive and active TCP connections.
Signed-off-by: Laurent Chavey <chavey@google.com>
--
doc/ip-cref.tex | 5 +++++
include/linux/rtnetlink.h | 2 ++
ip/iproute.c | 13 ++++++++++++-
3 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/doc/ip-cref.tex b/doc/ip-cref.tex
index bb4eb78..2f6511a 100644
--- a/doc/ip-cref.tex
+++ b/doc/ip-cref.tex
@@ -1324,7 +1324,12 @@ peers are allowed to send to us.
If it is not given, Linux uses the value selected with \verb|sysctl|
variable \verb|net/ipv4/tcp_reordering|.
+\item \verb|initrwnd NUMBER|
+--- [2.6.33+ only] Initial receive window size for connections to
+ this destination. The actual window size is this value multiplied
+ by the MSS (''Maximal Segment Size'') of the connection. The default
+ value is zero, meaning to use Slow Start value.
\item \verb|nexthop NEXTHOP|
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 63d1c69..3373544 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -371,6 +371,8 @@ enum
#define RTAX_FEATURES RTAX_FEATURES
RTAX_RTO_MIN,
#define RTAX_RTO_MIN RTAX_RTO_MIN
+ RTAX_INITRWND,
+#define RTAX_INITRWND RTAX_INITRWND
__RTAX_MAX
};
diff --git a/ip/iproute.c b/ip/iproute.c
index bf0f31b..5df1eaf 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -51,6 +51,7 @@ static const char *mx_names[RTAX_MAX+1] = {
[RTAX_INITCWND] = "initcwnd",
[RTAX_FEATURES] = "features",
[RTAX_RTO_MIN] = "rto_min",
+ [RTAX_INITRWND] = "initrwnd",
};
static void usage(void) __attribute__((noreturn));
@@ -73,7 +74,7 @@ static void usage(void)
fprintf(stderr, " [ rtt TIME ] [ rttvar TIME ]\n");
fprintf(stderr, " [ window NUMBER] [ cwnd NUMBER ] [ initcwnd NUMBER ]\n");
fprintf(stderr, " [ ssthresh NUMBER ] [ realms REALM ] [ src ADDRESS ]\n");
- fprintf(stderr, " [ rto_min TIME ]\n");
+ fprintf(stderr, " [ rto_min TIME ] [ initrwnd NUMBER ]\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");
@@ -842,6 +843,16 @@ int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
if (get_unsigned(&win, *argv, 0))
invarg("\"initcwnd\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_INITCWND, win);
+ } else if (matches(*argv, "initrwnd") == 0) {
+ unsigned win;
+ NEXT_ARG();
+ if (strcmp(*argv, "lock") == 0) {
+ mxlock |= (1<<RTAX_INITRWND);
+ NEXT_ARG();
+ }
+ if (get_unsigned(&win, *argv, 0))
+ invarg("\"initrwnd\" value is invalid\n", *argv);
+ rta_addattr32(mxrta, sizeof(mxbuf), RTAX_INITRWND, win);
} else if (matches(*argv, "rttvar") == 0) {
unsigned win;
NEXT_ARG();
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Add initrwnd to iproute2
2009-12-15 23:05 [PATCH] Add initrwnd to iproute2 chavey
@ 2009-12-26 19:08 ` Stephen Hemminger
2009-12-26 21:44 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2009-12-26 19:08 UTC (permalink / raw)
To: chavey; +Cc: netdev, therbert, chavey, eric.dumazet
On Tue, 15 Dec 2009 15:05:15 -0800
chavey@google.com wrote:
> Add initrwnd option parsing to iproute. This option uses the new
> rtnetlink init_rcvwnd to set the TCP initial receive window size
> advertised by passive and active TCP connections.
Holding off iproute2 change until kernel change is accepted
and merged
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Add initrwnd to iproute2
2009-12-26 19:08 ` Stephen Hemminger
@ 2009-12-26 21:44 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2009-12-26 21:44 UTC (permalink / raw)
To: shemminger; +Cc: chavey, netdev, therbert, eric.dumazet
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Sat, 26 Dec 2009 11:08:55 -0800
> On Tue, 15 Dec 2009 15:05:15 -0800
> chavey@google.com wrote:
>
>> Add initrwnd option parsing to iproute. This option uses the new
>> rtnetlink init_rcvwnd to set the TCP initial receive window size
>> advertised by passive and active TCP connections.
>
> Holding off iproute2 change until kernel change is accepted
> and merged
It is in net-next-2.6 already, so please add his patch to
your iproute2-next tree.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Add initrwnd to iproute2
@ 2009-12-15 22:19 chavey
2009-12-15 22:37 ` Eric Dumazet
0 siblings, 1 reply; 5+ messages in thread
From: chavey @ 2009-12-15 22:19 UTC (permalink / raw)
To: shemminger; +Cc: netdev, therber, chavey
Add initrwnd option parsing to iproute. This option uses the new
rtnetlink init_rcvwnd to set the TCP initial receive window size
advertised by passive and active TCP connections.
Signed-off-by: Laurent Chavey <chavey@google.com>
--
doc/ip-cref.tex | 5 +++++
include/linux/rtnetlink.h | 2 ++
ip/iproute.c | 13 ++++++++++++-
3 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/doc/ip-cref.tex b/doc/ip-cref.tex
index bb4eb78..30503c7 100644
--- a/doc/ip-cref.tex
+++ b/doc/ip-cref.tex
@@ -1324,7 +1324,12 @@ peers are allowed to send to us.
If it is not given, Linux uses the value selected with \verb|sysctl|
variable \verb|net/ipv4/tcp_reordering|.
+\item \verb|initrwnd NUMBER|
+--- [2.5.70+ only] Initial receive window size for connections to
+ this destination. The actual window size is this value multiplied
+ by the MSS (''Maximal Segment Size'') of the connection. The default
+ value is zero, meaning to use Slow Start value.
\item \verb|nexthop NEXTHOP|
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 63d1c69..3373544 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -371,6 +371,8 @@ enum
#define RTAX_FEATURES RTAX_FEATURES
RTAX_RTO_MIN,
#define RTAX_RTO_MIN RTAX_RTO_MIN
+ RTAX_INITRWND,
+#define RTAX_INITRWND RTAX_INITRWND
__RTAX_MAX
};
diff --git a/ip/iproute.c b/ip/iproute.c
index bf0f31b..5df1eaf 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -51,6 +51,7 @@ static const char *mx_names[RTAX_MAX+1] = {
[RTAX_INITCWND] = "initcwnd",
[RTAX_FEATURES] = "features",
[RTAX_RTO_MIN] = "rto_min",
+ [RTAX_INITRWND] = "initrwnd",
};
static void usage(void) __attribute__((noreturn));
@@ -73,7 +74,7 @@ static void usage(void)
fprintf(stderr, " [ rtt TIME ] [ rttvar TIME ]\n");
fprintf(stderr, " [ window NUMBER] [ cwnd NUMBER ] [ initcwnd NUMBER ]\n");
fprintf(stderr, " [ ssthresh NUMBER ] [ realms REALM ] [ src ADDRESS ]\n");
- fprintf(stderr, " [ rto_min TIME ]\n");
+ fprintf(stderr, " [ rto_min TIME ] [ initrwnd NUMBER ]\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");
@@ -842,6 +843,16 @@ int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
if (get_unsigned(&win, *argv, 0))
invarg("\"initcwnd\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_INITCWND, win);
+ } else if (matches(*argv, "initrwnd") == 0) {
+ unsigned win;
+ NEXT_ARG();
+ if (strcmp(*argv, "lock") == 0) {
+ mxlock |= (1<<RTAX_INITRWND);
+ NEXT_ARG();
+ }
+ if (get_unsigned(&win, *argv, 0))
+ invarg("\"initrwnd\" value is invalid\n", *argv);
+ rta_addattr32(mxrta, sizeof(mxbuf), RTAX_INITRWND, win);
} else if (matches(*argv, "rttvar") == 0) {
unsigned win;
NEXT_ARG();
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Add initrwnd to iproute2
2009-12-15 22:19 chavey
@ 2009-12-15 22:37 ` Eric Dumazet
0 siblings, 0 replies; 5+ messages in thread
From: Eric Dumazet @ 2009-12-15 22:37 UTC (permalink / raw)
To: chavey; +Cc: shemminger, netdev, therber
Le 15/12/2009 23:19, chavey@google.com a écrit :
> Add initrwnd option parsing to iproute. This option uses the new
> rtnetlink init_rcvwnd to set the TCP initial receive window size
> advertised by passive and active TCP connections.
>
> Signed-off-by: Laurent Chavey <chavey@google.com>
> --
> doc/ip-cref.tex | 5 +++++
> include/linux/rtnetlink.h | 2 ++
> ip/iproute.c | 13 ++++++++++++-
> 3 files changed, 19 insertions(+), 1 deletions(-)
>
> diff --git a/doc/ip-cref.tex b/doc/ip-cref.tex
> index bb4eb78..30503c7 100644
> --- a/doc/ip-cref.tex
> +++ b/doc/ip-cref.tex
> @@ -1324,7 +1324,12 @@ peers are allowed to send to us.
> If it is not given, Linux uses the value selected with \verb|sysctl|
> variable \verb|net/ipv4/tcp_reordering|.
>
> +\item \verb|initrwnd NUMBER|
>
> +--- [2.5.70+ only] Initial receive window size for connections to
> + this destination. The actual window size is this value multiplied
> + by the MSS (''Maximal Segment Size'') of the connection. The default
> + value is zero, meaning to use Slow Start value.
>
Maybe its true with google custom kernels, but for upstream, this is 2.6.33+ :)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-12-26 21:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-15 23:05 [PATCH] Add initrwnd to iproute2 chavey
2009-12-26 19:08 ` Stephen Hemminger
2009-12-26 21:44 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2009-12-15 22:19 chavey
2009-12-15 22:37 ` Eric Dumazet
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).