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] [day] [month] [year] [list]
Message-ID: <87zhc7v0d8.fsf@mellanox.com>
Date:   Mon, 23 Mar 2020 11:20:19 +0100
From:   Petr Machata <petrm@...lanox.com>
To:     David Ahern <dsahern@...il.com>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next 2/2] tc: q_red: Support 'nodrop' flag


David Ahern <dsahern@...il.com> writes:

> On 3/18/20 6:18 AM, Petr Machata wrote:
>> @@ -154,6 +161,7 @@ static int red_parse_opt(struct qdisc_util *qu, int argc, char **argv,
>>  	addattr_l(n, 1024, TCA_RED_STAB, sbuf, 256);
>>  	max_P = probability * pow(2, 32);
>>  	addattr_l(n, 1024, TCA_RED_MAX_P, &max_P, sizeof(max_P));
>> +	addattr_l(n, 1024, TCA_RED_FLAGS, &flags_bf, sizeof(flags_bf));
>
> the attr is a bitfield32 here ...
>
>>  	addattr_nest_end(n, tail);
>>  	return 0;
>>  }
>> @@ -183,6 +191,10 @@ static int red_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
>>  	    RTA_PAYLOAD(tb[TCA_RED_MAX_P]) >= sizeof(__u32))
>>  		max_P = rta_getattr_u32(tb[TCA_RED_MAX_P]);
>>
>> +	if (tb[TCA_RED_FLAGS] &&
>> +	    RTA_PAYLOAD(tb[TCA_RED_FLAGS]) >= sizeof(__u32))
>> +		qopt->flags = rta_getattr_u32(tb[TCA_RED_FLAGS]);
>> +
>
> but a u32 here. These should be consistent.

:-/ That's a leftover from previous ABI, thanks for catching it.
Will send a v2.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ