diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
commit | 2ed0e21b30b53d3a94e204196e523e6c8f732b56 (patch) | |
tree | de2635426477d86338a9469ce09ba0626052288f /include/net/dst.h | |
parent | 0fa213310cd8fa7a51071cdcf130e26fa56e9549 (diff) | |
parent | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1244 commits)
pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US
ipv4: Fix fib_trie rebalancing
Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
Bluetooth: Fix Kconfig issue with RFKILL integration
PIM-SM: namespace changes
ipv4: update ARPD help text
net: use a deferred timer in rt_check_expire
ieee802154: fix kconfig bool/tristate muckup
bonding: initialization rework
bonding: use is_zero_ether_addr
bonding: network device names are case sensative
bonding: elminate bad refcount code
bonding: fix style issues
bonding: fix destructor
bonding: remove bonding read/write semaphore
bonding: initialize before registration
bonding: bond_create always called with default parameters
x_tables: Convert printk to pr_err
netfilter: conntrack: optional reliable conntrack event delivery
list_nulls: add hlist_nulls_add_head and hlist_nulls_del
...
Diffstat (limited to 'include/net/dst.h')
-rw-r--r-- | include/net/dst.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 6be3b082a070..7fc409c19b37 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -195,6 +195,12 @@ struct dst_entry * dst_clone(struct dst_entry * dst) | |||
195 | } | 195 | } |
196 | 196 | ||
197 | extern void dst_release(struct dst_entry *dst); | 197 | extern void dst_release(struct dst_entry *dst); |
198 | static inline void skb_dst_drop(struct sk_buff *skb) | ||
199 | { | ||
200 | if (skb->_skb_dst) | ||
201 | dst_release(skb_dst(skb)); | ||
202 | skb->_skb_dst = 0UL; | ||
203 | } | ||
198 | 204 | ||
199 | /* Children define the path of the packet through the | 205 | /* Children define the path of the packet through the |
200 | * Linux networking. Thus, destinations are stackable. | 206 | * Linux networking. Thus, destinations are stackable. |
@@ -246,7 +252,7 @@ static inline void dst_negative_advice(struct dst_entry **dst_p) | |||
246 | 252 | ||
247 | static inline void dst_link_failure(struct sk_buff *skb) | 253 | static inline void dst_link_failure(struct sk_buff *skb) |
248 | { | 254 | { |
249 | struct dst_entry * dst = skb->dst; | 255 | struct dst_entry *dst = skb_dst(skb); |
250 | if (dst && dst->ops && dst->ops->link_failure) | 256 | if (dst && dst->ops && dst->ops->link_failure) |
251 | dst->ops->link_failure(skb); | 257 | dst->ops->link_failure(skb); |
252 | } | 258 | } |
@@ -265,13 +271,13 @@ static inline void dst_set_expires(struct dst_entry *dst, int timeout) | |||
265 | /* Output packet to network from transport. */ | 271 | /* Output packet to network from transport. */ |
266 | static inline int dst_output(struct sk_buff *skb) | 272 | static inline int dst_output(struct sk_buff *skb) |
267 | { | 273 | { |
268 | return skb->dst->output(skb); | 274 | return skb_dst(skb)->output(skb); |
269 | } | 275 | } |
270 | 276 | ||
271 | /* Input packet from network to transport. */ | 277 | /* Input packet from network to transport. */ |
272 | static inline int dst_input(struct sk_buff *skb) | 278 | static inline int dst_input(struct sk_buff *skb) |
273 | { | 279 | { |
274 | return skb->dst->input(skb); | 280 | return skb_dst(skb)->input(skb); |
275 | } | 281 | } |
276 | 282 | ||
277 | static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie) | 283 | static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie) |