diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-06-02 01:14:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-03 05:51:02 -0400 |
commit | 511c3f92ad5b6d9f8f6464be1b4f85f0422be91a (patch) | |
tree | 3e368d9a78f87eb9dd7ff9e57f4aab3f4a96e3b1 /include | |
parent | dfbf97f3ac980b69dfbc41c83a208211a38443e8 (diff) |
net: skb->rtable accessor
Define skb_rtable(const struct sk_buff *skb) accessor to get rtable from skb
Delete skb->rtable field
Setting rtable is not allowed, just set dst instead as rtable is an alias.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/skbuff.h | 6 | ||||
-rw-r--r-- | include/net/route.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index d4d7c666ca63..a3ae3c525833 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -324,7 +324,6 @@ struct sk_buff { | |||
324 | 324 | ||
325 | union { | 325 | union { |
326 | struct dst_entry *dst; | 326 | struct dst_entry *dst; |
327 | struct rtable *rtable; | ||
328 | unsigned long _skb_dst; | 327 | unsigned long _skb_dst; |
329 | }; | 328 | }; |
330 | #ifdef CONFIG_XFRM | 329 | #ifdef CONFIG_XFRM |
@@ -427,6 +426,11 @@ extern void skb_dma_unmap(struct device *dev, struct sk_buff *skb, | |||
427 | enum dma_data_direction dir); | 426 | enum dma_data_direction dir); |
428 | #endif | 427 | #endif |
429 | 428 | ||
429 | static inline struct rtable *skb_rtable(const struct sk_buff *skb) | ||
430 | { | ||
431 | return (struct rtable *)skb->_skb_dst; | ||
432 | } | ||
433 | |||
430 | extern void kfree_skb(struct sk_buff *skb); | 434 | extern void kfree_skb(struct sk_buff *skb); |
431 | extern void consume_skb(struct sk_buff *skb); | 435 | extern void consume_skb(struct sk_buff *skb); |
432 | extern void __kfree_skb(struct sk_buff *skb); | 436 | extern void __kfree_skb(struct sk_buff *skb); |
diff --git a/include/net/route.h b/include/net/route.h index 4e8cae0e5841..40f6346ef496 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -210,7 +210,7 @@ static inline struct inet_peer *rt_get_peer(struct rtable *rt) | |||
210 | 210 | ||
211 | static inline int inet_iif(const struct sk_buff *skb) | 211 | static inline int inet_iif(const struct sk_buff *skb) |
212 | { | 212 | { |
213 | return skb->rtable->rt_iif; | 213 | return skb_rtable(skb)->rt_iif; |
214 | } | 214 | } |
215 | 215 | ||
216 | #endif /* _ROUTE_H */ | 216 | #endif /* _ROUTE_H */ |