[dpdk-dev] [PATCH v9 8/8] doc: update doc for packet capture framework

2016-06-15 Thread Thomas Monjalon
2016-06-15 05:44, Pattan, Reshma:
> > >  ABI Changes
> > >  ---
> > > @@ -146,6 +156,9 @@ ABI Changes
> > >  * The ``rte_port_source_params`` structure has new fields to support PCAP
> > file.
> > >It was already in release 16.04 with ``RTE_NEXT_ABI`` flag.
> > >
> > > +* The ``rte_eth_dev_info`` structure has new fields ``nb_rx_queues`` and
> > ``nb_tx_queues``
> > > +  to support number of queues configured by software.
> > 
> > There was no deprecation notice in 16.04 for this ABI change.
> 
> Deprecation notice and relevant planed changes were sent as RFC during the 
> start of 16.07 , please find the below is the link for the same.
> http://dpdk.org/dev/patchwork/patch/12033/
> http://dpdk.org/dev/patchwork/patch/12034/

Yes there was no notice in 16.04.


[dpdk-dev] [PATCH v9 8/8] doc: update doc for packet capture framework

2016-06-15 Thread Pattan, Reshma


> -Original Message-
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Tuesday, June 14, 2016 9:41 PM
> To: Pattan, Reshma 
> Cc: dev at dpdk.org; Mcnamara, John 
> Subject: Re: [dpdk-dev] [PATCH v9 8/8] doc: update doc for packet capture
> framework
> 
> When commenting previous patches, I missed these docs.
> Please move them in the appropriate patches.
> 
> > +Use Case: Packet Capturing
> > +--
> > +
> > +The DPDK ``app/pdump`` tool is developed based on this library to capture
> packets in DPDK.
> > +Users can use this as an example to develop their own packet capturing
> application.
> 
> Is it an example or a debugging tool?

It is a debugging tool.

> If it is an example, it should be in the examples/ directory.
> 
> >  ABI Changes
> >  ---
> > @@ -146,6 +156,9 @@ ABI Changes
> >  * The ``rte_port_source_params`` structure has new fields to support PCAP
> file.
> >It was already in release 16.04 with ``RTE_NEXT_ABI`` flag.
> >
> > +* The ``rte_eth_dev_info`` structure has new fields ``nb_rx_queues`` and
> ``nb_tx_queues``
> > +  to support number of queues configured by software.
> 
> There was no deprecation notice in 16.04 for this ABI change.

Deprecation notice and relevant planed changes were sent as RFC during the 
start of 16.07 , please find the below is the link for the same.
http://dpdk.org/dev/patchwork/patch/12033/
http://dpdk.org/dev/patchwork/patch/12034/

Thanks,
Reshma


[dpdk-dev] [PATCH v9 8/8] doc: update doc for packet capture framework

2016-06-14 Thread Thomas Monjalon
When commenting previous patches, I missed these docs.
Please move them in the appropriate patches.

2016-06-14 10:38, Reshma Pattan:
> --- a/doc/guides/prog_guide/index.rst
> +++ b/doc/guides/prog_guide/index.rst
> @@ -71,6 +71,7 @@ Programmer's Guide
>  writing_efficient_code
>  profile_app
>  glossary
> +pdump_library

There is probably a better place that after the glossary.

[...]
> +The librte_pdump Library
> +
> +
> +The ``librte_pdump`` library provides a framework for packet capturing in 
> DPDK.

Here you need to explain what you mean by "packet capturing".
Doing a copy?
Slowing down the normal processing?
Which usage do you target? debugging? fast mirroring?

> +Use Case: Packet Capturing
> +--
> +
> +The DPDK ``app/pdump`` tool is developed based on this library to capture 
> packets in DPDK.
> +Users can use this as an example to develop their own packet capturing 
> application.

Is it an example or a debugging tool?
If it is an example, it should be in the examples/ directory.

>  ABI Changes
>  ---
> @@ -146,6 +156,9 @@ ABI Changes
>  * The ``rte_port_source_params`` structure has new fields to support PCAP 
> file.
>It was already in release 16.04 with ``RTE_NEXT_ABI`` flag.
>  
> +* The ``rte_eth_dev_info`` structure has new fields ``nb_rx_queues`` and 
> ``nb_tx_queues``
> +  to support number of queues configured by software.

There was no deprecation notice in 16.04 for this ABI change.



[dpdk-dev] [PATCH v9 8/8] doc: update doc for packet capture framework

2016-06-14 Thread Reshma Pattan
Added programmers guide for librte_pdump.
Added sample application guide for app/pdump application.
Updated release note for packet capture framework changes.

Signed-off-by: Reshma Pattan 
Acked-by: John McNamara 
---
 MAINTAINERS |   3 +
 doc/guides/prog_guide/index.rst |   1 +
 doc/guides/prog_guide/pdump_library.rst | 119 +++
 doc/guides/rel_notes/release_16_07.rst  |  13 
 doc/guides/sample_app_ug/index.rst  |   1 +
 doc/guides/sample_app_ug/pdump.rst  | 122 
 6 files changed, 259 insertions(+)
 create mode 100644 doc/guides/prog_guide/pdump_library.rst
 create mode 100644 doc/guides/sample_app_ug/pdump.rst

diff --git a/MAINTAINERS b/MAINTAINERS
index c46cf86..9a84f59 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -437,6 +437,9 @@ Pdump
 M: Reshma Pattan 
 F: lib/librte_pdump/
 F: app/pdump/
+F: doc/guides/prog_guide/pdump_library.rst
+F: doc/guides/sample_app_ug/pdump.rst
+

 Hierarchical scheduler
 M: Cristian Dumitrescu 
diff --git a/doc/guides/prog_guide/index.rst b/doc/guides/prog_guide/index.rst
index b862d0c..4caf969 100644
--- a/doc/guides/prog_guide/index.rst
+++ b/doc/guides/prog_guide/index.rst
@@ -71,6 +71,7 @@ Programmer's Guide
 writing_efficient_code
 profile_app
 glossary
+pdump_library


 **Figures**
diff --git a/doc/guides/prog_guide/pdump_library.rst 
b/doc/guides/prog_guide/pdump_library.rst
new file mode 100644
index 000..8781ffb
--- /dev/null
+++ b/doc/guides/prog_guide/pdump_library.rst
@@ -0,0 +1,119 @@
+..  BSD LICENSE
+Copyright(c) 2016 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.
+
+.. _pdump_library:
+
+The librte_pdump Library
+
+
+The ``librte_pdump`` library provides a framework for packet capturing in DPDK.
+The library provides the following APIs to initialize the packet capture 
framework, to enable
+or disable the packet capture, and to uninitialize it:
+
+* ``rte_pdump_init()``:
+  This API initializes the packet capture framework.
+
+* ``rte_pdump_enable()``:
+  This API enables the packet capture on a given port and queue.
+  Note: The filter option in the API is a place holder for future enhancements.
+
+* ``rte_pdump_enable_by_deviceid()``:
+  This API enables the packet capture on a given device id (``vdev name or pci 
address``) and queue.
+  Note: The filter option in the API is a place holder for future enhancements.
+
+* ``rte_pdump_disable()``:
+  This API disables the packet capture on a given port and queue.
+
+* ``rte_pdump_disable_by_deviceid()``:
+  This API disables the packet capture on a given device id (``vdev name or 
pci address``) and queue.
+
+* ``rte_pdump_uninit()``:
+  This API uninitializes the packet capture framework.
+
+* ``rte_pdump_set_socket_dir()``:
+  This API sets the server and client socket paths.
+  Note: This API is not thread-safe.
+
+
+Operation
+-
+
+The ``librte_pdump`` library works on a client/server model. The server is 
responsible for enabling or
+disabling the packet capture and the clients are responsible for requesting 
the enabling or disabling of
+the packet capture.
+
+The packet capture framework, as part of its initialization, creates the 
pthread and the server socket in
+the pthread. The application that calls the framework initialization will have 
the server socket created,
+either under the path that the