[ovs-dev] [PATCH v2 7/9] doc: Move "pdump" guide to its own document

Stokes, Ian ian.stokes at intel.com
Wed Apr 18 15:32:37 UTC 2018


> -----Original Message-----
> From: Stephen Finucane [mailto:stephen at that.guru]
> Sent: Monday, April 16, 2018 3:30 PM
> To: dev at openvswitch.org
> Cc: Stokes, Ian <ian.stokes at intel.com>; Stephen Finucane
> <stephen at that.guru>
> Subject: [PATCH v2 7/9] doc: Move "pdump" guide to its own document
> 
> Yet another section that's far too detailed for someone getting started
> with DPDK in OVS. Split it out.
> 
> Signed-off-by: Stephen Finucane <stephen at that.guru>
> ---
>  Documentation/howto/dpdk.rst        | 39 ----------------------
>  Documentation/topics/dpdk/index.rst |  1 +
> Documentation/topics/dpdk/pdump.rst | 65
> +++++++++++++++++++++++++++++++++++++
>  3 files changed, 66 insertions(+), 39 deletions(-)  create mode 100644
> Documentation/topics/dpdk/pdump.rst
> 
> diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
> index b3cba19b2..1a0fb6df1 100644
> --- a/Documentation/howto/dpdk.rst
> +++ b/Documentation/howto/dpdk.rst
> @@ -85,45 +85,6 @@ To stop ovs-vswitchd & delete bridge, run::
>      $ ovs-appctl -t ovsdb-server exit
>      $ ovs-vsctl del-br br0
> 
> -pdump
> ------
> -
> -pdump allows you to listen on DPDK ports and view the traffic that is
> passing -on them. To use this utility, one must have libpcap installed on
> the system.
> -Furthermore, DPDK must be built with ``CONFIG_RTE_LIBRTE_PDUMP=y`` and -
> ``CONFIG_RTE_LIBRTE_PMD_PCAP=y``.
> -
> -.. warning::
> -  A performance decrease is expected when using a monitoring application
> like
> -  the DPDK pdump app.
> -
> -To use pdump, simply launch OVS as usual, then navigate to the
> ``app/pdump`` -directory in DPDK, ``make`` the application and run like
> so::
> -
> -    $ sudo ./build/app/dpdk-pdump -- \
> -        --pdump port=0,queue=0,rx-dev=/tmp/pkts.pcap \
> -        --server-socket-path=/usr/local/var/run/openvswitch
> -
> -The above command captures traffic received on queue 0 of port 0 and
> stores it -in ``/tmp/pkts.pcap``. Other combinations of port numbers,
> queues numbers and -pcap locations are of course also available to use.
> For example, to capture all -packets that traverse port 0 in a single pcap
> file::
> -
> -    $ sudo ./build/app/dpdk-pdump -- \
> -        --pdump 'port=0,queue=*,rx-dev=/tmp/pkts.pcap,tx-
> dev=/tmp/pkts.pcap' \
> -        --server-socket-path=/usr/local/var/run/openvswitch
> -
> -``server-socket-path`` must be set to the value of ``ovs_rundir()`` which
> -typically resolves to ``/usr/local/var/run/openvswitch``.
> -
> -Many tools are available to view the contents of the pcap file. Once
> example is -tcpdump. Issue the following command to view the contents of
> ``pkts.pcap``::
> -
> -    $ tcpdump -r pkts.pcap
> -
> -More information on the pdump app and its usage can be found in the `DPDK
> docs -<http://dpdk.org/doc/guides/tools/pdump.html>`__.
> -
>  Jumbo Frames
>  ------------
> 
> diff --git a/Documentation/topics/dpdk/index.rst
> b/Documentation/topics/dpdk/index.rst
> index fd7cf38b5..d083d929e 100644
> --- a/Documentation/topics/dpdk/index.rst
> +++ b/Documentation/topics/dpdk/index.rst
> @@ -38,3 +38,4 @@ The DPDK Datapath
>     /topics/dpdk/vdev
>     /topics/dpdk/pmd
>     /topics/dpdk/qos
> +   /topics/dpdk/pdump
> diff --git a/Documentation/topics/dpdk/pdump.rst
> b/Documentation/topics/dpdk/pdump.rst
> new file mode 100644
> index 000000000..f1a408989
> --- /dev/null
> +++ b/Documentation/topics/dpdk/pdump.rst

Compilation error, pdump.rst not listed in Documentation/automake.mk.

> @@ -0,0 +1,65 @@
> +..
> +      Licensed under the Apache License, Version 2.0 (the "License"); you
> may
> +      not use this file except in compliance with the License. You may
> obtain
> +      a copy of the License at
> +
> +          http://www.apache.org/licenses/LICENSE-2.0
> +
> +      Unless required by applicable law or agreed to in writing, software
> +      distributed under the License is distributed on an "AS IS" BASIS,
> WITHOUT
> +      WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> See the
> +      License for the specific language governing permissions and
> limitations
> +      under the License.
> +
> +      Convention for heading levels in Open vSwitch documentation:
> +
> +      =======  Heading 0 (reserved for the title in a document)
> +      -------  Heading 1
> +      ~~~~~~~  Heading 2
> +      +++++++  Heading 3
> +      '''''''  Heading 4
> +
> +      Avoid deeper levels because they do not render well.
> +
> +=====
> +pdump
> +=====
> +
> +pdump allows you to listen on DPDK ports and view the traffic that is
> +passing on them. To use this utility, one must have libpcap installed on
> the system.
> +Furthermore, DPDK must be built with ``CONFIG_RTE_LIBRTE_PDUMP=y`` and
> +``CONFIG_RTE_LIBRTE_PMD_PCAP=y``.
> +

This was introduced in OVS 2.6. Although it's doubtful that someone may be using 2.5 now it could be worth a version change tag to call it out.

Ian

> +.. warning::
> +
> +   A performance decrease is expected when using a monitoring application
> like
> +   the DPDK pdump app.
> +
> +To use pdump, simply launch OVS as usual, then navigate to the
> +``app/pdump`` directory in DPDK, ``make`` the application and run like
> so::
> +
> +    $ sudo ./build/app/dpdk-pdump -- \
> +        --pdump port=0,queue=0,rx-dev=/tmp/pkts.pcap \
> +        --server-socket-path=/usr/local/var/run/openvswitch
> +
> +The above command captures traffic received on queue 0 of port 0 and
> +stores it in ``/tmp/pkts.pcap``. Other combinations of port numbers,
> +queues numbers and pcap locations are of course also available to use.
> +For example, to capture all packets that traverse port 0 in a single pcap
> file::
> +
> +    $ sudo ./build/app/dpdk-pdump -- \
> +        --pdump 'port=0,queue=*,rx-dev=/tmp/pkts.pcap,tx-
> dev=/tmp/pkts.pcap' \
> +        --server-socket-path=/usr/local/var/run/openvswitch
> +
> +``server-socket-path`` must be set to the value of ``ovs_rundir()``
> +which typically resolves to ``/usr/local/var/run/openvswitch``.
> +
> +Many tools are available to view the contents of the pcap file. Once
> +example is tcpdump. Issue the following command to view the contents of
> ``pkts.pcap``::
> +
> +    $ tcpdump -r pkts.pcap
> +
> +More information on the pdump app and its usage can be found in the
> +`DPDK documentation`__.
> +
> +__ http://dpdk.org/doc/guides/tools/pdump.html
> --
> 2.14.3



More information about the dev mailing list