DPDK uses more than 32 cores
Question
I noticed that both CoreMask and SystemCores are only 32, can we support more?
Operating systems
No response
How many cores do you have? I think maybe we can make it to 64?
How many cores do you have? I think maybe we can make it to 64?
My current project aims to use 32 cores. However, since the MasterCore occupies one core, the current implementation can only use 30 cores, as the number of usable cores needs to be an even number. More generally, when using multiple network cards, each card or queue may require a dedicated core. Therefore, I believe we should increase the number to 128 or 256 to accommodate a wider range of needs. Perhaps we can gather more opinions on this.
128 or 256
Having the CoreMask be >64 cores would require a change of the CoreMask from a std::uint32_t to a dedicated struct as the bitmask would be split up between 2 64-bit integers. Perhaps we can add a CoreMaskLong if we don't want to break code depending on CoreMask being integral type?
Also I am not sure if DPDK can be initialized 256 cores. The highest I saw in documentation was initializing to core index 128.
128 or 256
Having the
CoreMaskbe >64 cores would require a change of theCoreMaskfrom astd::uint32_tto a dedicated struct as the bitmask would be split up between 2 64-bit integers. Perhaps we can add aCoreMaskLongif we don't want to break code depending onCoreMaskbeing integral type?Also I am not sure if DPDK can be initialized 256 cores. The highest I saw in documentation was initializing to core index 128.
As you said, if we need to change the CoreMask limit, we may need to design the code properly
DPDK sets its core limit using the RTE_MAX_LCORE define in rte_config.h, but you can adjust it to support 512 or even 1024 cores by changing the configuration and recompiling.
I suggest updating PcapPlusPlus to support an 'unlimited' coremask for more flexibility.
I can take this on, but I won't be able to start until a couple of weeks from now.
@SesomB Yes, it will be great. Thanks.
DPDK sets its core limit using the
RTE_MAX_LCOREdefine inrte_config.h, but you can adjust it to support 512 or even 1024 cores by changing the configuration and recompiling. I suggest updating PcapPlusPlus to support an 'unlimited' coremask for more flexibility.I can take this on, but I won't be able to start until a couple of weeks from now.
@SesomB I think that could be a nice improvement to this library (mostly for DPDK but not only). It'd be great if you can work on it!
@SesomB are you still planning to work on this task?