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 ``--pdump`` command line option with various sub arguments:
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>]'
58 * Parameters inside the parentheses represents mandatory parameters.
60 * Parameters inside the square brackets represents optional parameters.
62 Multiple instances of ``--pdump`` can be passed to capture packets on different port and queue combinations.
69 Port id of the eth device on which packets should be captured.
72 PCI address (or) name of the eth device on which packets should be captured.
76 * As of now the ``dpdk_pdump`` tool cannot capture the packets of virtual devices
77 in the primary process due to a bug in the ethdev library. Due to this bug, in a multi process context,
78 when the primary and secondary have different ports set, then the secondary process
79 (here the ``dpdk_pdump`` tool) overwrites the ``rte_eth_devices[]`` entries of the primary process.
82 Queue id of the eth device on which packets should be captured. The user can pass a queue value of ``*`` to enable
83 packet capture on all queues of the eth device.
86 Can be either a pcap file name or any Linux iface.
89 Can be either a pcap file name or any Linux iface.
93 * To receive ingress packets only, ``rx-dev`` should be passed.
95 * To receive egress packets only, ``tx-dev`` should be passed.
97 * To receive ingress and egress packets separately ``rx-dev`` and ``tx-dev``
98 should both be passed with the different file names or the Linux iface names.
100 * To receive ingress and egress packets separately ``rx-dev`` and ``tx-dev``
101 should both be passed with the same file names or the the Linux iface names.
104 Size of the ring. This value is used internally for ring creation. The ring will be used to enqueue the packets from
105 the primary application to the secondary. This is an optional parameter with default size 16384.
108 Size of the mbuf data. This is used internally for mempool creation. Ideally this value must be same as
109 the primary application's mempool's mbuf data size which is used for packet RX. This is an optional parameter with
113 Total number mbufs in mempool. This is used internally for mempool creation. This is an optional parameter with default
120 .. code-block:: console
122 $ sudo ./build/app/dpdk_pdump -- --pdump 'port=0,queue=*,rx-dev=/tmp/rx.pcap'