Synchronize options between print_usage() in main.c and the sample app
guide documentation (l3_forward.rst).

Specifically:
- Add missing options to print_usage() synopsis: --eth-link-speed,
  --disable-rss, --relax-rx-offload, --event-eth-rxqs, and --alg.
- Add missing option descriptions in print_usage(): --disable-rss and
  --relax-rx-offload.
- Add missing options to l3_forward.rst: --eth-link-speed,
  --rx-queue-size, --tx-queue-size, --mbcache, --disable-rss,
  --relax-rx-offload, and --alg.
- Remove obsolete --hash-entry-num from l3_forward.rst as the option
  has been ignored since commit f5251734c5e1 ("examples/l3fwd: remove
  hash entry number").

All 25 active long options are now fully documented and aligned across
main.c and l3_forward.rst.

Doing a pass of all the options shows main.c >= 2 and rst >= 2 for each
of them, proving no more omissions exist now.

$ for opt in $(grep -oP '#define CMD_(LINE|LINK)_OPT_\w+\s+"\K[^"]+' \
  examples/l3fwd/main.c | grep -v 'hash-entry-num'); do
    printf "%-20s: main.c: %2d, rst: %2d\n" "$opt" \
        "$(grep -c -- "--$opt" examples/l3fwd/main.c)" \
        "$(grep -c -- "--$opt" doc/guides/sample_app_ug/l3_forward.rst)"
done
config              : main.c:  2, rst:  5
eth-link-speed      : main.c:  2, rst:  2
rx-queue-size       : main.c:  2, rst:  2
tx-queue-size       : main.c:  2, rst:  2
eth-dest            : main.c:  2, rst:  2
no-numa             : main.c:  2, rst:  2
ipv6                : main.c:  2, rst:  3
max-pkt-len         : main.c:  2, rst:  2
parse-ptype         : main.c:  2, rst:  2
disable-rss         : main.c:  2, rst:  2
relax-rx-offload    : main.c:  2, rst:  2
per-port-pool       : main.c:  2, rst:  2
mode                : main.c:  4, rst:  8
eventq-sched        : main.c:  2, rst:  6
event-eth-rxqs      : main.c:  2, rst:  2
lookup              : main.c:  4, rst:  4
event-vector        : main.c:  4, rst:  4
event-vector-size   : main.c:  2, rst:  2
event-vector-tmo    : main.c:  2, rst:  2
rule_ipv4           : main.c:  2, rst:  6
rule_ipv6           : main.c:  2, rst:  6
alg                 : main.c:  2, rst:  2
rx-burst            : main.c:  2, rst:  2
tx-burst            : main.c:  2, rst:  2
mbcache             : main.c:  2, rst:  2

Bugzilla ID: 545

Signed-off-by: Andrei-Niculae Petre <[email protected]>
---
 .mailmap                                |  1 +
 doc/guides/sample_app_ug/l3_forward.rst | 28 +++++++++++++++++++------
 examples/l3fwd/main.c                   |  7 +++++++
 3 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/.mailmap b/.mailmap
index 754dd9e760..844deef539 100644
--- a/.mailmap
+++ b/.mailmap
@@ -115,6 +115,7 @@ Andre Richter <[email protected]>
 Andrea Arcangeli <[email protected]>
 Andrea Grandi <[email protected]>
 Andrea Panattoni <[email protected]>
+Andrei-Niculae Petre <[email protected]> <[email protected]>
 Andrew Bailey <[email protected]>
 Andrew Boyer <[email protected]> <[email protected]>
 Andrew Harvey <[email protected]>
diff --git a/doc/guides/sample_app_ug/l3_forward.rst 
b/doc/guides/sample_app_ug/l3_forward.rst
index 452bd8cc6c..996e01439c 100644
--- a/doc/guides/sample_app_ug/l3_forward.rst
+++ b/doc/guides/sample_app_ug/l3_forward.rst
@@ -77,19 +77,25 @@ The application has a number of command line options::
                              [-P]
                              [--lookup LOOKUP_METHOD]
                              --config(port,queue,lcore)[,(port,queue,lcore)]
+                             [--eth-link-speed SPEED]
+                             [--rx-queue-size NPKTS]
+                             [--tx-queue-size NPKTS]
                              [--rx-burst NPKTS]
                              [--tx-burst NPKTS]
+                             [--mbcache CACHESZ]
                              [--eth-dest=X,MM:MM:MM:MM:MM:MM]
                              [--max-pkt-len PKTLEN]
                              [--no-numa]
-                             [--hash-entry-num]
                              [--ipv6]
                              [--parse-ptype]
+                             [--disable-rss]
+                             [--relax-rx-offload]
                              [--per-port-pool]
                              [--mode]
                              [--eventq-sched]
                              [--event-eth-rxqs]
                              [--event-vector [--event-vector-size SIZE] 
[--event-vector-tmo NS]]
+                             [--alg ALG]
                              [-E]
                              [-L]
 
@@ -115,22 +121,35 @@ Where,
 
 * ``--config (port,queue,lcore)[,(port,queue,lcore)]:`` Determines which 
queues from which ports are mapped to which cores.
 
+* ``--eth-link-speed SPEED:`` Optional, forces link speed (e.g. 10, 100, 1000, 
10000 Mbps).
+
+* ``--rx-queue-size NPKTS:`` Optional, sets the number of Rx descriptors per 
queue (default 1024).
+
+* ``--tx-queue-size NPKTS:`` Optional, sets the number of Tx descriptors per 
queue (default 1024).
+
 * ``--rx-burst NPKTS:`` Optional, Rx burst size in decimal (default 32).
 
 * ``--tx-burst NPKTS:`` Optional, Tx burst size in decimal (default 32).
 
+* ``--mbcache CACHESZ:`` Optional, sets the mbuf pool cache size per lcore 
(default 512).
+
 * ``--eth-dest=X,MM:MM:MM:MM:MM:MM:`` Optional, ethernet destination for port 
X.
 
 * ``--max-pkt-len:`` Optional, maximum packet length in decimal (64-9600).
 
 * ``--no-numa:`` Optional, disables numa awareness.
 
-* ``--hash-entry-num:`` Optional, specifies the hash entry number in 
hexadecimal to be setup.
-
 * ``--ipv6:`` Optional, set if running ipv6 packets.
 
 * ``--parse-ptype:`` Optional, set to use software to analyze packet type. 
Without this option, hardware will check the packet type.
 
+* ``--disable-rss:`` Optional, disables RSS (Receive Side Scaling).
+
+* ``--relax-rx-offload:`` Optional, relaxes Rx offload requirements based on 
device
+  capabilities. When requested offloads (such as IPv4 checksum offload) are 
not supported
+  by the device (e.g., virtual devices such as ``vhost``, ``virtio``, or 
``pcap``),
+  unsupported offloads are masked off and software validation is enabled.
+
 * ``--per-port-pool:`` Optional, set to use independent buffer pools per port. 
Without this option, single buffer pool is used for all ports.
 
 * ``--mode:`` Optional, Packet transfer mode for I/O, poll or eventdev.
@@ -321,9 +340,6 @@ for the convenience to execute hash performance test on 
4M/8M/16M flows.
 .. note::
 
     Value of global variable ipv6 can be specified with --ipv6 in the command 
line.
-    Value of global variable hash_entry_number,
-    which is used to specify the total hash entry number for all used ports in 
hash performance test,
-    can be specified with --hash-entry-num VALUE in command line, being its 
default value 4.
 
 .. code-block:: c
 
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 9532150a47..aad33eb5d4 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -397,6 +397,7 @@ print_usage(const char *prgname)
                " [-P]"
                " [--lookup]"
                " --config (port,queue,lcore)[,(port,queue,lcore)]"
+               " [--eth-link-speed SPEED]"
                " [--rx-queue-size NPKTS]"
                " [--tx-queue-size NPKTS]"
                " [--rx-burst NPKTS]"
@@ -407,12 +408,16 @@ print_usage(const char *prgname)
                " [--no-numa]"
                " [--ipv6]"
                " [--parse-ptype]"
+               " [--disable-rss]"
+               " [--relax-rx-offload]"
                " [--per-port-pool]"
                " [--mode]"
 #ifdef RTE_LIB_EVENTDEV
                " [--eventq-sched]"
+               " [--event-eth-rxqs]"
                " [--event-vector [--event-vector-size SIZE] 
[--event-vector-tmo NS]]"
 #endif
+               " [--alg ALG]"
                " [-E]"
                " [-L]\n\n"
 
@@ -439,6 +444,8 @@ print_usage(const char *prgname)
                "  --no-numa: Disable numa awareness\n"
                "  --ipv6: Set if running ipv6 packets\n"
                "  --parse-ptype: Set to use software to analyze packet type\n"
+               "  --disable-rss: Disable RSS\n"
+               "  --relax-rx-offload: Relax Rx offload mode\n"
                "  --per-port-pool: Use separate buffer pool per port\n"
                "  --mode: Packet transfer mode for I/O, poll or eventdev\n"
                "          Default mode = poll\n"
-- 
2.39.5

Reply via email to