diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2008-08-05 01:39:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-05 01:39:11 -0400 |
commit | c27f339af90bb874a7a9c680b17abfd32d4a727b (patch) | |
tree | 5af236e0b3835976c70c1d5daa2f30be11adf35b /net/sched/sch_htb.c | |
parent | 378a2f090f7a478704a372a4869b8a9ac206234e (diff) |
net_sched: Add qdisc __NET_XMIT_BYPASS flag
Patrick McHardy <kaber@trash.net> noticed that it would be nice to
handle NET_XMIT_BYPASS by NET_XMIT_SUCCESS with an internal qdisc flag
__NET_XMIT_BYPASS and to remove the mapping from dev_queue_xmit().
David Miller <davem@davemloft.net> spotted a serious bug in the first
version of this patch.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_htb.c')
-rw-r--r-- | net/sched/sch_htb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 538d79b489ae..be35422711a3 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -214,7 +214,7 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, | |||
214 | if ((cl = htb_find(skb->priority, sch)) != NULL && cl->level == 0) | 214 | if ((cl = htb_find(skb->priority, sch)) != NULL && cl->level == 0) |
215 | return cl; | 215 | return cl; |
216 | 216 | ||
217 | *qerr = NET_XMIT_BYPASS; | 217 | *qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS; |
218 | tcf = q->filter_list; | 218 | tcf = q->filter_list; |
219 | while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) { | 219 | while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) { |
220 | #ifdef CONFIG_NET_CLS_ACT | 220 | #ifdef CONFIG_NET_CLS_ACT |
@@ -567,7 +567,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
567 | } | 567 | } |
568 | #ifdef CONFIG_NET_CLS_ACT | 568 | #ifdef CONFIG_NET_CLS_ACT |
569 | } else if (!cl) { | 569 | } else if (!cl) { |
570 | if (ret == NET_XMIT_BYPASS) | 570 | if (ret & __NET_XMIT_BYPASS) |
571 | sch->qstats.drops++; | 571 | sch->qstats.drops++; |
572 | kfree_skb(skb); | 572 | kfree_skb(skb); |
573 | return ret; | 573 | return ret; |
@@ -612,7 +612,7 @@ static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch) | |||
612 | } | 612 | } |
613 | #ifdef CONFIG_NET_CLS_ACT | 613 | #ifdef CONFIG_NET_CLS_ACT |
614 | } else if (!cl) { | 614 | } else if (!cl) { |
615 | if (ret == NET_XMIT_BYPASS) | 615 | if (ret & __NET_XMIT_BYPASS) |
616 | sch->qstats.drops++; | 616 | sch->qstats.drops++; |
617 | kfree_skb(skb); | 617 | kfree_skb(skb); |
618 | return ret; | 618 | return ret; |