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/core/dev.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/core/dev.c')
-rw-r--r-- | net/core/dev.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index e2fcc5f10177..34b49a6a22fd 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1693,10 +1693,9 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, | |||
1693 | * If device doesnt need skb->dst, release it right now while | 1693 | * If device doesnt need skb->dst, release it right now while |
1694 | * its hot in this cpu cache | 1694 | * its hot in this cpu cache |
1695 | */ | 1695 | */ |
1696 | if ((dev->priv_flags & IFF_XMIT_DST_RELEASE) && skb->dst) { | 1696 | if (dev->priv_flags & IFF_XMIT_DST_RELEASE) |
1697 | dst_release(skb->dst); | 1697 | skb_dst_drop(skb); |
1698 | skb->dst = NULL; | 1698 | |
1699 | } | ||
1700 | rc = ops->ndo_start_xmit(skb, dev); | 1699 | rc = ops->ndo_start_xmit(skb, dev); |
1701 | if (rc == 0) | 1700 | if (rc == 0) |
1702 | txq_trans_update(txq); | 1701 | txq_trans_update(txq); |