|
|
f2ca2f |
commit b37f2c895d7876416a45e608754a39fff47ddf29
|
|
|
f2ca2f |
Author: Cong Wang <amwang@redhat.com>
|
|
|
f2ca2f |
Date: Sat Jun 15 09:39:19 2013 +0800
|
|
|
f2ca2f |
|
|
|
f2ca2f |
add quickack option to ip route
|
|
|
f2ca2f |
|
|
|
f2ca2f |
This patch adds quickack option to enable/disable TCP quick ack
|
|
|
f2ca2f |
mode for per-route.
|
|
|
f2ca2f |
|
|
|
f2ca2f |
Cc: Stephen Hemminger <stephen@networkplumber.org>
|
|
|
f2ca2f |
Cc: "David S. Miller" <davem@davemloft.net>
|
|
|
f2ca2f |
Cc: Thomas Graf <tgraf@suug.ch>
|
|
|
f2ca2f |
Signed-off-by: Cong Wang <amwang@redhat.com>
|
|
|
f2ca2f |
|
|
|
f2ca2f |
diff --git a/ip/iproute.c b/ip/iproute.c
|
|
|
f2ca2f |
index adef774..46710b2 100644
|
|
|
f2ca2f |
--- a/ip/iproute.c
|
|
|
f2ca2f |
+++ b/ip/iproute.c
|
|
|
f2ca2f |
@@ -52,6 +52,7 @@ static const char *mx_names[RTAX_MAX+1] = {
|
|
|
f2ca2f |
[RTAX_FEATURES] = "features",
|
|
|
f2ca2f |
[RTAX_RTO_MIN] = "rto_min",
|
|
|
f2ca2f |
[RTAX_INITRWND] = "initrwnd",
|
|
|
f2ca2f |
+ [RTAX_QUICKACK] = "quickack",
|
|
|
f2ca2f |
};
|
|
|
f2ca2f |
static void usage(void) __attribute__((noreturn));
|
|
|
f2ca2f |
|
|
|
f2ca2f |
@@ -79,6 +80,7 @@ static void usage(void)
|
|
|
f2ca2f |
fprintf(stderr, " [ window NUMBER] [ cwnd NUMBER ] [ initcwnd NUMBER ]\n");
|
|
|
f2ca2f |
fprintf(stderr, " [ ssthresh NUMBER ] [ realms REALM ] [ src ADDRESS ]\n");
|
|
|
f2ca2f |
fprintf(stderr, " [ rto_min TIME ] [ hoplimit NUMBER ] [ initrwnd NUMBER ]\n");
|
|
|
f2ca2f |
+ fprintf(stderr, " [ quickack BOOL ]\n");
|
|
|
f2ca2f |
fprintf(stderr, "TYPE := [ unicast | local | broadcast | multicast | throw |\n");
|
|
|
f2ca2f |
fprintf(stderr, " unreachable | prohibit | blackhole | nat ]\n");
|
|
|
f2ca2f |
fprintf(stderr, "TABLE_ID := [ local | main | default | all | NUMBER ]\n");
|
|
|
f2ca2f |
@@ -86,6 +88,7 @@ static void usage(void)
|
|
|
f2ca2f |
fprintf(stderr, "NHFLAGS := [ onlink | pervasive ]\n");
|
|
|
f2ca2f |
fprintf(stderr, "RTPROTO := [ kernel | boot | static | NUMBER ]\n");
|
|
|
f2ca2f |
fprintf(stderr, "TIME := NUMBER[s|ms]\n");
|
|
|
f2ca2f |
+ fprintf(stderr, "BOOL := [1|0]\n");
|
|
|
f2ca2f |
exit(-1);
|
|
|
f2ca2f |
}
|
|
|
f2ca2f |
|
|
|
f2ca2f |
@@ -885,6 +888,14 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
|
|
|
f2ca2f |
if (get_unsigned(&win, *argv, 0))
|
|
|
f2ca2f |
invarg("\"initrwnd\" value is invalid\n", *argv);
|
|
|
f2ca2f |
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_INITRWND, win);
|
|
|
f2ca2f |
+ } else if (matches(*argv, "quickack") == 0) {
|
|
|
f2ca2f |
+ unsigned quickack;
|
|
|
f2ca2f |
+ NEXT_ARG();
|
|
|
f2ca2f |
+ if (get_unsigned(&quickack, *argv, 0))
|
|
|
f2ca2f |
+ invarg("\"quickack\" value is invalid\n", *argv);
|
|
|
f2ca2f |
+ if (quickack != 1 && quickack != 0)
|
|
|
f2ca2f |
+ invarg("\"quickack\" value should be 0 or 1\n", *argv);
|
|
|
f2ca2f |
+ rta_addattr32(mxrta, sizeof(mxbuf), RTAX_QUICKACK, quickack);
|
|
|
f2ca2f |
} else if (matches(*argv, "rttvar") == 0) {
|
|
|
f2ca2f |
unsigned win;
|
|
|
f2ca2f |
NEXT_ARG();
|
|
|
f2ca2f |
diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in
|
|
|
f2ca2f |
index 2c35a97..01997fa 100644
|
|
|
f2ca2f |
--- a/man/man8/ip-route.8.in
|
|
|
f2ca2f |
+++ b/man/man8/ip-route.8.in
|
|
|
f2ca2f |
@@ -111,6 +111,8 @@ replace " } "
|
|
|
f2ca2f |
.IR NUMBER " ] [ "
|
|
|
f2ca2f |
.B initrwnd
|
|
|
f2ca2f |
.IR NUMBER " ]"
|
|
|
f2ca2f |
+.B quickack
|
|
|
f2ca2f |
+.IR BOOL " ]"
|
|
|
f2ca2f |
|
|
|
f2ca2f |
.ti -8
|
|
|
f2ca2f |
.IR TYPE " := [ "
|
|
|
f2ca2f |
@@ -401,6 +403,10 @@ Actual window size is this value multiplied by the MSS of the connection.
|
|
|
f2ca2f |
The default value is zero, meaning to use Slow Start value.
|
|
|
f2ca2f |
|
|
|
f2ca2f |
.TP
|
|
|
f2ca2f |
+.BI quickack " BOOL " "(3.11+ only)"
|
|
|
f2ca2f |
+Enable or disable quick ack for connections to this destination.
|
|
|
f2ca2f |
+
|
|
|
f2ca2f |
+.TP
|
|
|
f2ca2f |
.BI advmss " NUMBER " "(2.3.15+ only)"
|
|
|
f2ca2f |
the MSS ('Maximal Segment Size') to advertise to these
|
|
|
f2ca2f |
destinations when establishing TCP connections. If it is not given,
|