#
620b2696 |
| 05-Dec-2023 |
Bruce Richardson <bruce.richardson@intel.com> |
buildtools/cmdline: support optional parameters
Sometimes a user may want to have a command which takes an optional parameter. For commands with an optional constant string, this is no issue, as it
buildtools/cmdline: support optional parameters
Sometimes a user may want to have a command which takes an optional parameter. For commands with an optional constant string, this is no issue, as it can be configured as two separate commands, e.g.
start start tx_first.
However, if we want to have a variable parameter on the command, we hit issues, because variable tokens do not form part of the generated command names used for function and result-struct naming. To avoid duplicate name issues, we add a special syntax to allow the user to indicate that a particular variable parameter should be included in the name. Any leading variable names starting with a "__" will be included in command naming.
This then allows us to have:
start start tx_first start tx_first <UINT16>__n
without hitting any naming conflicts.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Sunil Kumar Kori <skori@marvell.com>
show more ...
|
#
fb8a2784 |
| 05-Dec-2023 |
Bruce Richardson <bruce.richardson@intel.com> |
buildtools/cmdline: add IPv4 and IPv6 address types
Add support for generating cmdline lib code to just match IPv4 addresses or IPv6 addresses, rather than IP addresses in general.
Signed-off-by: B
buildtools/cmdline: add IPv4 and IPv6 address types
Add support for generating cmdline lib code to just match IPv4 addresses or IPv6 addresses, rather than IP addresses in general.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Sunil Kumar Kori <skori@marvell.com>
show more ...
|
#
1cd1716b |
| 27-Oct-2023 |
Bruce Richardson <bruce.richardson@intel.com> |
buildtools/cmdline: support option strings
Add support to the commandline generator for option strings, where there are only a limited number of acceptable values to be passed as a parameter.
Signe
buildtools/cmdline: support option strings
Add support to the commandline generator for option strings, where there are only a limited number of acceptable values to be passed as a parameter.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
37666691 |
| 27-Oct-2023 |
Bruce Richardson <bruce.richardson@intel.com> |
buildtools: add a tool to generate cmdline boilerplate
Provide a "dpdk-cmdline-gen.py" script for application developers to quickly generate the boilerplate code necessary for using the cmdline libr
buildtools: add a tool to generate cmdline boilerplate
Provide a "dpdk-cmdline-gen.py" script for application developers to quickly generate the boilerplate code necessary for using the cmdline library.
Example of use: The script takes an input file with a list of commands the user wants in the app, where the parameter variables are tagged with the type. For example:
$ cat commands.list list add <UINT16>x <UINT16>y echo <STRING>message add socket <STRING>path quit
When run through the script as "./dpdk-cmdline-gen.py commands.list", the output will be the contents of a header file with all the boilerplate necessary for a commandline instance with those commands.
If the flag --stubs is passed, an output header filename must also be passed, in which case both a header file with the definitions and a C file with function stubs in it is written to disk. The separation is so that the header file can be rewritten at any future point to add more commands, while the C file can be kept as-is and extended by the user with any additional functions needed.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
449dc649 |
| 27-Oct-2023 |
Bruce Richardson <bruce.richardson@intel.com> |
doc: add cmdline programmer guide
The cmdline library was not documented in our programmers guide, so add a new chapter on it. This chapter covers step-by-step how to use the library, rather than fo
doc: add cmdline programmer guide
The cmdline library was not documented in our programmers guide, so add a new chapter on it. This chapter covers step-by-step how to use the library, rather than focusing on the library internals. This complements the existing cmdline example app document, providing more details on the process of using the library.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: David Marchand <david.marchand@redhat.com>
show more ...
|