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/sched/sch_teql.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/sched/sch_teql.c')
-rw-r--r-- | net/sched/sch_teql.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c index a886496bdc3a..cb1cb1e76b9a 100644 --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c | |||
@@ -222,7 +222,7 @@ __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device * | |||
222 | { | 222 | { |
223 | struct netdev_queue *dev_queue = netdev_get_tx_queue(dev, 0); | 223 | struct netdev_queue *dev_queue = netdev_get_tx_queue(dev, 0); |
224 | struct teql_sched_data *q = qdisc_priv(dev_queue->qdisc); | 224 | struct teql_sched_data *q = qdisc_priv(dev_queue->qdisc); |
225 | struct neighbour *mn = skb->dst->neighbour; | 225 | struct neighbour *mn = skb_dst(skb)->neighbour; |
226 | struct neighbour *n = q->ncache; | 226 | struct neighbour *n = q->ncache; |
227 | 227 | ||
228 | if (mn->tbl == NULL) | 228 | if (mn->tbl == NULL) |
@@ -262,8 +262,8 @@ static inline int teql_resolve(struct sk_buff *skb, | |||
262 | return -ENODEV; | 262 | return -ENODEV; |
263 | 263 | ||
264 | if (dev->header_ops == NULL || | 264 | if (dev->header_ops == NULL || |
265 | skb->dst == NULL || | 265 | skb_dst(skb) == NULL || |
266 | skb->dst->neighbour == NULL) | 266 | skb_dst(skb)->neighbour == NULL) |
267 | return 0; | 267 | return 0; |
268 | return __teql_resolve(skb, skb_res, dev); | 268 | return __teql_resolve(skb, skb_res, dev); |
269 | } | 269 | } |