Commit 5626a24a authored by Patrick McHardy's avatar Patrick McHardy Committed by Stephen Hemminger

Add support for SFQ xstats

[IPROUTE]: Add support for SFQ xstats
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarStephen Hemminger <stephen.hemminger@vyatta.com>
parent f31a37f7
...@@ -150,6 +150,11 @@ struct tc_sfq_qopt ...@@ -150,6 +150,11 @@ struct tc_sfq_qopt
unsigned flows; /* Maximal number of flows */ unsigned flows; /* Maximal number of flows */
}; };
struct tc_sfq_xstats
{
__u32 allot;
};
/* /*
* NOTE: limit, divisor and flows are hardwired to code at the moment. * NOTE: limit, divisor and flows are hardwired to code at the moment.
* *
......
...@@ -100,8 +100,25 @@ static int sfq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) ...@@ -100,8 +100,25 @@ static int sfq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0; return 0;
} }
static int sfq_print_xstats(struct qdisc_util *qu, FILE *f,
struct rtattr *xstats)
{
struct tc_sfq_xstats *st;
if (xstats == NULL)
return 0;
if (RTA_PAYLOAD(xstats) < sizeof(*st))
return -1;
st = RTA_DATA(xstats);
fprintf(f, " allot %d ", st->allot);
fprintf(f, "\n");
return 0;
}
struct qdisc_util sfq_qdisc_util = { struct qdisc_util sfq_qdisc_util = {
.id = "sfq", .id = "sfq",
.parse_qopt = sfq_parse_opt, .parse_qopt = sfq_parse_opt,
.print_qopt = sfq_print_opt, .print_qopt = sfq_print_opt,
.print_xstats = sfq_print_xstats,
}; };
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