Re: [PATCH net-next 3/8] lib: packing: add pack_fields() and unpack_fields()

From: Vladimir Oltean
Date: Sat Oct 19 2024 - 08:20:42 EST


On Fri, Oct 18, 2024 at 02:50:52PM -0700, Jacob Keller wrote:
> Przemek, Vladimir,
>
> What are your thoughts on the next steps here. Do we need to go back to
> the drawing board for how to handle these static checks?
>
> Do we try to reduce the size somewhat, or try to come up with a
> completely different approach to handling this? Do we revert back to
> run-time checks? Investigate some alternative for static checking that
> doesn't have this limitation requiring thousands of lines of macro?
>
> I'd like to figure out what to do next.

Please see the attached patch for an idea on how to reduce the size
of <include/generated/packing-checks.h>, in a way that should be
satisfactory for both ice and sja1105, as well as future users.