On 11/19/2012 11:51 AM, Michal Privoznik wrote:
SFQ is qdisc which doesn't really shape any traffic but
'just' re-arrange packets in sending buffer so no stream
starve. The goal is to ensure fairness. There is basically
only one configuration parameter (perturb) which is set to
advised value of 10.
If this is a part of adding floor, then it should be merged into the
earlier patch (2/11 I think?). If it is a good thing to have independent
of floor, then I think it should be put in right at the beginning of the
series (without the reference to hierarchical_class) so that if somebody
wants to backport just that patch, it will be easier (then in 2/11 you
would add the reference to hierarchical_class).
Otherwise ACK.
---
src/util/virnetdevbandwidth.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c
index 3abe7e2..b4ffc29 100644
--- a/src/util/virnetdevbandwidth.c
+++ b/src/util/virnetdevbandwidth.c
@@ -124,6 +124,16 @@ virNetDevBandwidthSet(const char *ifname,
virCommandFree(cmd);
cmd = virCommandNew(TC);
+ virCommandAddArgList(cmd, "qdisc", "add", "dev",
ifname, "parent",
+ hierarchical_class ? "1:2" : "1:1",
+ "handle", "2:", "sfq",
"perturb",
+ "10", NULL);
+
+ if (virCommandRun(cmd, NULL) < 0)
+ goto cleanup;
+
+ virCommandFree(cmd);
+ cmd = virCommandNew(TC);
virCommandAddArgList(cmd,"filter", "add", "dev",
ifname, "parent",
"1:0", "protocol", "ip",
"handle", "1", "fw",
"flowid", "1", NULL);