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: <87r0xjdxis.fsf@nvidia.com>
Date:   Thu, 1 Dec 2022 15:10:00 +0100
From:   Petr Machata <petrm@...dia.com>
To:     Petr Machata <petrm@...dia.com>
CC:     David Ahern <dsahern@...nel.org>,
        Daniel Machon <daniel.machon@...rochip.com>,
        <netdev@...r.kernel.org>, <stephen@...workplumber.org>,
        <maxime.chevallier@...tlin.com>, <vladimir.oltean@....com>,
        <UNGLinuxDriver@...rochip.com>
Subject: Re: [PATCH iproute2-next v2 1/2] dcb: add new pcp-prio parameter to
 dcb app


Petr Machata <petrm@...dia.com> writes:

> David Ahern <dsahern@...nel.org> writes:
>
>> On 11/28/22 5:38 AM, Daniel Machon wrote:
>>> @@ -344,6 +420,17 @@ static int dcb_app_print_key_dscp(__u16 protocol)
>>>  	return print_uint(PRINT_ANY, NULL, "%d:", protocol);
>>>  }
>>>  
>>> +static int dcb_app_print_key_pcp(__u16 protocol)
>>> +{
>>> +	/* Print in numerical form, if protocol value is out-of-range */
>>> +	if (protocol > 15) {
>>
>> 15 is used in a number of places in this patch. What's the significance
>> and can you give it a name that identifies the meaning?
>
> Here in particular, it is ARRAY_LENGTH(pcp_names), and I agree, it would
> be better to express it this way.

(protocol >= ARRAY_LENGTH(pcp_names) obviously, not >)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ