On Wed, Apr 9, 2025 at 3:21 AM Andre Muezerie <andre...@linux.microsoft.com> wrote: > > v5: > - Rebased and updated to conform to new function versioning mechanism. > > v4: > - Added parameter "unit", which allows rte_size_to_str() to be smarter > about the need to append a space after the number. This keeps the > function easy to use and avoids the need for complex explanations > about the space that could be needed between number and multiple/unit. > - Changed the return type of rte_size_to_str() to be buf, or NULL on > error, allowing the function to be inlined. > - Removed a line wrap. > > v3: > - Added rte_size_to_str to version.map (marked experimental for 25.07) so > that symbol gets exported when building with -Ddefault_library=shared > - Added sample outputs > - Added a space between the number and the postfix (if a postfix is > present) > > Andre Muezerie (3): > eal: add function rte_size_to_str > hash_multiwriter_autotest: fix printf parameters > hash_readwrite_autotest: fix printf parameters > > app/test/test_hash_multiwriter.c | 14 +++++-- > app/test/test_hash_readwrite.c | 14 ++++++- > lib/eal/common/eal_common_string_fns.c | 54 ++++++++++++++++++++++++++ > lib/eal/include/rte_common.h | 34 ++++++++++++++++ > 4 files changed, 111 insertions(+), 5 deletions(-)
It looks odd that string formatting helpers are declared in rte_common.h. I would move those declarations to rte_string_fns.h but this can wait a followup patch since other helper was already in rte_common.h. Series applied, thanks. -- David Marchand