Added tcpdump design changes to proc_info section of
sample application user guide.
Added tcpdump design changes env abstraction layer section
of programmers guide.

Signed-off-by: Reshma Pattan <reshma.pattan at intel.com>
---
 doc/guides/prog_guide/env_abstraction_layer.rst |   29 +++++++++++++++++++-
 doc/guides/sample_app_ug/proc_info.rst          |   34 +++++++++++++++++++++--
 2 files changed, 59 insertions(+), 4 deletions(-)

diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst 
b/doc/guides/prog_guide/env_abstraction_layer.rst
index 89feb69..7455664 100644
--- a/doc/guides/prog_guide/env_abstraction_layer.rst
+++ b/doc/guides/prog_guide/env_abstraction_layer.rst
@@ -1,5 +1,5 @@
 ..  BSD LICENSE
-    Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+    Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
     All rights reserved.

     Redistribution and use in source and binary forms, with or without
@@ -174,6 +174,8 @@ User Space Interrupt Event
 The EAL creates a host thread to poll the UIO device file descriptors to 
detect the interrupts.
 Callbacks can be registered or unregistered by the EAL functions for a 
specific interrupt event
 and are called in the host thread asynchronously.
+The EAL thread also polls for tcpdump fd. If fd polled matches tcpdump fd, 
will initiate tcpdump
+processing.
 The EAL also allows timed callbacks to be used in the same way as for NIC 
interrupts.

 .. note::
@@ -207,6 +209,31 @@ The eth_dev driver takes responsibility to program the 
latter mapping.
 The RX interrupt are controlled/enabled/disabled by ethdev APIs - 
'rte_eth_dev_rx_intr_*'. They return failure if the PMD
 hasn't support them yet. The intr_conf.rxq flag is used to turn on the 
capability of RX interrupt per device.

++ Tcpdump
+Create socket for tcpdump connection with secondary and registers socket with
+tcpdump epoll event. tcpdump event will be polled as part of interrupt thread.
+
+Creates mempool and  two rte_rings for packets duplication and sharing packet 
info
+with secondary respectively.
+
+Upon receiving tcpdump event, receive either register RX/TX callbacks or remove
+RX/TX callbacks message from secondary on socket.
+
+For Register RX/TX callbacks message:
+        Process port, queue and src ip filter options of message.
+        Registers rte_eth_rxtx_callbacks for a given port and queue 
information.
+
+        Rx callback will apply src ip filter filter on recived packets and 
matched packets will be
+        duplicated on to  new mempool. Duplicated packets will be enqueued to 
one of the rte_ring for
+        secondary process to use.
+
+        TX callback will apply src ip filter filter on original packets and if 
packet matches,
+        reference count of packet will be incremented and enqueued to second 
rte_ring for
+        secondary process to use.
+
+For Remove RX/TX callbacks message:
+        Removes the registered rte_erth_rxtx callbacks for the given port and 
queue.
+
 Blacklisting
 ~~~~~~~~~~~~

diff --git a/doc/guides/sample_app_ug/proc_info.rst 
b/doc/guides/sample_app_ug/proc_info.rst
index 542950b..42e8366 100644
--- a/doc/guides/sample_app_ug/proc_info.rst
+++ b/doc/guides/sample_app_ug/proc_info.rst
@@ -1,6 +1,6 @@

 ..  BSD LICENSE
-    Copyright(c) 2015 Intel Corporation. All rights reserved.
+    Copyright(c) 2015-2016 Intel Corporation. All rights reserved.
     All rights reserved.

     Redistribution and use in source and binary forms, with or without
@@ -39,19 +39,47 @@ statistics, resetting port statistics and printing DPDK 
memory information.
 This application extends the original functionality that was supported by
 dump_cfg.

+This application now supports tcpdump feature. Using command line options
+user will pass on port, queue information along with src ip as filtering 
option.
+
+Overview of tcpdump flow
+--------------------------
+*Parse given port, queue and src ip filtering options.
+
+*Creates socket to communicate port, queue & src ip filter information with
+primary process to register RX/TX callbacks.
+
+*Creates two pcap devices only with tx queues, one for ingress and other for
+egress tcpdump packets.
+
+Fetches packets from rte_rings which are used between primary and
+proc_info for sharing ingress and egress packets of given port and queue.
+
+Writes on ingress and egress packets of particular port and queue
+to ingress and egress pcap devices respectively.
+
+Upon application termination i.e ctrl+c, sends on socket request to remove
+RX/TX callbacks registerd by primary.
+
 Running the Application
 -----------------------
 The application has a number of command line options:

 .. code-block:: console

-   ./$(RTE_TARGET)/app/dpdk_proc_info -- -m | [-p PORTMASK] [--stats | 
--xstats |
-   --stats-reset | --xstats-reset]
+   ./$(RTE_TARGET)/app/dpdk_proc_info -- -m | [-p PORTMASK] [--tcpdump 
(port,queue)] [ --src-ip-filter \"A.B.C.D\"]
+        [--stats | --xstats | --stats-reset | --xstats-reset]

 Parameters
 ~~~~~~~~~~
 **-p PORTMASK**: Hexadecimal bitmask of ports to configure.

+**--tcpdump (port,queue)**:  port and queue info from which packets should be 
captured
+for tcpdump
+
+**--src-ip-filter \"A.B.C.D\"**: apply src ip as filtering on packets from 
given
+tcpdump port and queue.
+
 **--stats**
 The stats parameter controls the printing of generic port statistics. If no
 port mask is specified stats are printed for all DPDK ports.
-- 
1.7.4.1

Reply via email to