pdump: add new library for packet capture
authorReshma Pattan <reshma.pattan@intel.com>
Wed, 15 Jun 2016 14:06:22 +0000 (15:06 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 16 Jun 2016 21:39:56 +0000 (23:39 +0200)
commit278f945402c55497c614de3f46b1a7660782eaf9
tree8cd1b85476c3110399ff98fc473a36a179c74a3c
parentbde516d5a85a513d79557cee7b86a63d872b6281
pdump: add new library for packet capture

The librte_pdump library provides a framework for
packet capturing in dpdk. The library provides set of
APIs to initialize the packet capture framework, to
enable or disable the packet capture, and to uninitialize
it.

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.

Enabling APIs are supported with port, queue, ring and
mempool parameters. Applications should pass on this information
to get the packets from the dpdk ports.

For enabling requests from applications, library creates the client
request containing the mempool, ring, port and queue information and
sends the request to the server. After receiving the request, server
registers the Rx and Tx callbacks for all the port and queues.
After the callbacks registration, registered callbacks will get the
Rx and Tx packets. Packets then will be copied to the new mbufs that
are allocated from the user passed mempool. These new mbufs then will
be enqueued to the application passed ring. Applications need to dequeue
the mbufs from the rings and direct them to the devices like
pcap vdev for viewing the packets outside of the dpdk
using the packet capture tools.

For disabling requests, library creates the client request containing
the port and queue information and sends the request to the server.
After receiving the request, server removes the Rx and Tx callback
for all the port and queues.

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
MAINTAINERS
config/common_base
doc/guides/prog_guide/index.rst
doc/guides/prog_guide/pdump_lib.rst [new file with mode: 0644]
doc/guides/rel_notes/release_16_07.rst
lib/Makefile
lib/librte_pdump/Makefile [new file with mode: 0644]
lib/librte_pdump/rte_pdump.c [new file with mode: 0644]
lib/librte_pdump/rte_pdump.h [new file with mode: 0644]
lib/librte_pdump/rte_pdump_version.map [new file with mode: 0644]
mk/rte.app.mk