Message ID | 1440462740-23358-5-git-send-email-joestringer@nicira.com |
---|---|
State | Changes Requested |
Delegated to: | Pablo Neira |
Headers | show |
On 08/24/15 at 05:32pm, Joe Stringer wrote: > This variation on skb_dst_copy() doesn't require two skbs. > > Signed-off-by: Joe Stringer <joestringer@nicira.com> > Acked-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/include/net/dst.h b/include/net/dst.h index 0a9a723..6f282e7 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -286,13 +286,18 @@ static inline void skb_dst_drop(struct sk_buff *skb) } } -static inline void skb_dst_copy(struct sk_buff *nskb, const struct sk_buff *oskb) +static inline void __skb_dst_copy(struct sk_buff *nskb, unsigned long refdst) { - nskb->_skb_refdst = oskb->_skb_refdst; + nskb->_skb_refdst = refdst; if (!(nskb->_skb_refdst & SKB_DST_NOREF)) dst_clone(skb_dst(nskb)); } +static inline void skb_dst_copy(struct sk_buff *nskb, const struct sk_buff *oskb) +{ + __skb_dst_copy(nskb, oskb->_skb_refdst); +} + /** * skb_dst_force - makes sure skb dst is refcounted * @skb: buffer