summaryrefslogtreecommitdiff
path: root/include/net/dst.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-06-17 11:06:17 (GMT)
committerIngo Molnar <mingo@elte.hu>2009-06-17 11:06:17 (GMT)
commita3d06cc6aa3e765dc2bf98626f87272dcf641dca (patch)
treeaa3e49b58f08d6c0ea55cdca4fb5e6c8ba6ae333 /include/net/dst.h
parent0990b1c65729012a63e0eeca93aaaafea4e9a064 (diff)
parent65795efbd380a832ae508b04dba8f8e53f0b84d9 (diff)
downloadlinux-fsl-qoriq-a3d06cc6aa3e765dc2bf98626f87272dcf641dca.tar.xz
Merge branch 'linus' into perfcounters/core
Conflicts: arch/x86/include/asm/kmap_types.h include/linux/mm.h include/asm-generic/kmap_types.h Merge reason: We crossed changes with kmap_types.h cleanups in mainline. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/net/dst.h')
-rw-r--r--include/net/dst.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/net/dst.h b/include/net/dst.h
index 6be3b08..7fc409c 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -195,6 +195,12 @@ struct dst_entry * dst_clone(struct dst_entry * dst)
}
extern void dst_release(struct dst_entry *dst);
+static inline void skb_dst_drop(struct sk_buff *skb)
+{
+ if (skb->_skb_dst)
+ dst_release(skb_dst(skb));
+ skb->_skb_dst = 0UL;
+}
/* Children define the path of the packet through the
* Linux networking. Thus, destinations are stackable.
@@ -246,7 +252,7 @@ static inline void dst_negative_advice(struct dst_entry **dst_p)
static inline void dst_link_failure(struct sk_buff *skb)
{
- struct dst_entry * dst = skb->dst;
+ struct dst_entry *dst = skb_dst(skb);
if (dst && dst->ops && dst->ops->link_failure)
dst->ops->link_failure(skb);
}
@@ -265,13 +271,13 @@ static inline void dst_set_expires(struct dst_entry *dst, int timeout)
/* Output packet to network from transport. */
static inline int dst_output(struct sk_buff *skb)
{
- return skb->dst->output(skb);
+ return skb_dst(skb)->output(skb);
}
/* Input packet from network to transport. */
static inline int dst_input(struct sk_buff *skb)
{
- return skb->dst->input(skb);
+ return skb_dst(skb)->input(skb);
}
static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie)