diff options
author | Eric Dumazet <edumazet@google.com> | 2012-06-20 01:02:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-23 00:47:33 -0400 |
commit | 7586eceb0abc0ea1c2b023e3e5d4dfd4ff40930a (patch) | |
tree | 79fc35a3afa23896ab3e6e00b4d9d1178bfee1df /net/ipv4/route.c | |
parent | 24ea818e305b92ad1fadcca015ae3b0c1222c497 (diff) |
ipv4: tcp: dont cache output dst for syncookies
Don't cache output dst for syncookies, as this adds pressure on IP route
cache and rcu subsystem for no gain.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Hans Schillstrom <hans.schillstrom@ericsson.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index a91f6d33804c..8d62d85e68dc 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1156,7 +1156,7 @@ restart: | |||
1156 | candp = NULL; | 1156 | candp = NULL; |
1157 | now = jiffies; | 1157 | now = jiffies; |
1158 | 1158 | ||
1159 | if (!rt_caching(dev_net(rt->dst.dev))) { | 1159 | if (!rt_caching(dev_net(rt->dst.dev)) || (rt->dst.flags & DST_NOCACHE)) { |
1160 | /* | 1160 | /* |
1161 | * If we're not caching, just tell the caller we | 1161 | * If we're not caching, just tell the caller we |
1162 | * were successful and don't touch the route. The | 1162 | * were successful and don't touch the route. The |
@@ -2582,6 +2582,9 @@ static struct rtable *__mkroute_output(const struct fib_result *res, | |||
2582 | 2582 | ||
2583 | rt_set_nexthop(rth, fl4, res, fi, type, 0); | 2583 | rt_set_nexthop(rth, fl4, res, fi, type, 0); |
2584 | 2584 | ||
2585 | if (fl4->flowi4_flags & FLOWI_FLAG_RT_NOCACHE) | ||
2586 | rth->dst.flags |= DST_NOCACHE; | ||
2587 | |||
2585 | return rth; | 2588 | return rth; |
2586 | } | 2589 | } |
2587 | 2590 | ||