[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <30df1dc6-1206-4584-89de-e223e5f7d3ac@intel.com>
Date: Mon, 4 Nov 2024 11:06:29 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: Vladimir Oltean <olteanv@...il.com>, Andrew Morton
<akpm@...ux-foundation.org>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
<pabeni@...hat.com>, Tony Nguyen <anthony.l.nguyen@...el.com>, "Przemek
Kitszel" <przemyslaw.kitszel@...el.com>, Masahiro Yamada
<masahiroy@...nel.org>, <linux-kernel@...r.kernel.org>,
<netdev@...r.kernel.org>, Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH net-next v2 3/9] lib: packing: add pack_fields() and
unpack_fields()
On 11/3/2024 10:31 AM, Jakub Kicinski wrote:
> On Fri, 25 Oct 2024 17:04:55 -0700 Jacob Keller wrote:
>> +ifdef CONFIG_PACKING_CHECK_FIELDS_1
>> +HOSTCFLAGS_lib/gen_packing_checks.o += -DPACKING_CHECK_FIELDS_1
>> +endif
>> +ifdef CONFIG_PACKING_CHECK_FIELDS_2
>> +HOSTCFLAGS_lib/gen_packing_checks.o += -DPACKING_CHECK_FIELDS_2
>> +endif
> [...]
>> +ifdef CONFIG_PACKING_CHECK_FIELDS_49
>> +HOSTCFLAGS_lib/gen_packing_checks.o += -DPACKING_CHECK_FIELDS_49
>> +endif
>> +ifdef CONFIG_PACKING_CHECK_FIELDS_50
>> +HOSTCFLAGS_lib/gen_packing_checks.o += -DPACKING_CHECK_FIELDS_50
>
> This series is marked as Not Applicable in PW. Not sure why.
>
> I can't bring myself to revive it, tho, this isn't pretty.
> It'd be one thing to do the codegen and the ugly copy / paste
> 50 times in the lib/ but all drivers have to select all field
> counts they use..
>
> Since all you want is compile time checking and logic is quite
> well constrained - can we put the field definitions in a separate
> ro section and make modpost validate them?
>
This is a much better idea actually. I think I can figure that out.
> Also Documentation needs to be extended with basic use examples.
Will fix in v3
Powered by blists - more mailing lists