[PATCH v7 06/13] eal: define the EAL parameters in argparse format

David Marchand david.marchand at redhat.com
Tue Sep 30 15:16:17 CEST 2025


On Tue, 30 Sept 2025 at 14:58, Bruce Richardson
<bruce.richardson at intel.com> wrote:
>
> On Tue, Sep 30, 2025 at 02:45:49PM +0200, David Marchand wrote:
> > On Wed, 23 Jul 2025 at 18:21, Bruce Richardson
> > <bruce.richardson at intel.com> wrote:
> > > +/*
> > > + * list of EAL arguments as struct rte_argparse_arg.
> > > + * Format of each entry: long name, short name, help string, struct member name.
> > > + */
> > > +/* (Alphabetical) List of common options first */
> > > +LIST_ARG("--allow", "-a", "Add device to allow-list, causing DPDK to only use specified devices", allow)
> > > +STR_ARG("--base-virtaddr", NULL, "Base virtual address to reserve memory", base_virtaddr)
> > > +LIST_ARG("--block", "-b", "Add device to block-list, preventing DPDK from using the device", block)
> > > +STR_ARG("--coremask", "-c", "Hexadecimal bitmask of cores to use", coremask)
> > > +LIST_ARG("--driver-path", "-d", "Path to external driver shared object, or directory of drivers", driver_path)
> > > +STR_ARG("--force-max-simd-bitwidth", NULL, "Set max SIMD bitwidth to use in vector code paths", force_max_simd_bitwidth)
> > > +OPT_STR_ARG("--huge-unlink", NULL, "Unlink hugetlbfs files on exit (existing|always|never)", huge_unlink)
> > > +BOOL_ARG("--in-memory", NULL, "DPDK should not create shared mmap files in filesystem  (disables secondary process support)", in_memory)
> > > +STR_ARG("--iova-mode", NULL, "IOVA mapping mode, physical (pa)/virtual (va)", iova_mode)
> > > +STR_ARG("--lcores", "-l", "List of CPU cores to use", lcores)
> > > +BOOL_ARG("--legacy-mem", NULL, "Enable legacy memory behavior", legacy_mem)
> > > +OPT_STR_ARG("--log-color", NULL, "Enable/disable color in log output", log_color)
> > > +STR_ARG("--log-level", NULL, "Log level for loggers; use log-level=help for list of log types and levels", log_level)
> >
> > Previously, we could have multiple --log-level options.
> > While here, I think we will keep only the last value.
> >
> > Should it be a LIST_ARG?
> >
>
> Never thought of that. Will take a look. However, am I right in thinking
> that within a single log-level arg, you can have multiple level specifiers
> for different components?

All I see in eal_parse_log_level() is a difference in treatment
between regex, and pattern:.
Am I missing something?


-- 
David Marchand



More information about the dev mailing list