[PATCH v7 06/13] eal: define the EAL parameters in argparse format
Bruce Richardson
bruce.richardson at intel.com
Tue Sep 30 17:12:49 CEST 2025
On Tue, Sep 30, 2025 at 02:21:33PM +0200, David Marchand wrote:
> On Wed, 23 Jul 2025 at 18:21, Bruce Richardson
> <bruce.richardson at intel.com> wrote:
> > diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
> > index 226acea467..ebb9f7063d 100644
> > --- a/lib/eal/common/eal_common_options.c
> > +++ b/lib/eal/common/eal_common_options.c
> > @@ -28,11 +28,13 @@
> > #include <rte_version.h>
> > #include <rte_devargs.h>
> > #include <rte_memcpy.h>
> > +#include <sys/queue.h>
>
> Nit: system headers are usually going in the first group of includes.
> This can be fixed when applying.
>
I'll fix in this version anyway.
>
> [snip]
>
> > +struct rte_argparse eal_argparse = {
> > + .prog_name = "",
> > + .usage = "<DPDK EAL options> -- <App options>",
> > + .epilog = "For more information on EAL options, see the DPDK documentation at: \n"
> > + "\thttps://doc.dpdk.org/guides/" RTE_EXEC_ENV_NAME "_gsg/",
>
>
> It seems this comment got lost.
>
> Options don't change that often, but I would prefer we point at the
> right release doc, rather than origin/main.
> What do you think of:
>
> @@ -164,11 +164,17 @@ eal_usage(const struct rte_argparse *obj)
> },
> #define STR_ALIAS STR_ARG
>
> +#if RTE_VER_RELEASE == 99
> +#define DOC_SUFFIX "-" RTE_STR(RTE_VER_MAJOR)
> +#else
> +#define DOC_SUFFIX
> +#endif
> +
> struct rte_argparse eal_argparse = {
> .prog_name = "",
> .usage = "<DPDK EAL options> -- <App options>",
> .epilog = "For more information on EAL options, see the DPDK
> documentation at: \n"
> - "\thttps://doc.dpdk.org/guides/"
> RTE_EXEC_ENV_NAME "_gsg/",
> + "\thttps://doc.dpdk.org/guides" DOC_SUFFIX "/"
> RTE_EXEC_ENV_NAME "_gsg/",
>
Yes, that can work, though RTE_VER_MAJOR doesn't exist that I can see. Will
rework it a bit.
More information about the dev
mailing list