[PATCH v14 3/6] ptr_compress: add pointer compression library
Morten Brørup
mb at smartsharesystems.com
Mon Jun 10 17:37:33 CEST 2024
> From: David Marchand [mailto:david.marchand at redhat.com]
> Sent: Monday, 10 June 2024 17.19
>
> Hello,
>
> On Fri, Jun 7, 2024 at 5:10 PM Paul Szczepanek <paul.szczepanek at arm.com>
> wrote:
> >
> > Add a new utility header for compressing pointers. The provided
> > functions can store pointers as 32-bit or 16-bit offsets.
> >
[...]
> RTE_PTR_COMPRESS_CAN_COMPRESS_16_SHIFT and
> RTE_PTR_COMPRESS_CAN_COMPRESS_32_SHIFT do the same job.
> The only thing that differs is the size of the compressed space, so
> maybe this size could be passed as an input.
>
> No strong opinion though.
Conceptually I consider "16_shift" and "32_shift" unique compression algorithm names, like "zip", "rar", "gzip", "bz2", "xz" etc.
The function/macro naming convention of the library is:
rte_ptr_[de]compress_<function/macro><algorithm>
So I prefer keeping the two separate macros (one per algorithm), rather than combining them into one with the size as input parameter.
More information about the dev
mailing list