From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH 02/15] doc: cleanup cmd_line example documentation
Date: Thu, 11 Jun 2026 14:18:41 -0700 [thread overview]
Message-ID: <20260611212119.1026721-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20260611212119.1026721-1-stephen@networkplumber.org>
Semi-automated review of sample application for cmd_line.
Enhanced the command line sample application guide:
- Simplified the production code warning note for clarity
- Converted command descriptions to definition list format
- Fixed typo in "Ethernet Address Token" description
- Clarified the parsing and callback mechanism description
- Improved overall readability and consistency
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
doc/guides/sample_app_ug/cmd_line.rst | 35 +++++++++++++++------------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/doc/guides/sample_app_ug/cmd_line.rst b/doc/guides/sample_app_ug/cmd_line.rst
index e038667bd5..5b192bc615 100644
--- a/doc/guides/sample_app_ug/cmd_line.rst
+++ b/doc/guides/sample_app_ug/cmd_line.rst
@@ -13,29 +13,32 @@ Overview
The Command Line sample application is a simple application that
demonstrates the use of the command line interface in the DPDK.
This application is a readline-like interface that can be used
-to debug a DPDK application in a Linux* application environment.
+to debug DPDK applications in a Linux application environment.
.. note::
The rte_cmdline library should not be used in production code since
it is not validated to the same standard as other DPDK libraries.
- See also the "rte_cmdline library should not be used in production code due to limited testing" item
- in the "Known Issues" section of the Release Notes.
+ See also the Known Issues section of the Release Notes for the item
+ regarding limited testing of the rte_cmdline library.
The Command Line sample application supports some of the features of the GNU readline library
such as completion, cut/paste and other special bindings
-that make configuration and debug faster and easier.
+that make configuration and debugging faster and easier.
-The application shows how the ``cmdline`` library can be extended
+The application demonstrates how the ``cmdline`` library can be extended
to handle a list of objects.
There are three simple commands:
-* add obj_name IP: Add a new object with an IP/IPv6 address associated to it.
+``add obj_name IP``
+ Add a new object with an IP/IPv6 address associated with it.
-* del obj_name: Delete the specified object.
+``del obj_name``
+ Delete the specified object.
-* show obj_name: Show the IP associated with the specified object.
+``show obj_name``
+ Show the IP associated with the specified object.
.. note::
@@ -63,7 +66,7 @@ and the Environment Abstraction Layer (EAL) options.
Explanation
-----------
-The following sections provide explanation of the code.
+The following sections provide an explanation of the code.
EAL Initialization and cmdline Start
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -84,7 +87,7 @@ Then, a new command line object is created and starts to interact with the user
:end-before: >8 End of creating a new command line object.
:dedent: 1
-The ``cmdline_interact()`` function returns when the user types **Ctrl-d** and,
+The ``cmdline_interact()`` function returns when the user types **Ctrl-d**, and
in this case, the application exits.
Defining a cmdline Context
@@ -102,15 +105,15 @@ Each command (of type cmdline_parse_inst_t) is defined statically.
It contains a pointer to a callback function that is executed when the command is parsed,
an opaque pointer, a help string and a list of tokens in a NULL-terminated table.
-The rte_cmdline application provides a list of pre-defined token types:
+The rte_cmdline library provides a list of predefined token types:
-* String Token: Match a static string, a list of static strings or any string.
+* String Token: Match a static string, a list of static strings, or any string.
-* Number Token: Match a number that can be signed or unsigned, from 8-bit to 32-bit.
+* Number Token: Match a number that can be signed or unsigned, from 8 bits to 32 bits.
* IP Address Token: Match an IPv4 or IPv6 address or network.
-* Ethernet* Address Token: Match a MAC address.
+* Ethernet Address Token: Match a MAC address.
In this example, a new token type obj_list is defined and implemented
in the parse_obj_list.c and parse_obj_list.h files.
@@ -128,5 +131,5 @@ This command is composed of two tokens:
* The second token is an object that was previously added using the add command in the global_obj_list variable.
-Once the command is parsed, the rte_cmdline application fills a cmd_obj_del_show_result structure.
-A pointer to this structure is given as an argument to the callback function and can be used in the body of this function.
+Once the command is parsed, the rte_cmdline library fills a cmd_obj_del_show_result structure
+and passes a pointer to it as an argument to the callback function.
--
2.53.0
next prev parent reply other threads:[~2026-06-11 21:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-27 17:47 [PATCH] doc: reword sample application guides Nandini Persad
2025-02-16 23:09 ` [PATCH v2] " Nandini Persad
2025-02-20 12:26 ` Burakov, Anatoly
2026-06-11 21:18 ` [PATCH 00/15] doc: clean up " Stephen Hemminger
2026-06-11 21:18 ` [PATCH 01/15] doc: cleanups to bbdev sample application Stephen Hemminger
2026-06-11 21:18 ` Stephen Hemminger [this message]
2026-06-11 21:18 ` [PATCH 03/15] doc: cleanup the distribution sample application guide Stephen Hemminger
2026-06-11 21:18 ` [PATCH 04/15] doc: improve structure and clarity of compiling guide Stephen Hemminger
2026-06-11 21:18 ` [PATCH 05/15] doc: improve clarity and consistency in DMA sample app guide Stephen Hemminger
2026-06-15 9:50 ` fengchengwen
2026-06-11 21:18 ` [PATCH 06/15] doc: correct capitalization and formatting in ethtool guide Stephen Hemminger
2026-06-11 21:18 ` [PATCH 07/15] doc: improve clarity in eventdev, FIPS, and flow filtering Stephen Hemminger
2026-06-11 21:18 ` [PATCH 08/15] doc: enhance hello_world, intro, IP frag and pipeline Stephen Hemminger
2026-06-11 21:18 ` [PATCH 09/15] doc: improve IP reassembly, IPsec, multicast, and keep-alive Stephen Hemminger
2026-06-12 10:06 ` Radu Nicolau
2026-06-11 21:18 ` [PATCH 10/15] doc: enhance L2 forwarding sample application guides Stephen Hemminger
2026-06-11 21:18 ` [PATCH 11/15] doc: enhance multi-process, NTB, ordering, and PTP guides Stephen Hemminger
2026-06-11 21:18 ` [PATCH 12/15] doc: improve QoS, callbacks, EFD, and service cores guides Stephen Hemminger
2026-06-11 21:18 ` [PATCH 13/15] doc: enhance skeleton, pipeline, timer, and vhost guides Stephen Hemminger
2026-06-11 21:18 ` [PATCH 14/15] doc: improve vhost, VM power, and VMDq sample guides Stephen Hemminger
2026-06-11 21:18 ` [PATCH 15/15] doc: correct grammar and punctuation consistency issues Stephen Hemminger
2026-06-12 10:06 ` Radu Nicolau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260611212119.1026721-3-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox