examples/l3fwd: update usage and documentation
authorBeilei Xing <beilei.xing@intel.com>
Mon, 27 Jun 2016 14:26:48 +0000 (22:26 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 11 Jul 2016 15:21:21 +0000 (17:21 +0200)
Update l3fwd example usage and documentation with missing options.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
doc/guides/sample_app_ug/l3_forward.rst
examples/l3fwd/main.c

index 491f99d..c885cdb 100644 (file)
@@ -88,32 +88,46 @@ To compile the application:
 Running the Application
 -----------------------
 
-The application has a number of command line options:
+The application has a number of command line options::
 
-.. code-block:: console
+    ./l3fwd [EAL options] -- -p PORTMASK
+                             [-P]
+                             [-E]
+                             [-L]
+                             --config(port,queue,lcore)[,(port,queue,lcore)]
+                             [--eth-dest=X,MM:MM:MM:MM:MM:MM]
+                             [--enable-jumbo [--max-pkt-len PKTLEN]]
+                             [--no-numa]
+                             [--hash-entry-num]
+                             [--ipv6]
+                             [--parse-ptype]
+
+Where,
+
+* ``-p PORTMASK:`` Hexadecimal bitmask of ports to configure
 
-    ./build/l3fwd [EAL options] -- -p PORTMASK [-P]  --config(port,queue,lcore)[,(port,queue,lcore)] [--enable-jumbo [--max-pkt-len PKTLEN]]  [--no-numa][--hash-entry-num][--ipv6] [--parse-ptype]
+* ``-P:`` Optional, sets all ports to promiscuous mode so that packets are accepted regardless of the packet's Ethernet MAC destination address.
+  Without this option, only packets with the Ethernet MAC destination address set to the Ethernet address of the port are accepted.
 
-where,
+* ``-E:`` Optional, enable exact match.
 
-*   -p PORTMASK: Hexadecimal bitmask of ports to configure
+* ``-L:`` Optional, enable longest prefix match.
 
-*   -P: optional, sets all ports to promiscuous mode so that packets are accepted regardless of the packet's Ethernet MAC destination address.
-    Without this option, only packets with the Ethernet MAC destination address set to the Ethernet address of the port are accepted.
+* ``--config (port,queue,lcore)[,(port,queue,lcore)]:`` Determines which queues from which ports are mapped to which cores.
 
-*   --config (port,queue,lcore)[,(port,queue,lcore)]: determines which queues from which ports are mapped to which cores
+* ``--eth-dest=X,MM:MM:MM:MM:MM:MM:`` Optional, ethernet destination for port X.
 
-*   --enable-jumbo: optional, enables jumbo frames
+* ``--enable-jumbo:`` Optional, enables jumbo frames.
 
-*   --max-pkt-len: optional, maximum packet length in decimal (64-9600)
+* ``--max-pkt-len:`` Optional, under the premise of enabling jumbo, maximum packet length in decimal (64-9600).
 
-*   --no-numa: optional, disables numa awareness
+* ``--no-numa:`` Optional, disables numa awareness.
 
-*   --hash-entry-num: optional, specifies the hash entry number in hexadecimal to be setup
+* ``--hash-entry-num:`` Optional, specifies the hash entry number in hexadecimal to be setup.
 
-*   --ipv6: optional, set it if running ipv6 packets
+* ``--ipv6:`` Optional, set if running ipv6 packets.
 
-*   --parse-ptype: optional, set it if use software way to analyze packet type
+* ``--parse-ptype:`` Optional, set to use software to analyze packet type. Without this option, hardware will check the packet type.
 
 For example, consider a dual processor socket platform where cores 0-7 and 16-23 appear on socket 0, while cores 8-15 and 24-31 appear on socket 1.
 Let's say that the programmer wants to use memory from both NUMA nodes, the platform has only two ports, one connected to each NUMA node,
index 7a79cd2..acedd20 100644 (file)
@@ -311,20 +311,32 @@ init_lcore_rx_queues(void)
 static void
 print_usage(const char *prgname)
 {
-       printf ("%s [EAL options] -- -p PORTMASK -P"
-               "  [--config (port,queue,lcore)[,(port,queue,lcore]]"
-               "  [--enable-jumbo [--max-pkt-len PKTLEN]]\n"
-               "  -p PORTMASK: hexadecimal bitmask of ports to configure\n"
-               "  -P : enable promiscuous mode\n"
-               "  -E : enable exact match\n"
-               "  -L : enable longest prefix match\n"
-               "  --config (port,queue,lcore): rx queues configuration\n"
-               "  --eth-dest=X,MM:MM:MM:MM:MM:MM: optional, ethernet destination for port X\n"
-               "  --no-numa: optional, disable numa awareness\n"
-               "  --ipv6: optional, specify it if running ipv6 packets\n"
-               "  --enable-jumbo: enable jumbo frame"
-               " which max packet len is PKTLEN in decimal (64-9600)\n"
-               "  --hash-entry-num: specify the hash entry number in hexadecimal to be setup\n",
+       printf("%s [EAL options] --"
+               " -p PORTMASK"
+               " [-P]"
+               " [-E]"
+               " [-L]"
+               " --config (port,queue,lcore)[,(port,queue,lcore)]"
+               " [--eth-dest=X,MM:MM:MM:MM:MM:MM]"
+               " [--enable-jumbo [--max-pkt-len PKTLEN]]"
+               " [--no-numa]"
+               " [--hash-entry-num]"
+               " [--ipv6]"
+               " [--parse-ptype]\n\n"
+
+               "  -p PORTMASK: Hexadecimal bitmask of ports to configure\n"
+               "  -P : Enable promiscuous mode\n"
+               "  -E : Enable exact match\n"
+               "  -L : Enable longest prefix match (default)\n"
+               "  --config (port,queue,lcore): Rx queue configuration\n"
+               "  --eth-dest=X,MM:MM:MM:MM:MM:MM: Ethernet destination for port X\n"
+               "  --enable-jumbo: Enable jumbo frames\n"
+               "  --max-pkt-len: Under the premise of enabling jumbo,\n"
+               "                 maximum packet length in decimal (64-9600)\n"
+               "  --no-numa: Disable numa awareness\n"
+               "  --hash-entry-num: Specify the hash entry number in hexadecimal to be setup\n"
+               "  --ipv6: Set if running ipv6 packets\n"
+               "  --parse-ptype: Set to use software to analyze packet type\n\n",
                prgname);
 }