projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pxcab: remove 2.6.31 config
[openwrt.git]
/
target
/
linux
/
generic-2.6
/
patches-2.6.30
/
200-sched_esfq.patch
diff --git
a/target/linux/generic-2.6/patches-2.6.30/200-sched_esfq.patch
b/target/linux/generic-2.6/patches-2.6.30/200-sched_esfq.patch
index
7c80fbb
..
bf123ce
100644
(file)
--- a/
target/linux/generic-2.6/patches-2.6.30/200-sched_esfq.patch
+++ b/
target/linux/generic-2.6/patches-2.6.30/200-sched_esfq.patch
@@
-137,13
+137,16
@@
+#include <linux/notifier.h>
+#include <linux/init.h>
+#include <net/ip.h>
+#include <linux/notifier.h>
+#include <linux/init.h>
+#include <net/ip.h>
++#include <net/netlink.h>
+#include <linux/ipv6.h>
+#include <net/route.h>
+#include <linux/skbuff.h>
+#include <net/sock.h>
+#include <net/pkt_sched.h>
+#include <linux/jhash.h>
+#include <linux/ipv6.h>
+#include <net/route.h>
+#include <linux/skbuff.h>
+#include <net/sock.h>
+#include <net/pkt_sched.h>
+#include <linux/jhash.h>
++#ifdef CONFIG_NET_SCH_ESFQ_NFCT
+#include <net/netfilter/nf_conntrack.h>
+#include <net/netfilter/nf_conntrack.h>
++#endif
+
+/* Stochastic Fairness Queuing algorithm.
+ For more comments look at sch_sfq.c.
+
+/* Stochastic Fairness Queuing algorithm.
+ For more comments look at sch_sfq.c.
@@
-464,20
+467,17
@@
+ return NET_XMIT_CN;
+}
+
+ return NET_XMIT_CN;
+}
+
-+
-+static int esfq_requeue(struct sk_buff *skb, struct Qdisc* sch)
++static struct sk_buff *esfq_peek(struct Qdisc* sch)
+{
+ struct esfq_sched_data *q = qdisc_priv(sch);
+{
+ struct esfq_sched_data *q = qdisc_priv(sch);
-+ esfq_q_enqueue(skb, q, ESFQ_HEAD);
-+ sch->qstats.backlog += skb->len;
-+ if (++sch->q.qlen < q->limit - 1) {
-+ sch->qstats.requeues++;
-+ return 0;
-+ }
++ esfq_index a;
+
+
-+ sch->qstats.drops++;
-+ esfq_drop(sch);
-+ return NET_XMIT_CN;
++ /* No active slots */
++ if (q->tail == q->depth)
++ return NULL;
++
++ a = q->next[q->tail];
++ return skb_peek(&q->qs[a]);
+}
+
+static struct sk_buff *esfq_q_dequeue(struct esfq_sched_data *q)
+}
+
+static struct sk_buff *esfq_q_dequeue(struct esfq_sched_data *q)
@@
-602,13
+602,13
@@
+ }
+}
+
+ }
+}
+
-+static int esfq_q_init(struct esfq_sched_data *q, struct
rt
attr *opt)
++static int esfq_q_init(struct esfq_sched_data *q, struct
nl
attr *opt)
+{
+{
-+ struct tc_esfq_qopt *ctl =
RTA_DATA
(opt);
++ struct tc_esfq_qopt *ctl =
nla_data
(opt);
+ esfq_index p = ~0U/2;
+ int i;
+
+ esfq_index p = ~0U/2;
+ int i;
+
-+ if (opt && opt->
rta_len < RTA_LENGTH
(sizeof(*ctl)))
++ if (opt && opt->
nla_len < nla_attr_size
(sizeof(*ctl)))
+ return -EINVAL;
+
+ q->perturbation = 0;
+ return -EINVAL;
+
+ q->perturbation = 0;
@@
-620,7
+620,7
@@
+ q->tail = q->limit = q->depth = 128;
+
+ } else {
+ q->tail = q->limit = q->depth = 128;
+
+ } else {
-+ struct tc_esfq_qopt *ctl =
RTA_DATA
(opt);
++ struct tc_esfq_qopt *ctl =
nla_data
(opt);
+ if (ctl->quantum)
+ q->quantum = ctl->quantum;
+ q->perturb_period = ctl->perturb_period*HZ;
+ if (ctl->quantum)
+ q->quantum = ctl->quantum;
+ q->perturb_period = ctl->perturb_period*HZ;
@@
-673,7
+673,7
@@
+ return -ENOBUFS;
+}
+
+ return -ENOBUFS;
+}
+
-+static int esfq_init(struct Qdisc *sch, struct
rt
attr *opt)
++static int esfq_init(struct Qdisc *sch, struct
nl
attr *opt)
+{
+ struct esfq_sched_data *q = qdisc_priv(sch);
+ int err;
+{
+ struct esfq_sched_data *q = qdisc_priv(sch);
+ int err;
@@
-693,7
+693,7
@@
+ return 0;
+}
+
+ return 0;
+}
+
-+static int esfq_change(struct Qdisc *sch, struct
rt
attr *opt)
++static int esfq_change(struct Qdisc *sch, struct
nl
attr *opt)
+{
+ struct esfq_sched_data *q = qdisc_priv(sch);
+ struct esfq_sched_data new;
+{
+ struct esfq_sched_data *q = qdisc_priv(sch);
+ struct esfq_sched_data new;
@@
-744,7
+744,7
@@
+static int esfq_dump(struct Qdisc *sch, struct sk_buff *skb)
+{
+ struct esfq_sched_data *q = qdisc_priv(sch);
+static int esfq_dump(struct Qdisc *sch, struct sk_buff *skb)
+{
+ struct esfq_sched_data *q = qdisc_priv(sch);
-+ unsigned char *b = skb
->tail
;
++ unsigned char *b = skb
_tail_pointer(skb)
;
+ struct tc_esfq_qopt opt;
+
+ opt.quantum = q->quantum;
+ struct tc_esfq_qopt opt;
+
+ opt.quantum = q->quantum;
@@
-755,12
+755,12
@@
+ opt.flows = q->depth;
+ opt.hash_kind = q->hash_kind;
+
+ opt.flows = q->depth;
+ opt.hash_kind = q->hash_kind;
+
-+
RT
A_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
++
NL
A_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
+
+ return skb->len;
+
+
+ return skb->len;
+
-+
rtattr
_failure:
-+
skb_trim(skb, b - skb->data
);
++
nla_put
_failure:
++
nlmsg_trim(skb, b
);
+ return -1;
+}
+
+ return -1;
+}
+
@@
-772,7
+772,7
@@
+ .priv_size = sizeof(struct esfq_sched_data),
+ .enqueue = esfq_enqueue,
+ .dequeue = esfq_dequeue,
+ .priv_size = sizeof(struct esfq_sched_data),
+ .enqueue = esfq_enqueue,
+ .dequeue = esfq_dequeue,
-+ .
requeue = esfq_requeue
,
++ .
peek = esfq_peek
,
+ .drop = esfq_drop,
+ .init = esfq_init,
+ .reset = esfq_reset,
+ .drop = esfq_drop,
+ .init = esfq_init,
+ .reset = esfq_reset,
This page took
0.025282 seconds
and
4
git commands to generate.