lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53719B3E.5040706@huawei.com>
Date:	Tue, 13 May 2014 12:10:38 +0800
From:	Yang Yingliang <yangyingliang@...wei.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	<stephen@...workplumber.org>, <netdev@...r.kernel.org>
Subject: Re: [PATCH iproute2 v2] fq: allow options of fair queue set to ~0U

On 2014/5/13 11:03, Eric Dumazet wrote:
> On Tue, 2014-05-13 at 10:23 +0800, Yang Yingliang wrote:
>> From: Yang Yingliang <yangyingliang@...wei.com>
>>
>> Some options of fair queue cannot be (~0U). It leads to maxrate
>> cannot be reset to unlimited because it cannot be (~0U).
>>
>> Suggested-by: Eric Dumazet <edumazet@...gle.com>
>> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
>> ---
>>  tc/q_fq.c | 36 ++++++++++++++++++++++++------------
>>  1 file changed, 24 insertions(+), 12 deletions(-)
>>
>> diff --git a/tc/q_fq.c b/tc/q_fq.c
>> index c1f658e..6a493a5 100644
>> --- a/tc/q_fq.c
>> +++ b/tc/q_fq.c
>> @@ -71,13 +71,19 @@ static unsigned int ilog2(unsigned int val)
>>  static int fq_parse_opt(struct qdisc_util *qu, int argc, char **argv,
>>  			struct nlmsghdr *n)
>>  {
>> -	unsigned int plimit = ~0U;
>> -	unsigned int flow_plimit = ~0U;
>> -	unsigned int quantum = ~0U;
>> -	unsigned int initial_quantum = ~0U;
>> +	unsigned int plimit;
>> +	unsigned int flow_plimit;
>> +	unsigned int quantum;
>> +	unsigned int initial_quantum;
>>  	unsigned int buckets = 0;
>> -	unsigned int maxrate = ~0U;
>> -	unsigned int defrate = ~0U;
>> +	unsigned int maxrate;
>> +	unsigned int defrate;
>> +	int set_plimit = 0;
>> +	int set_flow_plimit = 0;
>> +	int set_quantum = 0;
>> +	int set_initial_quantum = 0;
>> +	int set_maxrate = 0;
>> +	int set_defrate = 0;
>>  	int pacing = -1;
>>  	struct rtattr *tail;
>>  
>> @@ -88,12 +94,14 @@ static int fq_parse_opt(struct qdisc_util *qu, int argc, char **argv,
>>  				fprintf(stderr, "Illegal \"limit\"\n");
>>  				return -1;
>>  			}
>> +			set_plimit = 1;
>>  		} else if (strcmp(*argv, "flow_limit") == 0) {
>>  			NEXT_ARG();
>>  			if (get_unsigned(&flow_plimit, *argv, 0)) {
>>  				fprintf(stderr, "Illegal \"flow_limit\"\n");
>>  				return -1;
>>  			}
>> +			set_flow_plimit = 0;
> 
> 
> = 1; ?
> 
Yes, thanks!


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ