aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2012-08-12 16:09:59 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-14 17:45:07 -0400
commit7bd86cc282a458b66c41e3f6676de6656c99b8db (patch)
tree3d40c40d31d9556c095a9e50d54528886fdbcc79 /net
parentaefe5c0060639914cce7ed4947f2c030f615bebf (diff)
ipv4: Cache local output routes
Commit caacf05e5ad1abf causes big drop of UDP loop back performance. The cause of the regression is that we do not cache the local output routes. Each time we send a datagram from unconnected UDP socket, the kernel allocates a dst_entry and adds it to the rt_uncached_list. It creates lock contention on the rt_uncached_lock. Reported-by: Alex Shi <alex.shi@intel.com> Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/route.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index e4ba974f143..fd9ecb52c66 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2028,7 +2028,6 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *fl4)
2028 } 2028 }
2029 dev_out = net->loopback_dev; 2029 dev_out = net->loopback_dev;
2030 fl4->flowi4_oif = dev_out->ifindex; 2030 fl4->flowi4_oif = dev_out->ifindex;
2031 res.fi = NULL;
2032 flags |= RTCF_LOCAL; 2031 flags |= RTCF_LOCAL;
2033 goto make_route; 2032 goto make_route;
2034 } 2033 }