sch_cbs.c (3eb66e91a25497065c5322b1268cbc3953642227) sch_cbs.c (f6bab199315b70fd83fe3ee0947bc84c7a35f3d4)
1/*
2 * net/sched/sch_cbs.c Credit Based Shaper
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 74 unchanged lines hidden (view full) ---

83 struct sk_buff *(*dequeue)(struct Qdisc *sch);
84 struct Qdisc *qdisc;
85};
86
87static int cbs_child_enqueue(struct sk_buff *skb, struct Qdisc *sch,
88 struct Qdisc *child,
89 struct sk_buff **to_free)
90{
1/*
2 * net/sched/sch_cbs.c Credit Based Shaper
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 74 unchanged lines hidden (view full) ---

83 struct sk_buff *(*dequeue)(struct Qdisc *sch);
84 struct Qdisc *qdisc;
85};
86
87static int cbs_child_enqueue(struct sk_buff *skb, struct Qdisc *sch,
88 struct Qdisc *child,
89 struct sk_buff **to_free)
90{
91 unsigned int len = qdisc_pkt_len(skb);
91 int err;
92
93 err = child->ops->enqueue(skb, child, to_free);
94 if (err != NET_XMIT_SUCCESS)
95 return err;
96
92 int err;
93
94 err = child->ops->enqueue(skb, child, to_free);
95 if (err != NET_XMIT_SUCCESS)
96 return err;
97
97 qdisc_qstats_backlog_inc(sch, skb);
98 sch->qstats.backlog += len;
98 sch->q.qlen++;
99
100 return NET_XMIT_SUCCESS;
101}
102
103static int cbs_enqueue_offload(struct sk_buff *skb, struct Qdisc *sch,
104 struct sk_buff **to_free)
105{

--- 395 unchanged lines hidden ---
99 sch->q.qlen++;
100
101 return NET_XMIT_SUCCESS;
102}
103
104static int cbs_enqueue_offload(struct sk_buff *skb, struct Qdisc *sch,
105 struct sk_buff **to_free)
106{

--- 395 unchanged lines hidden ---