[libvirt] [PATCH v2 1/8] bandwidth: Attach sfq to leaf node

Michal Privoznik mprivozn at redhat.com
Tue Dec 11 10:42:46 UTC 2012


On 11.12.2012 02:01, Laine Stump wrote:
> On 12/04/2012 02:18 PM, 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.
> 
> What does sfq stand for anyway?

Stochastic Fairness Queuing.
I've found a nice picture and description of it:

http://opalsoft.net/qos/DS-25.htm

> 
> ACK.
> 
>> ---
>>  src/util/virnetdevbandwidth.c |    9 +++++++++
>>  1 files changed, 9 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c
>> index bddb788..49fc425 100644
>> --- a/src/util/virnetdevbandwidth.c
>> +++ b/src/util/virnetdevbandwidth.c
>> @@ -103,6 +103,15 @@ virNetDevBandwidthSet(const char *ifname,
>>  
>>          virCommandFree(cmd);
>>          cmd = virCommandNew(TC);
>> +        virCommandAddArgList(cmd, "qdisc", "add", "dev", ifname, "parent",
>> +                             "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);
> 
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
> 




More information about the libvir-list mailing list