Message ID | 1431556588-4859-1-git-send-email-fw@strlen.de |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Thu, 2015-05-14 at 00:36 +0200, Florian Westphal wrote: > commit d2788d34885d4ce5ba ("net: sched: further simplify handle_ing") > removed the call to qdisc_enqueue_root(). > > However, after this removal we no longer set qdisc pkt length. > This breaks traffic policing on ingress. > > This is the minimum fix: set qdisc pkt length before tc_classify. Acked-by: Eric Dumazet <edumazet@google.com> Thanks -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, May 14, 2015 at 12:36:28AM +0200, Florian Westphal wrote: > commit d2788d34885d4ce5ba ("net: sched: further simplify handle_ing") > removed the call to qdisc_enqueue_root(). > > However, after this removal we no longer set qdisc pkt length. > This breaks traffic policing on ingress. > > This is the minimum fix: set qdisc pkt length before tc_classify. Thanks! Acked-by: Alexei Starovoitov <ast@plumgrid.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 05/13/15 19:54, Alexei Starovoitov wrote: > On Thu, May 14, 2015 at 12:36:28AM +0200, Florian Westphal wrote: >> commit d2788d34885d4ce5ba ("net: sched: further simplify handle_ing") >> removed the call to qdisc_enqueue_root(). >> >> However, after this removal we no longer set qdisc pkt length. >> This breaks traffic policing on ingress. >> >> This is the minimum fix: set qdisc pkt length before tc_classify. > > Thanks! > Acked-by: Alexei Starovoitov <ast@plumgrid.com> > Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> cheers, jamal PS:- dont agree with the statement that policer is rarely used on ingress. -- To unsubscribe from this list: send the line "unsubscribe netdev" 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/net/core/dev.c b/net/core/dev.c index af54906..b3a92d6 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3646,8 +3646,9 @@ static inline struct sk_buff *handle_ing(struct sk_buff *skb, *pt_prev = NULL; } - qdisc_bstats_update_cpu(cl->q, skb); + qdisc_skb_cb(skb)->pkt_len = skb->len; skb->tc_verd = SET_TC_AT(skb->tc_verd, AT_INGRESS); + qdisc_bstats_update_cpu(cl->q, skb); switch (tc_classify(skb, cl, &cl_res)) { case TC_ACT_OK: