Skip to content

Commit

Permalink
Merge pull request #10 from kdarbyshirebryant/nosquashwash
Browse files Browse the repository at this point in the history
Remove squash & wash 'feature'
  • Loading branch information
chromi committed Jun 1, 2016
2 parents 6585d74 + a5303c9 commit 9da3240
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
1 change: 0 additions & 1 deletion include/linux/pkt_sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,6 @@ enum {
TCA_CAKE_TARGET,
TCA_CAKE_AUTORATE,
TCA_CAKE_MEMORY,
TCA_CAKE_WASH,
__TCA_CAKE_MAX
};
#define TCA_CAKE_MAX (__TCA_CAKE_MAX - 1)
Expand Down
21 changes: 1 addition & 20 deletions tc/q_cake.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ static void explain(void)
" [ besteffort | precedence | diffserv8 | diffserv4* ]\n"
" [ flowblind | srchost | dsthost | hosts | flows* | dual-srchost | dual-dsthost | triple-isolate ]\n"
" [ atm | noatm* ] [ overhead N | conservative | raw* ]\n"
" [ wash | nowash* ]\n"
" [ memlimit LIMIT ]\n"
" (* marks defaults)\n");
}
Expand All @@ -70,7 +69,6 @@ static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
unsigned target = 0;
unsigned diffserv = 0;
unsigned memlimit = 0;
int wash = -1;
int overhead = -99999;
int flowmode = -1;
int atm = -1;
Expand Down Expand Up @@ -140,14 +138,6 @@ static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
} else if (strcmp(*argv, "diffserv-llt") == 0) {
diffserv = 5;

} else if (strcmp(*argv, "nowash") == 0) {
wash = 0;
} else if (strcmp(*argv, "wash") == 0) {
wash = 1;
} else if (strcmp(*argv, "squash") == 0) {
diffserv = 1; /* synonym for besteffort wash*/
wash = 1;

} else if (strcmp(*argv, "flowblind") == 0) {
flowmode = 0;
} else if (strcmp(*argv, "srchost") == 0) {
Expand Down Expand Up @@ -292,8 +282,7 @@ static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
addattr_l(n, 1024, TCA_CAKE_AUTORATE, &autorate, sizeof(autorate));
if (memlimit)
addattr_l(n, 1024, TCA_CAKE_MEMORY, &memlimit, sizeof(memlimit));
if (wash != -1)
addattr_l(n, 1024, TCA_CAKE_WASH, &wash, sizeof(wash));

tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
return 0;
}
Expand All @@ -310,7 +299,6 @@ static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
int overhead = 0;
int atm = 0;
int autorate = 0;
int wash = 0;
SPRINT_BUF(b1);
SPRINT_BUF(b2);

Expand Down Expand Up @@ -392,10 +380,6 @@ static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
break;
};
}
if (tb[TCA_CAKE_WASH] &&
RTA_PAYLOAD(tb[TCA_CAKE_WASH]) >= sizeof(__u32)) {
wash = rta_getattr_u32(tb[TCA_CAKE_WASH]);
}
if (tb[TCA_CAKE_ATM] &&
RTA_PAYLOAD(tb[TCA_CAKE_ATM]) >= sizeof(__u32)) {
atm = rta_getattr_u32(tb[TCA_CAKE_ATM]);
Expand All @@ -409,9 +393,6 @@ static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
interval = rta_getattr_u32(tb[TCA_CAKE_RTT]);
}

if (wash)
fprintf(f,"wash ");

if (interval)
fprintf(f, "rtt %s ", sprint_time(interval, b2));

Expand Down

0 comments on commit 9da3240

Please sign in to comment.