aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sch_generic.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2015-05-11 13:50:41 -0400
committerDavid S. Miller <davem@davemloft.net>2015-05-13 15:08:14 -0400
commite578d9c02587d57bfa7b560767c698a668a468c6 (patch)
treea24a35260c20cae8a990ff71862ab68d92a04d84 /include/net/sch_generic.h
parentb04096ff33a977c01c8780ca3ee129dbd641bad4 (diff)
net: sched: use counter to break reclassify loops
Seems all we want here is to avoid endless 'goto reclassify' loop. tc_classify_compat even resets this counter when something other than TC_ACT_RECLASSIFY is returned, so this skb-counter doesn't break hypothetical loops induced by something other than perpetual TC_ACT_RECLASSIFY return values. skb_act_clone is now identical to skb_clone, so just use that. Tested with following (bogus) filter: tc filter add dev eth0 parent ffff: \ protocol ip u32 match u32 0 0 police rate 10Kbit burst \ 64000 mtu 1500 action reclassify Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r--include/net/sch_generic.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 1b0a2e88ed2b..2738f6f87908 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -739,21 +739,6 @@ static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen)
739 return rtab->data[slot]; 739 return rtab->data[slot];
740} 740}
741 741
742#ifdef CONFIG_NET_CLS_ACT
743static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask,
744 int action)
745{
746 struct sk_buff *n;
747
748 n = skb_clone(skb, gfp_mask);
749
750 if (n) {
751 n->tc_verd = SET_TC_VERD(n->tc_verd, 0);
752 }
753 return n;
754}
755#endif
756
757struct psched_ratecfg { 742struct psched_ratecfg {
758 u64 rate_bytes_ps; /* bytes per second */ 743 u64 rate_bytes_ps; /* bytes per second */
759 u32 mult; 744 u32 mult;