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 /drivers/infiniband/ulp/ipoib/ipoib_multicast.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 'drivers/infiniband/ulp/ipoib/ipoib_multicast.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 425e31112ed7..a0e97532e714 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -261,7 +261,7 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast, | |||
261 | 261 | ||
262 | skb->dev = dev; | 262 | skb->dev = dev; |
263 | 263 | ||
264 | if (!skb->dst || !skb->dst->neighbour) { | 264 | if (!skb_dst(skb) || !skb_dst(skb)->neighbour) { |
265 | /* put pseudoheader back on for next time */ | 265 | /* put pseudoheader back on for next time */ |
266 | skb_push(skb, sizeof (struct ipoib_pseudoheader)); | 266 | skb_push(skb, sizeof (struct ipoib_pseudoheader)); |
267 | } | 267 | } |
@@ -707,10 +707,10 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb) | |||
707 | 707 | ||
708 | out: | 708 | out: |
709 | if (mcast && mcast->ah) { | 709 | if (mcast && mcast->ah) { |
710 | if (skb->dst && | 710 | if (skb_dst(skb) && |
711 | skb->dst->neighbour && | 711 | skb_dst(skb)->neighbour && |
712 | !*to_ipoib_neigh(skb->dst->neighbour)) { | 712 | !*to_ipoib_neigh(skb_dst(skb)->neighbour)) { |
713 | struct ipoib_neigh *neigh = ipoib_neigh_alloc(skb->dst->neighbour, | 713 | struct ipoib_neigh *neigh = ipoib_neigh_alloc(skb_dst(skb)->neighbour, |
714 | skb->dev); | 714 | skb->dev); |
715 | 715 | ||
716 | if (neigh) { | 716 | if (neigh) { |