* [dpdk-dev] [PATCH] doc: add how to use packet capture framework
@ 2017-07-12 14:12 Reshma Pattan
2017-07-31 21:18 ` Thomas Monjalon
2017-08-03 13:09 ` [dpdk-dev] [PATCH v2] doc: add how-to on " Reshma Pattan
0 siblings, 2 replies; 4+ messages in thread
From: Reshma Pattan @ 2017-07-12 14:12 UTC (permalink / raw)
To: dev; +Cc: Reshma Pattan
Describes how to use pdump library and dpdk-pdump tool
to capture traffic on dpdk ports.
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
doc/guides/howto/img/packet_capture_framework.svg | 128 +++++++++++++++++++
doc/guides/howto/index.rst | 1 +
doc/guides/howto/packet_capture_framework.rst | 146 ++++++++++++++++++++++
3 files changed, 275 insertions(+)
create mode 100644 doc/guides/howto/img/packet_capture_framework.svg
create mode 100644 doc/guides/howto/packet_capture_framework.rst
diff --git a/doc/guides/howto/img/packet_capture_framework.svg b/doc/guides/howto/img/packet_capture_framework.svg
new file mode 100644
index 0000000..e0805a3
--- /dev/null
+++ b/doc/guides/howto/img/packet_capture_framework.svg
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="530px" height="319px" viewBox="0 0 530 319" enable-background="new 0 0 530 319" xml:space="preserve"> <image id="image0" width="530" height="319" x="0" y="0"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhIAAAE/CAMAAAAkOdr4AAAABGdBTUEAAK/INwWK6QAAACBjSFJN
+AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABs1BMVEX////b5OzP2+alvNCg
+uM2Dor5xlbVZg6lBcZxTfqV3mbjJ1+PD0uCPq8VNeqK9zt3z9v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iakACm2JcAw3joTQCX3566vgkmY4ILwlBgv3RNHx8WTW
+RY3mnziDhBPTz75DE64g0bWe8cnoifoM6WQKif3ofzNPy7b6CQ32LhLeK9xmYpBmmUJiB3pk/X64
+uz+j6Z5FglUOwZXMTGXsXuoh9LWB5HTU76hsYJFyNxrSKWQMifEKemh1nurd3xEy8Wh1QCKxdtbQ
+Nz9Zm89+/9sHyES1AUh0o12WFl6gekJew2aWXwAkutGekbItJoZHBqpmEglIgGICJEAxARKgmAAJ
+UEyABCgmQAIUEyABigmQAMUESIBiAiRAMQESoJgACVBMgAQoprITE49T6BEgoVlD9tfITaW7qGLb
+hXnTGPrddq6m0v/1/npArqkffWN94nEa/YIGbLswdxrq6Ydob6Lhqm0P5k7jNRduY1LUj0+QuXV7
+iqM9CP3eoyty/PAEjdl2Xy41UEM//9SDT9L+9heEZgzc6lJEscnojx7Zm5GuoCd36KxlqDUy0/SI
+7SxW0FSpattvIBAIBAKBQHnQ/wPef+5jSa7rqQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNy0wNy0x
+MlQwNjozMjowNi0wNzowMEA0g5sAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTctMDctMTJUMDY6MzI6
+MDYtMDc6MDAxaTsnAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAABJRU5E
+rkJggg==" />
+</svg>
diff --git a/doc/guides/howto/index.rst b/doc/guides/howto/index.rst
index a483444..468939b 100644
--- a/doc/guides/howto/index.rst
+++ b/doc/guides/howto/index.rst
@@ -42,3 +42,4 @@ HowTo Guides
vfd
virtio_user_for_container_networking
virtio_user_as_exceptional_path
+ packet_capture_framework
diff --git a/doc/guides/howto/packet_capture_framework.rst b/doc/guides/howto/packet_capture_framework.rst
new file mode 100644
index 0000000..e74bee2
--- /dev/null
+++ b/doc/guides/howto/packet_capture_framework.rst
@@ -0,0 +1,146 @@
+.. BSD LICENSE
+ Copyright(c) 2017 Intel Corporation. All rights reserved.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ * Neither the name of Intel Corporation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+This doc describes how the Data Plane Development Kit (DPDK) packet capture
+framework is used for capturing packets on the DPDK ports. It is written with
+users of DPDK in mind who want to know more about the feature and for those
+who want to monitor traffic on DPDK-controlled devices.
+
+The DPDK packet capture framework was introduced in DPDK v16.07.
+The DPDK packet capture framework consists of the DPDK pdump library and
+DPDK pdump tool.
+
+
+DPDK pdump Library and pdump Tool
+=================================
+
+The ``librte_pdump`` library provides the APIs required to allow users to
+initialize the packet capture framework and to enable or disable packet
+capture. The library works on a client/server model and its usage is
+recommended for debugging purposes.
+
+The ``dpdk-pdump`` tool is developed based on the ``librte_pdump`` library.
+The ``dpdk-pdump`` tool runs as a DPDK secondary process and is capable
+of enabling or disabling packet capture on the DPDK ports.
+The ``dpdk-pdump`` tool provides command-line options with which users can
+request enabling or disabling of the packet capture on DPDK ports.
+
+The application which initializes the packet capture framework will act as a
+server and the application that enables or disables the packet capture will
+act as a client. The server sends the Rx and Tx packets from the DPDK ports
+to the client.
+
+In DPDK the ``testpmd`` application is modified to initialize the packet
+capture framework and act as a server, and the ``dpdk-pdump`` tool acts
+as a client. To view Rx or Tx packets of ``testpmd``, the application should
+be launched first, and then the ``dpdk-pdump`` tool. Packets from the
+``testpmd`` will be sent to the tool, which then sends them on to the pcap
+pmd device and that device writes them to the pcap file or to an external
+interface depending on the command-line option used.
+
+ .. Note::
+ * The ``dpdk-pdump`` tool can only be used in conjunction with a primary
+ application which has the packet capture framework initialized already.
+ In dpdk, only the ``testpmd`` is modified to initialize packet capture
+ framework, other applications remain untouched. So, if the ``dpdk-pdump``
+ tool has to be used with any application other than the testpmd, user
+ needs to explicitly modify that application to call packet capture
+ framework initialization code. Refer ``app/test-pmd/testpmd.c``
+ code and look for ``pdump`` keyword to see how this is done.
+
+ * The ``dpdk-pdump`` tool depends on libpcap based PMD which is disabled
+ by default in the build configuration files,
+ owing to an external dependency on the libpcap development files
+ which must be installed on the board.
+ Once the libpcap development files are installed, the libpcap based PMD
+ can be enabled by setting CONFIG_RTE_LIBRTE_PMD_PCAP=y and recompiling the DPDK.
+
+
+Test Environment
+----------------
+
+The overview of using packet capture framework and dpdk-pdump tool
+for packet capturing on the DPDK port
+in :numref:`figure_packet_capture_framework`.
+
+.. _figure_packet_capture_framework:
+
+.. figure:: img/packet_capture_framework.*
+
+ Packet capturing on DPDK port using the dpdk-pdump tool.
+
+Configuration Steps
+-------------------
+
+The following steps demonstrate how to run the ``dpdk-pdump`` tool to
+capture Rx side packets of dpdk_port0
+in :numref:`figure_packet_capture_framework` and inspect them using
+``tcpdump``.
+
+#. Modify the DPDK primary application to initialize the packet capture framework
+ as mentioned in above note, enable below config options and build the DPDK::
+
+ CONFIG_RTE_LIBRTE_PMD_PCAP=y
+ CONFIG_RTE_LIBRTE_PDUMP=y
+
+#. Launch testpmd as the primary application::
+
+ sudo ./app/testpmd -c 0xf0 -n 4 -- -i --port-topology=chained
+
+#. Launch the pdump tool as follows::
+
+ sudo ./build/app/dpdk-pdump -- \
+ --pdump 'port=0,queue=*,rx-dev=/tmp/capture.pcap'
+
+#. Send traffic to dpdk_port0 from traffic generator.
+ Inspect packets captured in the file capture.pcap using a tool
+ that can interpret pcap files, for example tcpdump::
+
+ $tcpdump -nr /tmp/capture.pcap
+ reading from file /tmp/capture.pcap, link-type EN10MB (Ethernet)
+ 11:11:36.891404 IP 4.4.4.4.whois++ > 3.3.3.3.whois++: UDP, length 18
+ 11:11:36.891442 IP 4.4.4.4.whois++ > 3.3.3.3.whois++: UDP, length 18
+ 11:11:36.891445 IP 4.4.4.4.whois++ > 3.3.3.3.whois++: UDP, length 18
+
+Conclusion
+----------
+
+In this doc we described the ``librte_pdump`` library and ``dpdk-pdump`` tool
+usage for capturing traffic of DPDK ports.
+
+Additional Information
+----------------------
+
+More details on ``librte_pdump`` library and ``dpdk-pdump`` tool can be found
+at following links.
+
+#. http://dpdk.org/doc/guides/prog_guide/pdump_lib.html
+#. http://dpdk.org/doc/guides/tools/pdump.html
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] doc: add how to use packet capture framework
2017-07-12 14:12 [dpdk-dev] [PATCH] doc: add how to use packet capture framework Reshma Pattan
@ 2017-07-31 21:18 ` Thomas Monjalon
2017-08-03 13:09 ` [dpdk-dev] [PATCH v2] doc: add how-to on " Reshma Pattan
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2017-07-31 21:18 UTC (permalink / raw)
To: Reshma Pattan; +Cc: dev
Hi,
12/07/2017 16:12, Reshma Pattan:
> Describes how to use pdump library and dpdk-pdump tool
> to capture traffic on dpdk ports.
> --- /dev/null
> +++ b/doc/guides/howto/img/packet_capture_framework.svg
> @@ -0,0 +1,128 @@
> +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="530px" height="319px" viewBox="0 0 530 319" enable-background="new 0 0 530 319" xml:space="preserve"> <image id="image0" width="530" height="319" x="0" y="0"
> + xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhIAAAE/CAMAAAAkOdr4AAAABGdBTUEAAK/INwWK6
This is a PNG image embedded in SVG.
Please make a real SVG.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] doc: add how-to on packet capture framework
2017-07-12 14:12 [dpdk-dev] [PATCH] doc: add how to use packet capture framework Reshma Pattan
2017-07-31 21:18 ` Thomas Monjalon
@ 2017-08-03 13:09 ` Reshma Pattan
2017-08-03 23:14 ` Thomas Monjalon
1 sibling, 1 reply; 4+ messages in thread
From: Reshma Pattan @ 2017-08-03 13:09 UTC (permalink / raw)
To: dev; +Cc: john.mcnamara, Reshma Pattan
Add How-To doc to describe the use of the pdump library
and the dpdk-pdump tool to capture traffic on DPDK
ports.
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
V2: Fixed SVG image.
doc/guides/howto/img/packet_capture_framework.svg | 471 ++++++++++++++++++++++
doc/guides/howto/index.rst | 1 +
doc/guides/howto/packet_capture_framework.rst | 140 +++++++
doc/guides/tools/pdump.rst | 1 +
4 files changed, 613 insertions(+)
create mode 100644 doc/guides/howto/img/packet_capture_framework.svg
create mode 100644 doc/guides/howto/packet_capture_framework.rst
diff --git a/doc/guides/howto/img/packet_capture_framework.svg b/doc/guides/howto/img/packet_capture_framework.svg
new file mode 100644
index 0000000..a76baf7
--- /dev/null
+++ b/doc/guides/howto/img/packet_capture_framework.svg
@@ -0,0 +1,471 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="120mm"
+ height="80mm"
+ viewBox="0 0 425.19685 283.46457"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="drawing-pcap.svg">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow2Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker7773"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path7775"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker7679"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path7681"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(1.1,0,0,1.1,1.1,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker7583"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path7585"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker7501"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path7503"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(1.1,0,0,1.1,1.1,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker7421"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path7423"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(1.1,0,0,1.1,1.1,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker7331"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path7333"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker7265"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path7267"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:isstock="true"
+ style="overflow:visible"
+ id="marker7199"
+ refX="0"
+ refY="0"
+ orient="auto"
+ inkscape:stockid="Arrow2Lstart">
+ <path
+ transform="matrix(1.1,0,0,1.1,1.1,0)"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ id="path7201"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker7111"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path7113"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Lstart"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path5820"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(1.1,0,0,1.1,1.1,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Lend"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path5823"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <linearGradient
+ id="linearGradient5784"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#1e5dae;stop-opacity:1;"
+ offset="0"
+ id="stop5786" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5741"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop5743" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5735"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop5737" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5741"
+ id="linearGradient5745"
+ x1="167.94293"
+ y1="226.05743"
+ x2="263.39221"
+ y2="226.05743"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-77.340273,715.61336)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5784"
+ id="linearGradient5788"
+ x1="392.19681"
+ y1="258.38232"
+ x2="487.64606"
+ y2="258.38232"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-84.916417,744.90779)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5784"
+ id="linearGradient5788-1"
+ x1="392.19681"
+ y1="258.38232"
+ x2="487.64606"
+ y2="258.38232"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2713979,0,0,0.99644866,-421.24046,743.3)" />
+ <marker
+ inkscape:stockid="Arrow2Lstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker6152-5"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ inkscape:connector-curvature="0"
+ id="path6154-8"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(1.1,0,0,1.1,1.1,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker6152-6"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ inkscape:connector-curvature="0"
+ id="path6154-2"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(1.1,0,0,1.1,1.1,0)" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.57434918"
+ inkscape:cx="215.17857"
+ inkscape:cy="285.26445"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1874"
+ inkscape:window-height="971"
+ inkscape:window-x="2"
+ inkscape:window-y="24"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-768.89764)">
+ <rect
+ style="fill:#000000;fill-opacity:0"
+ id="rect3336"
+ width="527.29962"
+ height="395.97977"
+ x="98.994949"
+ y="57.361946" />
+ <rect
+ style="fill:#000000;fill-opacity:0;stroke:#257cdc;stroke-width:4;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4148"
+ width="222.39552"
+ height="150.6747"
+ x="29.402397"
+ y="790.82452" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ x="61.050636"
+ y="807.3205"
+ id="text4152"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan4154"
+ x="61.050636"
+ y="807.3205">DPDK Primary Application</tspan></text>
+ <rect
+ style="fill:#000000;fill-opacity:0;stroke:#257cdc;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4156-6"
+ width="94.449265"
+ height="35.355339"
+ x="305.76007"
+ y="827.01843" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ x="350.68585"
+ y="841.16058"
+ id="text4189"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan4191"
+ x="350.68585"
+ y="841.16058">dpdk-pdump</tspan><tspan
+ sodipodi:role="line"
+ x="350.68585"
+ y="856.78558"
+ id="tspan4193">tool</tspan></text>
+ <rect
+ style="fill:#000000;fill-opacity:0;stroke:#257cdc;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4156-6-4"
+ width="94.449265"
+ height="35.355339"
+ x="307.78033"
+ y="891.16315" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ x="352.70612"
+ y="905.3053"
+ id="text4189-1"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ x="352.70612"
+ y="905.3053"
+ id="tspan4193-3">PCAP PMD</tspan></text>
+ <rect
+ style="fill:url(#linearGradient5745);fill-opacity:1;stroke:#257cdc;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4156-6-6"
+ width="94.449265"
+ height="35.355339"
+ x="91.102669"
+ y="923.9931" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ x="136.02846"
+ y="938.13525"
+ id="text4189-0"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ x="136.02846"
+ y="938.13525"
+ id="tspan4193-6">dpdk_port0</tspan></text>
+ <rect
+ style="fill:#000000;fill-opacity:0;stroke:#257cdc;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4156-6-5"
+ width="94.449265"
+ height="35.355339"
+ x="92.617897"
+ y="824.99817" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ x="137.54369"
+ y="839.14026"
+ id="text4189-4"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ x="137.54369"
+ y="839.14026"
+ id="tspan4193-2">librte_pdump</tspan></text>
+ <rect
+ style="fill:url(#linearGradient5788);fill-opacity:1;stroke:#257cdc;stroke-width:1;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4156-6-4-5"
+ width="94.449265"
+ height="35.355339"
+ x="307.7804"
+ y="985.61243" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ x="352.70618"
+ y="999.75458"
+ id="text4189-1-8"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ x="352.70618"
+ y="999.75458"
+ id="tspan4193-3-2">capture.pcap</tspan></text>
+ <rect
+ style="fill:url(#linearGradient5788-1);fill-opacity:1;stroke:#257cdc;stroke-width:1.12555885;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4156-6-4-5-1"
+ width="120.0826"
+ height="35.229782"
+ x="78.03347"
+ y="983.14984" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:12.5px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ x="136.53352"
+ y="1002.785"
+ id="text4189-1-8-4"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ x="136.53352"
+ y="1002.785"
+ id="tspan4193-3-2-7">Traffic Generator</tspan></text>
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker7331)"
+ d="m 351.46948,927.02357 c 0,57.5787 0,57.5787 0,57.5787"
+ id="path7329"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend)"
+ d="m 349.44918,862.37381 c 0,28.28427 0,28.28427 0,28.28427"
+ id="path7405"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker7421)"
+ d="m 134.79176,960.86368 c 0,22.72844 0,22.22336 0,22.22336"
+ id="path7419"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker7501);marker-end:url(#marker7583)"
+ d="m 136.30295,923.75113 c 0,-63.57143 0,-63.57143 0,-63.57143"
+ id="path7499"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker7679);marker-end:url(#marker7773)"
+ d="m 187.01723,841.96541 c 118.21429,0 118.21429,0 118.21429,0"
+ id="path7677"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/doc/guides/howto/index.rst b/doc/guides/howto/index.rst
index a483444..468939b 100644
--- a/doc/guides/howto/index.rst
+++ b/doc/guides/howto/index.rst
@@ -42,3 +42,4 @@ HowTo Guides
vfd
virtio_user_for_container_networking
virtio_user_as_exceptional_path
+ packet_capture_framework
diff --git a/doc/guides/howto/packet_capture_framework.rst b/doc/guides/howto/packet_capture_framework.rst
new file mode 100644
index 0000000..4467442
--- /dev/null
+++ b/doc/guides/howto/packet_capture_framework.rst
@@ -0,0 +1,140 @@
+.. BSD LICENSE
+ Copyright(c) 2017 Intel Corporation. All rights reserved.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ * Neither the name of Intel Corporation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+DPDK pdump Library and pdump Tool
+=================================
+
+This document describes how the Data Plane Development Kit (DPDK) Packet
+Capture Framework is used for capturing packets on DPDK ports. It is intended
+for users of DPDK who want to know more about the Packet Capture feature and
+for those who want to monitor traffic on DPDK-controlled devices.
+
+The DPDK packet capture framework was introduced in DPDK v16.07. The DPDK
+packet capture framework consists of the DPDK pdump library and DPDK pdump
+tool.
+
+
+Introduction
+------------
+
+The :ref:`librte_pdump <pdump_library>` library provides the APIs required to
+allow users to initialize the packet capture framework and to enable or
+disable packet capture. The library works on a client/server model and its
+usage is recommended for debugging purposes.
+
+The :ref:`dpdk-pdump <pdump_tool>` tool is developed based on the
+``librte_pdump`` library. It runs as a DPDK secondary process and is capable
+of enabling or disabling packet capture on DPDK ports. The ``dpdk-pdump`` tool
+provides command-line options with which users can request enabling or
+disabling of the packet capture on DPDK ports.
+
+The application which initializes the packet capture framework will act as a
+server and the application that enables or disables the packet capture will
+act as a client. The server sends the Rx and Tx packets from the DPDK ports
+to the client.
+
+In DPDK the ``testpmd`` application can be used to initialize the packet
+capture framework and act as a server, and the ``dpdk-pdump`` tool acts as a
+client. To view Rx or Tx packets of ``testpmd``, the application should be
+launched first, and then the ``dpdk-pdump`` tool. Packets from ``testpmd``
+will be sent to the tool, which then sends them on to the Pcap PMD device and
+that device writes them to the Pcap file or to an external interface depending
+on the command-line option used.
+
+Some things to note:
+
+* The ``dpdk-pdump`` tool can only be used in conjunction with a primary
+ application which has the packet capture framework initialized already. In
+ dpdk, only ``testpmd`` is modified to initialize packet capture framework,
+ other applications remain untouched. So, if the ``dpdk-pdump`` tool has to
+ be used with any application other than the testpmd, the user needs to
+ explicitly modify that application to call the packet capture framework
+ initialization code. Refer to the ``app/test-pmd/testpmd.c`` code and look
+ for ``pdump`` keyword to see how this is done.
+
+* The ``dpdk-pdump`` tool depends on the libpcap based PMD which is disabled
+ by default in the build configuration files, owing to an external dependency
+ on the libpcap development files. Once the libpcap development files are
+ installed, the libpcap based PMD can be enabled by setting
+ ``CONFIG_RTE_LIBRTE_PMD_PCAP=y`` and recompiling the DPDK.
+
+
+Test Environment
+----------------
+
+The overview of using the Packet Capture Framework and the ``dpdk-pdump`` tool
+for packet capturing on the DPDK port in
+:numref:`figure_packet_capture_framework`.
+
+.. _figure_packet_capture_framework:
+
+.. figure:: img/packet_capture_framework.*
+
+ Packet capturing on a DPDK port using the dpdk-pdump tool.
+
+
+Configuration
+-------------
+
+Modify the DPDK primary application to initialize the packet capture framework
+as mentioned in the above notes and enable the following config options and
+build DPDK::
+
+ CONFIG_RTE_LIBRTE_PMD_PCAP=y
+ CONFIG_RTE_LIBRTE_PDUMP=y
+
+
+Running the Application
+-----------------------
+
+The following steps demonstrate how to run the ``dpdk-pdump`` tool to capture
+Rx side packets on dpdk_port0 in :numref:`figure_packet_capture_framework` and
+inspect them using ``tcpdump``.
+
+#. Launch testpmd as the primary application::
+
+ sudo ./app/testpmd -c 0xf0 -n 4 -- -i --port-topology=chained
+
+#. Launch the pdump tool as follows::
+
+ sudo ./build/app/dpdk-pdump -- \
+ --pdump 'port=0,queue=*,rx-dev=/tmp/capture.pcap'
+
+#. Send traffic to dpdk_port0 from traffic generator.
+ Inspect packets captured in the file capture.pcap using a tool
+ that can interpret Pcap files, for example tcpdump::
+
+ $tcpdump -nr /tmp/capture.pcap
+ reading from file /tmp/capture.pcap, link-type EN10MB (Ethernet)
+ 11:11:36.891404 IP 4.4.4.4.whois++ > 3.3.3.3.whois++: UDP, length 18
+ 11:11:36.891442 IP 4.4.4.4.whois++ > 3.3.3.3.whois++: UDP, length 18
+ 11:11:36.891445 IP 4.4.4.4.whois++ > 3.3.3.3.whois++: UDP, length 18
diff --git a/doc/guides/tools/pdump.rst b/doc/guides/tools/pdump.rst
index b46a92f..16502f7 100644
--- a/doc/guides/tools/pdump.rst
+++ b/doc/guides/tools/pdump.rst
@@ -28,6 +28,7 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.. _pdump_tool:
dpdk-pdump Application
======================
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] doc: add how-to on packet capture framework
2017-08-03 13:09 ` [dpdk-dev] [PATCH v2] doc: add how-to on " Reshma Pattan
@ 2017-08-03 23:14 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2017-08-03 23:14 UTC (permalink / raw)
To: Reshma Pattan; +Cc: dev, john.mcnamara
03/08/2017 15:09, Reshma Pattan:
> Add How-To doc to describe the use of the pdump library
> and the dpdk-pdump tool to capture traffic on DPDK
> ports.
>
> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
> Acked-by: John McNamara <john.mcnamara@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-03 23:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12 14:12 [dpdk-dev] [PATCH] doc: add how to use packet capture framework Reshma Pattan
2017-07-31 21:18 ` Thomas Monjalon
2017-08-03 13:09 ` [dpdk-dev] [PATCH v2] doc: add how-to on " Reshma Pattan
2017-08-03 23:14 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).