diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-06-02 01:19:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-03 05:51:04 -0400 |
commit | adf30907d63893e4208dfe3f5c88ae12bc2f25d5 (patch) | |
tree | 0f07542bb95de2ad537540868aba6cf87a86e17d /net/decnet/dn_neigh.c | |
parent | 511c3f92ad5b6d9f8f6464be1b4f85f0422be91a (diff) |
net: skb->dst accessors
Define three accessors to get/set dst attached to a skb
struct dst_entry *skb_dst(const struct sk_buff *skb)
void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
void skb_dst_drop(struct sk_buff *skb)
This one should replace occurrences of :
dst_release(skb->dst)
skb->dst = NULL;
Delete skb->dst field
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_neigh.c')
-rw-r--r-- | net/decnet/dn_neigh.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index 05b5aa05e50e..923786bd6d01 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c | |||
@@ -204,7 +204,7 @@ static void dn_short_error_report(struct neighbour *neigh, struct sk_buff *skb) | |||
204 | 204 | ||
205 | static int dn_neigh_output_packet(struct sk_buff *skb) | 205 | static int dn_neigh_output_packet(struct sk_buff *skb) |
206 | { | 206 | { |
207 | struct dst_entry *dst = skb->dst; | 207 | struct dst_entry *dst = skb_dst(skb); |
208 | struct dn_route *rt = (struct dn_route *)dst; | 208 | struct dn_route *rt = (struct dn_route *)dst; |
209 | struct neighbour *neigh = dst->neighbour; | 209 | struct neighbour *neigh = dst->neighbour; |
210 | struct net_device *dev = neigh->dev; | 210 | struct net_device *dev = neigh->dev; |
@@ -224,7 +224,7 @@ static int dn_neigh_output_packet(struct sk_buff *skb) | |||
224 | 224 | ||
225 | static int dn_long_output(struct sk_buff *skb) | 225 | static int dn_long_output(struct sk_buff *skb) |
226 | { | 226 | { |
227 | struct dst_entry *dst = skb->dst; | 227 | struct dst_entry *dst = skb_dst(skb); |
228 | struct neighbour *neigh = dst->neighbour; | 228 | struct neighbour *neigh = dst->neighbour; |
229 | struct net_device *dev = neigh->dev; | 229 | struct net_device *dev = neigh->dev; |
230 | int headroom = dev->hard_header_len + sizeof(struct dn_long_packet) + 3; | 230 | int headroom = dev->hard_header_len + sizeof(struct dn_long_packet) + 3; |
@@ -270,7 +270,7 @@ static int dn_long_output(struct sk_buff *skb) | |||
270 | 270 | ||
271 | static int dn_short_output(struct sk_buff *skb) | 271 | static int dn_short_output(struct sk_buff *skb) |
272 | { | 272 | { |
273 | struct dst_entry *dst = skb->dst; | 273 | struct dst_entry *dst = skb_dst(skb); |
274 | struct neighbour *neigh = dst->neighbour; | 274 | struct neighbour *neigh = dst->neighbour; |
275 | struct net_device *dev = neigh->dev; | 275 | struct net_device *dev = neigh->dev; |
276 | int headroom = dev->hard_header_len + sizeof(struct dn_short_packet) + 2; | 276 | int headroom = dev->hard_header_len + sizeof(struct dn_short_packet) + 2; |
@@ -313,7 +313,7 @@ static int dn_short_output(struct sk_buff *skb) | |||
313 | */ | 313 | */ |
314 | static int dn_phase3_output(struct sk_buff *skb) | 314 | static int dn_phase3_output(struct sk_buff *skb) |
315 | { | 315 | { |
316 | struct dst_entry *dst = skb->dst; | 316 | struct dst_entry *dst = skb_dst(skb); |
317 | struct neighbour *neigh = dst->neighbour; | 317 | struct neighbour *neigh = dst->neighbour; |
318 | struct net_device *dev = neigh->dev; | 318 | struct net_device *dev = neigh->dev; |
319 | int headroom = dev->hard_header_len + sizeof(struct dn_short_packet) + 2; | 319 | int headroom = dev->hard_header_len + sizeof(struct dn_short_packet) + 2; |