Skip to content

Commit

Permalink
net: make skb_dst_pop routine static
Browse files Browse the repository at this point in the history
As xfrm_output_one() is the only caller of skb_dst_pop(), we should
make skb_dst_pop() localized.

Signed-off-by: Ying Xue <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ying-xue authored and davem330 committed May 13, 2015
1 parent cffc642 commit 9449c3c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 0 additions & 12 deletions include/net/dst.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,18 +349,6 @@ static inline void skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev,
__skb_tunnel_rx(skb, dev, net);
}

/* Children define the path of the packet through the
* Linux networking. Thus, destinations are stackable.
*/

static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb)
{
struct dst_entry *child = dst_clone(skb_dst(skb)->child);

skb_dst_drop(skb);
return child;
}

int dst_discard_sk(struct sock *sk, struct sk_buff *skb);
static inline int dst_discard(struct sk_buff *skb)
{
Expand Down
12 changes: 12 additions & 0 deletions net/xfrm/xfrm_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ static int xfrm_skb_check_space(struct sk_buff *skb)
return pskb_expand_head(skb, nhead, ntail, GFP_ATOMIC);
}

/* Children define the path of the packet through the
* Linux networking. Thus, destinations are stackable.
*/

static struct dst_entry *skb_dst_pop(struct sk_buff *skb)
{
struct dst_entry *child = dst_clone(skb_dst(skb)->child);

skb_dst_drop(skb);
return child;
}

static int xfrm_output_one(struct sk_buff *skb, int err)
{
struct dst_entry *dst = skb_dst(skb);
Expand Down

0 comments on commit 9449c3c

Please sign in to comment.