3 Copyright(c) 2016 Intel Corporation. All rights reserved.
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
10 * Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 * Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in
14 the documentation and/or other materials provided with the
16 * Neither the name of Intel Corporation nor the names of its
17 contributors may be used to endorse or promote products derived
18 from this software without specific prior written permission.
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 dpdk_pdump Application
34 ======================
36 The ``dpdk_pdump`` application is a Data Plane Development Kit (DPDK) application that runs as a DPDK secondary process and
37 is capable of enabling packet capture on dpdk ports.
40 Running the Application
41 -----------------------
43 The application has a number of command line options:
45 .. code-block:: console
47 ./build/app/dpdk_pdump --
48 --pdump '(port=<port id> | device_id=<pci id or vdev name>),
50 (rx-dev=<iface or pcap file> |
51 tx-dev=<iface or pcap file>),
52 [ring-size=<ring size>],
53 [mbuf-size=<mbuf data size>],
54 [total-num-mbufs=<number of mbufs>]'
55 [--server-socket-path=<server socket dir>]
56 [--client-socket-path=<client socket dir>]
58 The ``--pdump`` command line option is mandatory and it takes various sub arguments which are described in
63 * Parameters inside the parentheses represents mandatory parameters.
65 * Parameters inside the square brackets represents optional parameters.
67 * Multiple instances of ``--pdump`` can be passed to capture packets on different port and queue combinations.
69 The ``--server-socket-path`` command line option is optional. This represents the server socket directory.
70 If no value is passed default values are used i.e. ``/var/run/.dpdk/`` for root users and ``~/.dpdk/``
73 The ``--client-socket-path`` command line option is optional. This represents the client socket directory.
74 If no value is passed default values are used i.e. ``/var/run/.dpdk/`` for root users and ``~/.dpdk/``
78 The ``--pdump`` parameters
79 ~~~~~~~~~~~~~~~~~~~~~~~~~~
82 Port id of the eth device on which packets should be captured.
85 PCI address (or) name of the eth device on which packets should be captured.
89 * As of now the ``dpdk_pdump`` tool cannot capture the packets of virtual devices
90 in the primary process due to a bug in the ethdev library. Due to this bug, in a multi process context,
91 when the primary and secondary have different ports set, then the secondary process
92 (here the ``dpdk_pdump`` tool) overwrites the ``rte_eth_devices[]`` entries of the primary process.
95 Queue id of the eth device on which packets should be captured. The user can pass a queue value of ``*`` to enable
96 packet capture on all queues of the eth device.
99 Can be either a pcap file name or any Linux iface.
102 Can be either a pcap file name or any Linux iface.
106 * To receive ingress packets only, ``rx-dev`` should be passed.
108 * To receive egress packets only, ``tx-dev`` should be passed.
110 * To receive ingress and egress packets separately ``rx-dev`` and ``tx-dev``
111 should both be passed with the different file names or the Linux iface names.
113 * To receive ingress and egress packets separately ``rx-dev`` and ``tx-dev``
114 should both be passed with the same file names or the the Linux iface names.
117 Size of the ring. This value is used internally for ring creation. The ring will be used to enqueue the packets from
118 the primary application to the secondary. This is an optional parameter with default size 16384.
121 Size of the mbuf data. This is used internally for mempool creation. Ideally this value must be same as
122 the primary application's mempool's mbuf data size which is used for packet RX. This is an optional parameter with
126 Total number mbufs in mempool. This is used internally for mempool creation. This is an optional parameter with default
133 .. code-block:: console
135 $ sudo ./build/app/dpdk_pdump -- --pdump 'port=0,queue=*,rx-dev=/tmp/rx.pcap'