aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-23 19:29:00 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-23 19:36:26 -0400
commit92101b3b2e3178087127709a556b091dae314e9e (patch)
tree06359f8823da3ed7617c5ea78e4a56bc5e958fea /net/sched
parentfe3edf45792a7d2f0edff4e2fcdd9a84c1a388a0 (diff)
ipv4: Prepare for change of rt->rt_iif encoding.
Use inet_iif() consistently, and for TCP record the input interface of cached RX dst in inet sock. rt->rt_iif is going to be encoded differently, so that we can legitimately cache input routes in the FIB info more aggressively. When the input interface is "use SKB device index" the rt->rt_iif will be set to zero. This forces us to move the TCP RX dst cache installation into the ipv4 specific code, and as well it should since doing the route caching for ipv6 is pointless at the moment since it is not inspected in the ipv6 input paths yet. Also, remove the unlikely on dst->obsolete, all ipv4 dsts have obsolete set to a non-zero value to force invocation of the check callback. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_route.c2
-rw-r--r--net/sched/em_meta.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c
index 36fec4227401..44f405cb9aaf 100644
--- a/net/sched/cls_route.c
+++ b/net/sched/cls_route.c
@@ -143,7 +143,7 @@ static int route4_classify(struct sk_buff *skb, const struct tcf_proto *tp,
143 if (head == NULL) 143 if (head == NULL)
144 goto old_method; 144 goto old_method;
145 145
146 iif = ((struct rtable *)dst)->rt_iif; 146 iif = inet_iif(skb);
147 147
148 h = route4_fastmap_hash(id, iif); 148 h = route4_fastmap_hash(id, iif);
149 if (id == head->fastmap[h].id && 149 if (id == head->fastmap[h].id &&
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c
index 4790c696cbce..4ab6e3325573 100644
--- a/net/sched/em_meta.c
+++ b/net/sched/em_meta.c
@@ -264,7 +264,7 @@ META_COLLECTOR(int_rtiif)
264 if (unlikely(skb_rtable(skb) == NULL)) 264 if (unlikely(skb_rtable(skb) == NULL))
265 *err = -1; 265 *err = -1;
266 else 266 else
267 dst->value = skb_rtable(skb)->rt_iif; 267 dst->value = inet_iif(skb);
268} 268}
269 269
270/************************************************************************** 270/**************************************************************************