DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] doc: update pdump documentation
@ 2020-07-13 14:25 Reshma Pattan
  2020-09-02 11:40 ` Pattan, Reshma
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Reshma Pattan @ 2020-07-13 14:25 UTC (permalink / raw)
  To: dev; +Cc: Reshma Pattan

Update the pdump library programmers guide and Howto doc
with the use of multi process channel replacing socket
based communication.

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 doc/guides/howto/packet_capture_framework.rst | 16 ++++-----
 doc/guides/prog_guide/pdump_lib.rst           | 49 +++++++++++----------------
 2 files changed, 28 insertions(+), 37 deletions(-)

diff --git a/doc/guides/howto/packet_capture_framework.rst b/doc/guides/howto/packet_capture_framework.rst
index 946a21c..c941c01 100644
--- a/doc/guides/howto/packet_capture_framework.rst
+++ b/doc/guides/howto/packet_capture_framework.rst
@@ -19,7 +19,7 @@ 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
+disable packet capture. The library works on a multi process communication model and its
 usage is recommended for debugging purposes.
 
 The :ref:`dpdk-pdump <pdump_tool>` tool is developed based on the
@@ -28,14 +28,14 @@ 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.
+The application which initializes the packet capture framework will be a primary process
+and the application that enables or disables the packet capture will
+be a secondary process. The primary process sends the Rx and Tx packets from the DPDK ports
+to the secondary process.
 
-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
+In DPDK the ``testpmd`` application has been initialize with the packet
+capture framework and acts as primary process, and the ``dpdk-pdump`` tool acts as a
+secondary process. 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
diff --git a/doc/guides/prog_guide/pdump_lib.rst b/doc/guides/prog_guide/pdump_lib.rst
index 2a0f1f3..227eb1a 100644
--- a/doc/guides/prog_guide/pdump_lib.rst
+++ b/doc/guides/prog_guide/pdump_lib.rst
@@ -11,8 +11,12 @@ The library does the complete copy of the Rx and Tx mbufs to a new mempool and
 hence it slows down the performance of the applications, so it is recommended
 to use this library for debugging purposes.
 
+The library uses generic multi process channel to facilitate communication
+between primary and secondary process for enabling/disabling packet capture on
+ports.
+
 The library provides the following APIs to initialize the packet capture framework, to enable
-or disable the packet capture, and to uninitialize it:
+or disable the packet capture, and to uninitialize it.
 
 * ``rte_pdump_init()``:
   This API initializes the packet capture framework.
@@ -38,42 +42,29 @@ or disable the packet capture, and to uninitialize it:
 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 application has passed or under the default path i.e. either ``/var/run/.dpdk`` for
-root user or ``~/.dpdk`` for non root user.
-
-Applications that request enabling or disabling of the packet capture will have the client socket created either under
-the path that the application has passed or under the default path i.e. either ``/var/run/.dpdk`` for root user or
-``~/.dpdk`` for not root user to send the requests to the server. The server socket will listen for client requests for
-enabling or disabling the packet capture.
-
+The primary process using ``librte_pdump`` is responsible for initializing the packet
+capture framework. The packet capture framework, as part of its initialization, creates the
+multi process channel to facilitate communication with secondary process, so the
+secondary process ``app/pdump`` tool is responsible for enabling and disabling the packet capture on ports.
 
 Implementation Details
 ----------------------
 
-The library API ``rte_pdump_init()``, initializes the packet capture framework by creating the pdump server by calling
-``rte_mp_action_register()`` function. The server will listen to the client requests to enable or disable the
-packet capture.
+The library API ``rte_pdump_init()``, initializes the packet capture framework by creating the multi process
+channel using ``rte_mp_action_register()`` API. The primary process will listen to secondary process requests
+to enable or disable the packet capture over the multi process channel.
 
 The library APIs ``rte_pdump_enable()`` and ``rte_pdump_enable_by_deviceid()`` enables the packet capture.
-On each call to these APIs, the library creates a separate client socket, creates the "pdump enable" request and sends
-the request to the server. The server that is listening on the socket will take the request and enable the packet capture
-by registering the Ethernet RX and TX callbacks for the given port or device_id and queue combinations.
-Then the server will mirror the packets to the new mempool and enqueue them to the rte_ring that clients have passed
-to these APIs. The server also sends the response back to the client about the status of the request that was processed.
-After the response is received from the server, the client socket is closed.
+For the calls to these APIs from secondary process, the library creates the "pdump enable" request and sends
+the request to the primary process over the multi process channel, the primary process takes this request
+and enables the packet capture by registering the Ethernet RX and TX callbacks for the given port or device_id
+and queue combinations. Then the primary process will mirror the packets to the new mempool and enqueue them to
+the rte_ring that secondary process have passed to these APIs.
 
 The library APIs ``rte_pdump_disable()`` and ``rte_pdump_disable_by_deviceid()`` disables the packet capture.
-On each call to these APIs, the library creates a separate client socket, creates the "pdump disable" request and sends
-the request to the server. The server that is listening on the socket will take the request and disable the packet
-capture by removing the Ethernet RX and TX callbacks for the given port or device_id and queue combinations. The server
-also sends the response back to the client about the status of the request that was processed. After the response is
-received from the server, the client socket is closed.
+For the calls to these APIs from secondary process, the library creates the "pdump disable" request and sends
+the request to the primary process over the multi process channel, the primary process takes this request and disable
+the packet capture by removing the Ethernet RX and TX callbacks for the given port or device_id and queue combinations.
 
 The library API ``rte_pdump_uninit()``, uninitializes the packet capture framework by calling ``rte_mp_action_unregister()``
 function.
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: update pdump documentation
  2020-07-13 14:25 [dpdk-dev] [PATCH] doc: update pdump documentation Reshma Pattan
@ 2020-09-02 11:40 ` Pattan, Reshma
  2020-10-07 11:37   ` Pattan, Reshma
  2020-11-26 11:41 ` Bruce Richardson
  2020-11-26 13:51 ` [dpdk-dev] [PATCH v2] " Reshma Pattan
  2 siblings, 1 reply; 6+ messages in thread
From: Pattan, Reshma @ 2020-09-02 11:40 UTC (permalink / raw)
  To: dev, Mcnamara, John, Kovacevic, Marko



> -----Original Message-----
> From: Pattan, Reshma <reshma.pattan@intel.com>
> Sent: Monday, July 13, 2020 3:25 PM
> To: dev@dpdk.org
> Cc: Pattan, Reshma <reshma.pattan@intel.com>
> Subject: [PATCH] doc: update pdump documentation
> 
> Update the pdump library programmers guide and Howto doc with the use of
> multi process channel replacing socket based communication.
> 
> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
> ---

Gentle remainder for review and ack on this .

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: update pdump documentation
  2020-09-02 11:40 ` Pattan, Reshma
@ 2020-10-07 11:37   ` Pattan, Reshma
  0 siblings, 0 replies; 6+ messages in thread
From: Pattan, Reshma @ 2020-10-07 11:37 UTC (permalink / raw)
  To: Pattan, Reshma, dev, Mcnamara, John, Kovacevic, Marko



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Pattan, Reshma
> > -----Original Message-----
> > From: Pattan, Reshma <reshma.pattan@intel.com>
> 
> Gentle remainder for review and ack on this .

Gentle remainder to ack and apply

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: update pdump documentation
  2020-07-13 14:25 [dpdk-dev] [PATCH] doc: update pdump documentation Reshma Pattan
  2020-09-02 11:40 ` Pattan, Reshma
@ 2020-11-26 11:41 ` Bruce Richardson
  2020-11-26 13:51 ` [dpdk-dev] [PATCH v2] " Reshma Pattan
  2 siblings, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2020-11-26 11:41 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: dev

On Mon, Jul 13, 2020 at 03:25:25PM +0100, Reshma Pattan wrote:
> Update the pdump library programmers guide and Howto doc
> with the use of multi process channel replacing socket
> based communication.
> 
> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
> ---

Some minor adjustments I'd suggest below. Otherwise:

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

>  doc/guides/howto/packet_capture_framework.rst | 16 ++++-----
>  doc/guides/prog_guide/pdump_lib.rst           | 49 +++++++++++----------------
>  2 files changed, 28 insertions(+), 37 deletions(-)
> 
> diff --git a/doc/guides/howto/packet_capture_framework.rst b/doc/guides/howto/packet_capture_framework.rst
> index 946a21c..c941c01 100644
> --- a/doc/guides/howto/packet_capture_framework.rst
> +++ b/doc/guides/howto/packet_capture_framework.rst
> @@ -19,7 +19,7 @@ Introduction
>  
<snip>  
> -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
> +In DPDK the ``testpmd`` application has been initialize with the packet
> +capture framework and acts as primary process, and the ``dpdk-pdump`` tool acts as a
> +secondary process. To view Rx or Tx packets of ``testpmd``, the application should be

I think the original text was better for this block.

>  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
> diff --git a/doc/guides/prog_guide/pdump_lib.rst b/doc/guides/prog_guide/pdump_lib.rst
> index 2a0f1f3..227eb1a 100644
> --- a/doc/guides/prog_guide/pdump_lib.rst
> +++ b/doc/guides/prog_guide/pdump_lib.rst
> @@ -11,8 +11,12 @@ The library does the complete copy of the Rx and Tx mbufs to a new mempool and
>  hence it slows down the performance of the applications, so it is recommended
>  to use this library for debugging purposes.
>  
> +The library uses generic multi process channel to facilitate communication
                 ^^a

Missing word "a" in sentence.

> +between primary and secondary process for enabling/disabling packet capture on
> +ports.
> +
<snip>

>  The library APIs ``rte_pdump_disable()`` and ``rte_pdump_disable_by_deviceid()`` disables the packet capture.
> -On each call to these APIs, the library creates a separate client socket, creates the "pdump disable" request and sends
> -the request to the server. The server that is listening on the socket will take the request and disable the packet
> -capture by removing the Ethernet RX and TX callbacks for the given port or device_id and queue combinations. The server
> -also sends the response back to the client about the status of the request that was processed. After the response is
> -received from the server, the client socket is closed.
> +For the calls to these APIs from secondary process, the library creates the "pdump disable" request and sends
> +the request to the primary process over the multi process channel, the primary process takes this request and disable
                                                                  ^^.                                            ^^disables

Split sentence as indicated and also add "s" to disable.

> +the packet capture by removing the Ethernet RX and TX callbacks for the given port or device_id and queue combinations.
>  
>  The library API ``rte_pdump_uninit()``, uninitializes the packet capture framework by calling ``rte_mp_action_unregister()``
>  function.
> -- 
> 1.8.3.1
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH v2] doc: update pdump documentation
  2020-07-13 14:25 [dpdk-dev] [PATCH] doc: update pdump documentation Reshma Pattan
  2020-09-02 11:40 ` Pattan, Reshma
  2020-11-26 11:41 ` Bruce Richardson
@ 2020-11-26 13:51 ` Reshma Pattan
  2020-11-26 15:28   ` David Marchand
  2 siblings, 1 reply; 6+ messages in thread
From: Reshma Pattan @ 2020-11-26 13:51 UTC (permalink / raw)
  To: dev; +Cc: Reshma Pattan

Update the pdump library programmers guide and Howto doc
with the use of multi process channel replacing socket
based communication.

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
v2: fixes for the review comments
---
 doc/guides/howto/packet_capture_framework.rst | 12 +++----
 doc/guides/prog_guide/pdump_lib.rst           | 48 +++++++++++----------------
 2 files changed, 25 insertions(+), 35 deletions(-)

diff --git a/doc/guides/howto/packet_capture_framework.rst b/doc/guides/howto/packet_capture_framework.rst
index 6bd51f6..c31bac5 100644
--- a/doc/guides/howto/packet_capture_framework.rst
+++ b/doc/guides/howto/packet_capture_framework.rst
@@ -19,7 +19,7 @@ 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
+disable packet capture. The library works on a multi process communication model and its
 usage is recommended for debugging purposes.
 
 The :ref:`dpdk-pdump <pdump_tool>` tool is developed based on the
@@ -28,13 +28,13 @@ 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.
+The application which initializes the packet capture framework will be a primary process
+and the application that enables or disables the packet capture will
+be a secondary process. The primary process sends the Rx and Tx packets from the DPDK ports
+to the secondary process.
 
 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
+capture framework and acts 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
diff --git a/doc/guides/prog_guide/pdump_lib.rst b/doc/guides/prog_guide/pdump_lib.rst
index 2a0f1f3..3541cac 100644
--- a/doc/guides/prog_guide/pdump_lib.rst
+++ b/doc/guides/prog_guide/pdump_lib.rst
@@ -11,8 +11,12 @@ The library does the complete copy of the Rx and Tx mbufs to a new mempool and
 hence it slows down the performance of the applications, so it is recommended
 to use this library for debugging purposes.
 
+The library uses a generic multi process channel to facilitate communication
+between primary and secondary process for enabling/disabling packet capture on
+ports.
+
 The library provides the following APIs to initialize the packet capture framework, to enable
-or disable the packet capture, and to uninitialize it:
+or disable the packet capture, and to uninitialize it.
 
 * ``rte_pdump_init()``:
   This API initializes the packet capture framework.
@@ -38,42 +42,28 @@ or disable the packet capture, and to uninitialize it:
 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 application has passed or under the default path i.e. either ``/var/run/.dpdk`` for
-root user or ``~/.dpdk`` for non root user.
-
-Applications that request enabling or disabling of the packet capture will have the client socket created either under
-the path that the application has passed or under the default path i.e. either ``/var/run/.dpdk`` for root user or
-``~/.dpdk`` for not root user to send the requests to the server. The server socket will listen for client requests for
-enabling or disabling the packet capture.
-
+The primary process using ``librte_pdump`` is responsible for initializing the packet
+capture framework. The packet capture framework, as part of its initialization, creates the
+multi process channel to facilitate communication with secondary process, so the
+secondary process ``app/pdump`` tool is responsible for enabling and disabling the packet capture on ports.
 
 Implementation Details
 ----------------------
 
-The library API ``rte_pdump_init()``, initializes the packet capture framework by creating the pdump server by calling
-``rte_mp_action_register()`` function. The server will listen to the client requests to enable or disable the
-packet capture.
+The library API ``rte_pdump_init()``, initializes the packet capture framework by creating the multi process
+channel using ``rte_mp_action_register()`` API. The primary process will listen to secondary process requests
+to enable or disable the packet capture over the multi process channel.
 
 The library APIs ``rte_pdump_enable()`` and ``rte_pdump_enable_by_deviceid()`` enables the packet capture.
-On each call to these APIs, the library creates a separate client socket, creates the "pdump enable" request and sends
-the request to the server. The server that is listening on the socket will take the request and enable the packet capture
-by registering the Ethernet RX and TX callbacks for the given port or device_id and queue combinations.
-Then the server will mirror the packets to the new mempool and enqueue them to the rte_ring that clients have passed
-to these APIs. The server also sends the response back to the client about the status of the request that was processed.
-After the response is received from the server, the client socket is closed.
+For the calls to these APIs from secondary process, the library creates the "pdump enable" request and sends
+the request to the primary process over the multi process channel. The primary process takes this request
+and enables the packet capture by registering the Ethernet RX and TX callbacks for the given port or device_id
+and queue combinations. Then the primary process will mirror the packets to the new mempool and enqueue them to
+the rte_ring that secondary process have passed to these APIs.
 
 The library APIs ``rte_pdump_disable()`` and ``rte_pdump_disable_by_deviceid()`` disables the packet capture.
-On each call to these APIs, the library creates a separate client socket, creates the "pdump disable" request and sends
-the request to the server. The server that is listening on the socket will take the request and disable the packet
-capture by removing the Ethernet RX and TX callbacks for the given port or device_id and queue combinations. The server
-also sends the response back to the client about the status of the request that was processed. After the response is
-received from the server, the client socket is closed.
+For the calls to these APIs from secondary process, the library creates the "pdump disable" request and sends
+the request to the primary process over the multi process channel. The primary process takes this request and disables the packet capture by removing the Ethernet RX and TX callbacks for the given port or device_id and queue combinations.
 
 The library API ``rte_pdump_uninit()``, uninitializes the packet capture framework by calling ``rte_mp_action_unregister()``
 function.
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] doc: update pdump documentation
  2020-11-26 13:51 ` [dpdk-dev] [PATCH v2] " Reshma Pattan
@ 2020-11-26 15:28   ` David Marchand
  0 siblings, 0 replies; 6+ messages in thread
From: David Marchand @ 2020-11-26 15:28 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: dev, Bruce Richardson

On Thu, Nov 26, 2020 at 2:58 PM Reshma Pattan <reshma.pattan@intel.com> wrote:
>
> Update the pdump library programmers guide and Howto doc
> with the use of multi process channel replacing socket
> based communication.
>
> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

[snip]

>  The library APIs ``rte_pdump_disable()`` and ``rte_pdump_disable_by_deviceid()`` disables the packet capture.
> -On each call to these APIs, the library creates a separate client socket, creates the "pdump disable" request and sends
> -the request to the server. The server that is listening on the socket will take the request and disable the packet
> -capture by removing the Ethernet RX and TX callbacks for the given port or device_id and queue combinations. The server
> -also sends the response back to the client about the status of the request that was processed. After the response is
> -received from the server, the client socket is closed.
> +For the calls to these APIs from secondary process, the library creates the "pdump disable" request and sends
> +the request to the primary process over the multi process channel. The primary process takes this request and disables the packet capture by removing the Ethernet RX and TX callbacks for the given port or device_id and queue combinations.

I split this long line to multiple ~100 characters lines like the rest
of the document.

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-26 15:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 14:25 [dpdk-dev] [PATCH] doc: update pdump documentation Reshma Pattan
2020-09-02 11:40 ` Pattan, Reshma
2020-10-07 11:37   ` Pattan, Reshma
2020-11-26 11:41 ` Bruce Richardson
2020-11-26 13:51 ` [dpdk-dev] [PATCH v2] " Reshma Pattan
2020-11-26 15:28   ` David Marchand

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).