1 diff -Nur iproute2.org/tc/q_esfq.c iproute2/tc/q_esfq.c
2 --- iproute2.org/tc/q_esfq.c 2003-10-12 12:19:27.537543736 +0200
3 +++ iproute2/tc/q_esfq.c 2003-10-12 12:07:04.928437480 +0200
6 memset(&opt, 0, sizeof(opt));
8 - opt.hash_kind= TCA_SFQ_HASH_CLASSIC;
9 +// opt.hash_kind= TCA_SFQ_HASH_CLASSIC;
12 if (strcmp(*argv, "quantum") == 0) {
17 - } else if (strcmp(*argv, "hash") == 0) {
19 - if(strcmp(*argv,"classic") == 0) {
20 - opt.hash_kind= TCA_SFQ_HASH_CLASSIC;
22 - if(strcmp(*argv,"dst") == 0) {
23 - opt.hash_kind= TCA_SFQ_HASH_DST;
25 - if(strcmp(*argv,"src") == 0) {
26 - opt.hash_kind= TCA_SFQ_HASH_SRC;
28 - fprintf(stderr, "Illegal \"hash\"\n");
33 +// } else if (strcmp(*argv, "hash") == 0) {
35 +// if(strcmp(*argv,"classic") == 0) {
36 +// opt.hash_kind= TCA_SFQ_HASH_CLASSIC;
38 +// if(strcmp(*argv,"dst") == 0) {
39 +// opt.hash_kind= TCA_SFQ_HASH_DST;
41 +// if(strcmp(*argv,"src") == 0) {
42 +// opt.hash_kind= TCA_SFQ_HASH_SRC;
44 +// fprintf(stderr, "Illegal \"hash\"\n");
49 } else if (strcmp(*argv, "help") == 0) {
53 if (qopt->perturb_period)
54 fprintf(f, "perturb %dsec ", qopt->perturb_period);
56 - fprintf(f,"hash: ");
57 - switch(qopt->hash_kind)
59 - case TCA_SFQ_HASH_CLASSIC:
60 - fprintf(f,"classic");
62 - case TCA_SFQ_HASH_DST:
65 - case TCA_SFQ_HASH_SRC:
69 - fprintf(f,"Unknown");
72 +// fprintf(f,"hash: ");
73 +// switch(qopt->hash_kind)
75 +// case TCA_SFQ_HASH_CLASSIC:
76 +// fprintf(f,"classic");
78 +// case TCA_SFQ_HASH_DST:
81 +// case TCA_SFQ_HASH_SRC:
85 +// fprintf(f,"Unknown");
90 static int esfq_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
91 diff -Nur iproute2.org/tc/q_htb.c iproute2/tc/q_htb.c
92 --- iproute2.org/tc/q_htb.c 2003-10-12 12:19:27.462555136 +0200
93 +++ iproute2/tc/q_htb.c 2003-10-12 12:16:53.721927264 +0200
95 struct tc_htb_glob opt;
98 - opt.rate2quantum = 10; opt.defcls = 1; opt.use_dcache = 0;
99 + opt.rate2quantum = 10; opt.defcls = 1;
100 +// opt.use_dcache = 0;
105 if (*p<'0' || *p>'3') break;
106 opt.debug |= (*p-'0')<<(2*i);
108 - } else if (matches(*argv, "dcache") == 0) {
109 - opt.use_dcache = 1;
110 +// } else if (matches(*argv, "dcache") == 0) {
111 +// opt.use_dcache = 1;
113 fprintf(stderr, "What is \"%s\"?\n", *argv);
118 memset(&opt, 0, sizeof(opt)); mtu = 1600; /* eth packet len */
119 - opt.injectd = 100; /* disable injecting */
120 +// opt.injectd = 100; /* disable injecting */
123 if (matches(*argv, "prio") == 0) {
124 @@ -168,11 +169,11 @@
125 if (get_u32(&mtu, *argv, 10)) {
126 explain1("mtu"); return -1;
128 - } else if (matches(*argv, "inject") == 0) {
130 - if (get_u8(&opt.injectd, *argv, 10)) {
131 - explain1("inject"); return -1;
133 +// } else if (matches(*argv, "inject") == 0) {
135 +// if (get_u8(&opt.injectd, *argv, 10)) {
136 +// explain1("inject"); return -1;
138 } else if (matches(*argv, "burst") == 0 ||
139 strcmp(*argv, "buffer") == 0 ||
140 strcmp(*argv, "maxburst") == 0) {
141 @@ -306,10 +307,10 @@
142 gopt = RTA_DATA(tb[TCA_HTB_INIT]);
143 if (RTA_PAYLOAD(tb[TCA_HTB_INIT]) < sizeof(*gopt)) return -1;
145 - fprintf(f, "r2q %d default %x dcache %d\n"
146 - " deq_util 1/%d deq_rate %d trials_per_deq %d\n dcache_hits %u direct_packets %u",
147 - gopt->rate2quantum,gopt->defcls,gopt->use_dcache,1000000/(1+gopt->utilz),
148 - gopt->deq_rate, gopt->trials/(1+gopt->deq_rate),gopt->dcache_hits,gopt->direct_pkts);
149 +// fprintf(f, "r2q %d default %x dcache %d\n"
150 +// " deq_util 1/%d deq_rate %d trials_per_deq %d\n dcache_hits %u direct_packets %u",
151 +// gopt->rate2quantum,gopt->defcls,gopt->use_dcache,1000000/(1+gopt->utilz),
152 +// gopt->deq_rate, gopt->trials/(1+gopt->deq_rate),gopt->dcache_hits,gopt->direct_pkts);
159 st = RTA_DATA(xstats);
160 - fprintf(f, " lended: %u borrowed: %u giants: %u injects: %u\n",
161 - st->lends,st->borrows,st->giants,st->injects);
162 + fprintf(f, " lended: %u borrowed: %u giants: %u\n",
163 + st->lends,st->borrows,st->giants);
164 fprintf(f, " tokens: %d ctokens: %d\n", st->tokens,st->ctokens);