Commit 44f1ff0a authored by Eric Dumazet's avatar Eric Dumazet Committed by Stephen Hemminger

htb: report overhead attribute

"tc class show dev ..." omits the overhead attribute for HTB.

After patch I have :

tc class add dev $DEV parent 1: classid 1:1 est 1sec 4sec htb \
    rate 12Mbit mtu 1500 quantum 1514 overhead 20

tc class show dev $DEV
class htb 1:1 root prio 0 rate 12000Kbit overhead 20 ceil 12000Kbit
burst 1500b cburst 1500b
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
parent ecb928c8
...@@ -264,6 +264,8 @@ static int htb_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) ...@@ -264,6 +264,8 @@ static int htb_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
fprintf(f, "quantum %d ", (int)hopt->quantum); fprintf(f, "quantum %d ", (int)hopt->quantum);
} }
fprintf(f, "rate %s ", sprint_rate(hopt->rate.rate, b1)); fprintf(f, "rate %s ", sprint_rate(hopt->rate.rate, b1));
if (hopt->rate.overhead)
fprintf(f, "overhead %u ", hopt->rate.overhead);
buffer = tc_calc_xmitsize(hopt->rate.rate, hopt->buffer); buffer = tc_calc_xmitsize(hopt->rate.rate, hopt->buffer);
fprintf(f, "ceil %s ", sprint_rate(hopt->ceil.rate, b1)); fprintf(f, "ceil %s ", sprint_rate(hopt->ceil.rate, b1));
cbuffer = tc_calc_xmitsize(hopt->ceil.rate, hopt->cbuffer); cbuffer = tc_calc_xmitsize(hopt->ceil.rate, hopt->cbuffer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment