summaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorDavid S. Miller2012-07-10 13:01:57 +0200
committerDavid S. Miller2012-07-11 07:40:12 +0200
commit3e12939a2a67fbb4cbd962c3b9bc398c73319766 (patch)
treecb3d49ded9da2def0c08e9f5085af870aeadc993 /net/ipv4/route.c
parentinet: Minimize use of cached route inetpeer. (diff)
downloadkernel-qcow2-linux-3e12939a2a67fbb4cbd962c3b9bc398c73319766.tar.gz
kernel-qcow2-linux-3e12939a2a67fbb4cbd962c3b9bc398c73319766.tar.xz
kernel-qcow2-linux-3e12939a2a67fbb4cbd962c3b9bc398c73319766.zip
inet: Kill FLOWI_FLAG_PRECOW_METRICS.
No longer needed. TCP writes metrics, but now in it's own special cache that does not dirty the route metrics. Therefore there is no longer any reason to pre-cow metrics in this way. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index e376354dcb65..d4834e2914a0 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1658,7 +1658,7 @@ void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu,
struct rtable *rt;
flowi4_init_output(&fl4, oif, mark, RT_TOS(iph->tos), RT_SCOPE_UNIVERSE,
- protocol, flow_flags | FLOWI_FLAG_PRECOW_METRICS,
+ protocol, flow_flags,
iph->daddr, iph->saddr, 0, 0);
rt = __ip_route_output_key(net, &fl4);
if (!IS_ERR(rt)) {
@@ -1836,18 +1836,11 @@ static void rt_init_metrics(struct rtable *rt, const struct flowi4 *fl4,
{
struct inet_peer_base *base;
struct inet_peer *peer;
- int create = 0;
-
- /* If a peer entry exists for this destination, we must hook
- * it up in order to get at cached metrics.
- */
- if (fl4 && (fl4->flowi4_flags & FLOWI_FLAG_PRECOW_METRICS))
- create = 1;
base = inetpeer_base_ptr(rt->_peer);
BUG_ON(!base);
- peer = inet_getpeer_v4(base, rt->rt_dst, create);
+ peer = inet_getpeer_v4(base, rt->rt_dst, 0);
if (peer) {
__rt_set_peer(rt, peer);
rt->rt_peer_genid = rt_peer_genid();