summaryrefslogtreecommitdiffstats
path: root/net/atm/clip.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-06-02 05:19:30 +0000
committerDavid S. Miller <davem@davemloft.net>2009-06-03 02:51:04 -0700
commitadf30907d63893e4208dfe3f5c88ae12bc2f25d5 (patch)
tree0f07542bb95de2ad537540868aba6cf87a86e17d /net/atm/clip.c
parent511c3f92ad5b6d9f8f6464be1b4f85f0422be91a (diff)
downloadlinux-adf30907d63893e4208dfe3f5c88ae12bc2f25d5.tar.bz2
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/atm/clip.c')
-rw-r--r--net/atm/clip.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c
index fb7623c080f8..e65a3b1477f8 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -369,16 +369,16 @@ static int clip_start_xmit(struct sk_buff *skb, struct net_device *dev)
unsigned long flags;
pr_debug("clip_start_xmit (skb %p)\n", skb);
- if (!skb->dst) {
- printk(KERN_ERR "clip_start_xmit: skb->dst == NULL\n");
+ if (!skb_dst(skb)) {
+ printk(KERN_ERR "clip_start_xmit: skb_dst(skb) == NULL\n");
dev_kfree_skb(skb);
dev->stats.tx_dropped++;
return 0;
}
- if (!skb->dst->neighbour) {
+ if (!skb_dst(skb)->neighbour) {
#if 0
- skb->dst->neighbour = clip_find_neighbour(skb->dst, 1);
- if (!skb->dst->neighbour) {
+ skb_dst(skb)->neighbour = clip_find_neighbour(skb_dst(skb), 1);
+ if (!skb_dst(skb)->neighbour) {
dev_kfree_skb(skb); /* lost that one */
dev->stats.tx_dropped++;
return 0;
@@ -389,7 +389,7 @@ static int clip_start_xmit(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_dropped++;
return 0;
}
- entry = NEIGH2ENTRY(skb->dst->neighbour);
+ entry = NEIGH2ENTRY(skb_dst(skb)->neighbour);
if (!entry->vccs) {
if (time_after(jiffies, entry->expires)) {
/* should be resolved */
@@ -406,7 +406,7 @@ static int clip_start_xmit(struct sk_buff *skb, struct net_device *dev)
}
pr_debug("neigh %p, vccs %p\n", entry, entry->vccs);
ATM_SKB(skb)->vcc = vcc = entry->vccs->vcc;
- pr_debug("using neighbour %p, vcc %p\n", skb->dst->neighbour, vcc);
+ pr_debug("using neighbour %p, vcc %p\n", skb_dst(skb)->neighbour, vcc);
if (entry->vccs->encap) {
void *here;