Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dtaht/tc-adv
Browse files Browse the repository at this point in the history
  • Loading branch information
chromi committed Jun 2, 2016
2 parents 7f7add6 + 8188b9d commit 3314230
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 25 deletions.
1 change: 0 additions & 1 deletion include/linux/pkt_sched.h
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
29 changes: 5 additions & 24 deletions tc/q_cake.c
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 = 0;
bool overhead_set = false;
int flowmode = -1;
Expand Down Expand Up @@ -141,14 +139,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 @@ -309,8 +299,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 @@ -327,7 +316,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 @@ -409,10 +397,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 @@ -426,9 +410,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 Expand Up @@ -505,17 +486,17 @@ static int cake_print_xstats(struct qdisc_util *qu, FILE *f,

switch(stnc->tin_cnt) {
case 4:
fprintf(f, " Bulk Best Effort Video Voice\n");
fprintf(f, " Bulk Best Effort Video Voice\n");
break;

case 5:
fprintf(f, " Low Loss Best Effort Low Delay Bulk Net Control\n");
fprintf(f, " Low Loss Best Effort Low Delay Bulk Net Control\n");
break;

default:
fprintf(f, " ");
fprintf(f, " ");
for(i=0; i < stnc->tin_cnt; i++)
fprintf(f, " Tin %u ", i);
fprintf(f, " Tin %u", i);
fprintf(f, "\n");
};

Expand Down

0 comments on commit 3314230

Please sign in to comment.