On Fri, 15 Nov 2024 15:50:08 +0800 Congjie Zhou <zcjie0...@qq.com> wrote:
> diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c > index e354efc..367d401 100644 > --- a/lib/eal/linux/eal_memalloc.c > +++ b/lib/eal/linux/eal_memalloc.c > @@ -16,6 +16,7 @@ > #include <fcntl.h> > #include <signal.h> > #include <setjmp.h> > +#include <inttypes.h> > #ifdef F_ADD_SEALS /* if file sealing is supported, so is memfd */ > #include <linux/memfd.h> > #define MEMFD_SUPPORTED > @@ -1447,8 +1448,8 @@ secondary_msl_create_walk(const struct rte_memseg_list > *msl, > local_msl = &local_memsegs[msl_idx]; > > /* create distinct fbarrays for each secondary */ > - snprintf(name, RTE_FBARRAY_NAME_LEN, "%s_%i", > - primary_msl->memseg_arr.name, getpid()); > + snprintf(name, RTE_FBARRAY_NAME_LEN, "%s_%i_%"PRIx64, > + primary_msl->memseg_arr.name, getpid(), rte_get_tsc_cycles()); > > ret = rte_fbarray_init(&local_msl->memseg_arr, name, > primary_msl->memseg_arr.len, Need to include <rte_cycles.h> to get the prototype rte_get_tsc_cycles()