aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sch_generic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r--include/net/sch_generic.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index b35301b0c7b6..977ec06ed0c7 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -594,9 +594,16 @@ static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen)
594} 594}
595 595
596#ifdef CONFIG_NET_CLS_ACT 596#ifdef CONFIG_NET_CLS_ACT
597static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask) 597static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask,
598 int action)
598{ 599{
599 struct sk_buff *n = skb_clone(skb, gfp_mask); 600 struct sk_buff *n;
601
602 if ((action == TC_ACT_STOLEN || action == TC_ACT_QUEUED) &&
603 !skb_shared(skb))
604 n = skb_get(skb);
605 else
606 n = skb_clone(skb, gfp_mask);
600 607
601 if (n) { 608 if (n) {
602 n->tc_verd = SET_TC_VERD(n->tc_verd, 0); 609 n->tc_verd = SET_TC_VERD(n->tc_verd, 0);