From: Andrei-Niculae Petre <p31andrei@gmail.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, Andrei-Niculae Petre <p31andrei@gmail.com>
Subject: [PATCH v2] examples/l3fwd: sync cli options with documentation
Date: Sun, 15 Nov 2026 23:56:57 +0200 [thread overview]
Message-ID: <20261115215657.14694-1-p31andrei@gmail.com> (raw)
In-Reply-To: <20261109004913.72418-1-p31andrei@gmail.com>
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.
- Clarify in print_usage() that --eth-link-speed unit is in Mbps.
- 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 <p31andrei@gmail.com>
---
v2:
* Remove 10 and 100 Mbps from --eth-link-speed documentation examples as
they are explicitly rejected by the parser.
* Clarify that --relax-rx-offload masks unsupported offloads to allow
configuration, but does not enable software validation across all
forwarding paths.
* Clarify in print_usage() that --eth-link-speed unit is in Mbps.
---
---
doc/guides/sample_app_ug/l3_forward.rst | 30 ++++++++++++++++++++-----
examples/l3fwd/main.c | 9 +++++++-
2 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/doc/guides/sample_app_ug/l3_forward.rst b/doc/guides/sample_app_ug/l3_forward.rst
index 4e87141608..73f4f4ce41 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,37 @@ 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. 1000, 10000, 25000, 40000, 100000 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 Rx checksum offload) are not supported
+ by the device (e.g., virtual devices such as ``vhost``, ``virtio``, or ``pcap``),
+ unsupported offloads are masked off so the device can be configured
+ successfully, but note that software validation is not enabled on all
+ forwarding paths.
+
* ``--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.
@@ -322,9 +343,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 060a68b7aa..5d061a1cf7 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"
@@ -423,7 +428,7 @@ print_usage(const char *prgname)
" Accepted: em (Exact Match), lpm (Longest Prefix Match), fib (Forwarding Information Base),\n"
" acl (Access Control List)\n"
" --config (port,queue,lcore): Rx queue configuration\n"
- " --eth-link-speed: force link speed\n"
+ " --eth-link-speed: force link speed (Mbps)\n"
" --rx-queue-size NPKTS: Rx queue size in decimal\n"
" Default: %d\n"
" --tx-queue-size NPKTS: Tx queue size in decimal\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
prev parent reply other threads:[~2026-11-15 21:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 0:49 [PATCH] examples/l3fwd: sync cli options with documentation Andrei-Niculae Petre
2026-11-12 21:39 ` Thomas Monjalon
2026-11-15 21:56 ` Andrei-Niculae Petre [this message]
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=20261115215657.14694-1-p31andrei@gmail.com \
--to=p31andrei@gmail.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.