[dpdk-dev] [PATCH v8 5/8] lib/librte_pdump: add new library for packet capturing support

Pattan, Reshma reshma.pattan at intel.com
Sat Jun 11 00:14:39 CEST 2016


Hi,

> -----Original Message-----
> From: Aaron Conole [mailto:aconole at redhat.com]
> Sent: Friday, June 10, 2016 7:48 PM
> To: Pattan, Reshma <reshma.pattan at intel.com>
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v8 5/8] lib/librte_pdump: add new library for
> packet capturing support
> 
> Hi Reshma,
> 
> Reshma Pattan <reshma.pattan at intel.com> writes:
> 
> > Added new library for packet capturing support.
> >
> > Added public api rte_pdump_init, applications should call this as part
> > of their application setup to have packet capturing framework ready.
> >
> > Added public api rte_pdump_uninit to uninitialize the packet capturing
> > framework.
> >
> > Added public apis rte_pdump_enable and rte_pdump_disable to enable and
> > disable packet capturing on specific port and queue.
> >
> > Added public apis rte_pdump_enable_by_deviceid and
> > rte_pdump_disable_by_deviceid to enable and disable packet capturing
> > on a specific device (pci address or name) and queue.
> >
> > Added public api rte_pdump_set_socket_dir to set the server socket
> > path.
> 
> Thanks for this, it is quite useful!  I am wondering, should the same API work for
> a client socket as well?  The code becomes a bit easier to maintain, and the API
> behaves whether executed from client or server.
> Thoughts?

In this patch, server socket path is added as argument to rte_pdump_init() , so server socket path must be passed while calling rte_pdump_init() API.
And  rte_pdump_set_socket_dir() is added for clients , as client need to know server socket path for contacting server,  so application should pass server socket path for clients using this API. 

Could you please clarify which of the below option you are looking to have?
a)If you want to have client and server  sockets under same non default path this can be done using same API. This just needs a tiny change in the code.

b)But if you want to have aserver and client sockets under  different paths, this can done using either of the below approaches.
b1)use same rte_pdump_set_socket_dir()  API, but add  a new argument  to specify  if the path is for server or client socket. 
 	(or) 
b2)have two separate APIs to set client and server socket paths. 

Which one do you prefer? 

Konstantin, any comments from your side, please add. 

Thanks,
Reshma

> 
> Thanks,
> Aaron
> 


More information about the dev mailing list