[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241205102019.lzntcfpsvzop4ncc@skbuf>
Date: Thu, 5 Dec 2024 12:20:19 +0200
From: Vladimir Oltean <vladimir.oltean@....com>
To: Jacob Keller <jacob.e.keller@...el.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
Przemek Kitszel <przemyslaw.kitszel@...el.com>,
Masahiro Yamada <masahiroy@...nel.org>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v9 00/10] lib: packing: introduce and use
(un)pack_fields
On Wed, Dec 04, 2024 at 05:22:46PM -0800, Jacob Keller wrote:
> This series improves the packing library with a new API for packing or
> unpacking a large number of fields at once with minimal code footprint. The
> API is then used to replace bespoke packing logic in the ice driver,
> preparing it to handle unpacking in the future. Finally, the ice driver has
> a few other cleanups related to the packing logic.
>
> The pack_fields and unpack_fields functions have the following improvements
> over the existing pack() and unpack() API:
>
> 1. Packing or unpacking a large number of fields takes significantly less
> code. This significantly reduces the .text size for an increase in the
> .data size which is much smaller.
>
> 2. The unpacked data can be stored in sizes smaller than u64 variables.
> This reduces the storage requirement both for runtime data structures,
> and for the rodata defining the fields. This scales with the number of
> fields used.
>
> 3. Most of the error checking is done at compile time, rather than
> runtime, via CHECK_PACKED_FIELD macros.
>
> The actual packing and unpacking code still uses the u64 size
> variables. However, these are converted to the appropriate field sizes when
> storing or reading the data from the buffer.
For the set:
Reviewed-by: Vladimir Oltean <vladimir.oltean@....com>
Thank you!
Powered by blists - more mailing lists