examples/l3fwd: update usage and documentation

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>
This commit is contained in:
Beilei Xing 2016-06-27 22:26:48 +08:00 committed by Thomas Monjalon
parent 572f0779c2
commit 54659744c2
2 changed files with 54 additions and 28 deletions

View 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]
./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]
Where,
where,
* ``-p PORTMASK:`` Hexadecimal bitmask of ports to configure
* -p PORTMASK: Hexadecimal bitmask of ports to configure
* -P: optional, sets all ports to promiscuous mode so that packets are accepted regardless of the packet's Ethernet MAC destination address.
* ``-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
* ``-E:`` Optional, enable exact match.
* --enable-jumbo: optional, enables jumbo frames
* ``-L:`` Optional, enable longest prefix match.
* --max-pkt-len: optional, maximum packet length in decimal (64-9600)
* ``--config (port,queue,lcore)[,(port,queue,lcore)]:`` Determines which queues from which ports are mapped to which cores.
* --no-numa: optional, disables numa awareness
* ``--eth-dest=X,MM:MM:MM:MM:MM:MM:`` Optional, ethernet destination for port X.
* --hash-entry-num: optional, specifies the hash entry number in hexadecimal to be setup
* ``--enable-jumbo:`` Optional, enables jumbo frames.
* --ipv6: optional, set it if running ipv6 packets
* ``--max-pkt-len:`` Optional, under the premise of enabling jumbo, maximum packet length in decimal (64-9600).
* --parse-ptype: optional, set it if use software way to analyze packet type
* ``--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.
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,

View 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);
}