> -----Original Message-----
> From: Ananyev, Konstantin
> Sent: Friday, May 27, 2016 2:39 PM
> To: Pattan, Reshma <reshma.pattan at intel.com>; dev at dpdk.org
> Cc: Pattan, Reshma <reshma.pattan at intel.com>
> Subject: RE: [dpdk-dev] [PATCH v4 5/9] lib/librte_pdump: add new library for
> packet capturing support
> 
> > +/* get socket path (/var/run if root, $HOME otherwise) */ static void
> > +pdump_get_socket_path(char *buffer, int bufsz, enum pdump_socktype
> > +type) {
> > +   const char *dir = SOCKET_PATH_VAR_RUN;
> > +   const char *home_dir = getenv(SOCKET_PATH_HOME);
> > +
> > +   if (getuid() != 0 && home_dir != NULL)
> > +           dir = home_dir;
> > +
> > +   mkdir(dir, 700);
> > +   if (type == SERVER)
> > +           snprintf(buffer, bufsz, SERVER_SOCKET, dir);
> > +   else
> > +           snprintf(buffer, bufsz, CLIENT_SOCKET, dir, getpid(),
> > +                           rte_sys_gettid());
> 
> 
> Probably add internal_config.hugefile_prefix into the name too, in case there 
> is
> multiple primary DPDK procs running?
> 

Since there is no public api in rte_eal to get internal_config.hugefile_prefix 
info, this cannot be affixed to the server name.

> Konstantin

Reply via email to