06/12/2024 12:01, Mattias Rönnblom: > On 2024-12-05 18:57, David Marchand wrote: > In retrospect, maybe the offset between lcore variable instances could > have been encoded into the handle, and thus one could use > different-sized offset for different variables.
Yes it would allow to allocate a minimum size, instead of having a default which is also a maximum limit size of an object. It is not too late to change the behavior as the API is experimental. > > The general question on whether lcore variables in constructor should > > be forbidden, is left to a later discussion. > > That discussion could be extended to cover the question if RTE_INIT() > type constructors should be used at all. Intuitively, it seems better if > all DPDK initialization, or at least all EAL init, happens at the time > of rte_eal_init(), in some ordered/organized fashion. Yes we may avoid constructors and instead have callbacks called in rte_eal_init(). In order to not break the RTE_INIT API, we could define some new macros for registering such rte_eal_init callbacks.