[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bc58ecd7-4665-748c-c7ea-001be64e8b4a@gmail.com>
Date: Tue, 18 Feb 2025 12:32:56 +0000
From: Edward Cree <ecree.xilinx@...il.com>
To: Jakub Kicinski <kuba@...nel.org>, Peter Seiderer <ps.report@....net>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>, Shuah Khan <shuah@...nel.org>,
Artem Chernyshev <artem.chernyshev@...-soft.ru>,
Nam Cao <namcao@...utronix.de>, Frederic Weisbecker <frederic@...nel.org>
Subject: Re: [PATCH net-next v5 8/8] net: pktgen: use defines for the various
dec/hex number parsing digits lengths
On 15/02/2025 04:11, Jakub Kicinski wrote:
> On Thu, 13 Feb 2025 12:00:25 +0100 Peter Seiderer wrote:
>> Use defines for the various dec/hex number parsing digits lengths
>> (hex32_arg/num_arg calls).
>
> I don't understand the value of this patch, TBH.
>
> Example:
>
> +#define HEX_2_DIGITS 2
>
> - len = hex32_arg(&user_buffer[i], 2, &tmp_value);
> + len = hex32_arg(&user_buffer[i], HEX_2_DIGITS, &tmp_value);
>
> The word hex is already there.
> There is still a two.
> I don't think the new define has any explanatory power?
Seems like the intent of the code is that the argument is one byte,
which just happens to take two digits to represent in hex.
Perhaps that would help to come up with more meaningful names for
these constants? (Can't think of good ones off the top of my head)
Powered by blists - more mailing lists