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: <87cz93fky0.fsf@nvidia.com>
Date:   Thu, 1 Dec 2022 11:57:13 +0100
From:   Petr Machata <petrm@...dia.com>
To:     David Ahern <dsahern@...nel.org>
CC:     Daniel Machon <daniel.machon@...rochip.com>,
        <netdev@...r.kernel.org>, <stephen@...workplumber.org>,
        <petrm@...dia.com>, <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


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? i.e., protocol
> is a u16 why the 15 limit? (and update all places accordingly)

In case of PCP, "protocol" is 0..7 for PCP values with DEI=0, and 8..15
for the same values respecively, but with DEI=1. That's fundamentally
where the 15 comes from.

Here in particular, it is ARRAY_LENGTH(pcp_names), and I agree, it would
be better to express it this way.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ