> From: David Marchand [mailto:david.march...@redhat.com] > Sent: Monday, 10 June 2024 17.19 > > Hello, > > On Fri, Jun 7, 2024 at 5:10 PM Paul Szczepanek <paul.szczepa...@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.