On Wed, Jul 23, 2025 at 05:19:58PM +0100, Bruce Richardson wrote: > The ultimate of this patchset is to make it easier to run on systems > with large numbers of cores, by simplifying the process of using core > numbers >RTE_MAX_LCORE. The new EAL args "--lcores-remapped", also > shortened to just "-L", and "--lcoreid-base", are added to DPDK to > support this. However, in order to enable the addition of these new > flags, the first 10 patches of this set do cleanups, for reasons > explained below. > > When processing cmdline arguments in DPDK, we always do so with very > little context. So, for example, when processing the "-l" flag, we have > no idea whether there will be later a --proc-type=secondary flag. We > have all sorts of post-arg-processing checks in place to try and catch > these scenarios. > > To improve this situation, this patchset tries to simplify the handling > of argument processing, by explicitly doing an initial pass to collate > all arguments into a structure. Thereafter, the actual arg parsing is > done in a fixed order, meaning that e.g. when processing the > --main-lcore flag, we have already processed the service core flags. We > also can far quicker and easier check for conflicting options, since > they can all be checked for NULL/non-NULL in the arg structure > immediately after the struct has been populated. > > To do the initial argument gathering, this RFC uses the existing > argparse library in DPDK. With recent changes, and a few additional > patches at the start of this set, this library now meets our needs for > EAL argument parsing and allows us to not need to do direct getopt > argument processing inside EAL at all. > > An additional benefit of this work is that the argument parsing for EAL > is much more centralised into common options and the options list file. > This single list with ifdefs makes it clear to the viewer what options > are common across OS's, vs what are unix-only or linux-only. > > Once the cleanup and rework is done, adding the new options for > remapping cores becomes a lot simpler, since we can very easily check > for scenarios like multi-process and handle those appropriately. > > V7: > * expand the scope of the patchset beyond just cleanup to add in the > extra 3 patches for -L and --lcoreid-base option. > Recheck-request: rebase=main, iol-abi-testing

