From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 17A2B1DB1 for ; Tue, 31 May 2016 17:00:26 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 31 May 2016 08:00:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,395,1459839600"; d="scan'208";a="818433105" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga003.jf.intel.com with ESMTP; 31 May 2016 08:00:10 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.193]) by IRSMSX101.ger.corp.intel.com ([163.33.3.153]) with mapi id 14.03.0248.002; Tue, 31 May 2016 16:00:09 +0100 From: "Pattan, Reshma" To: "Ananyev, Konstantin" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4 5/9] lib/librte_pdump: add new library for packet capturing support Thread-Index: AQHRuB0rl7xRZQvngkqqk9oqlli5EJ/TKPGg Date: Tue, 31 May 2016 15:00:08 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F010454B1@IRSMSX109.ger.corp.intel.com> References: <1463503030-10318-1-git-send-email-reshma.pattan@intel.com> <1464039512-2683-1-git-send-email-reshma.pattan@intel.com> <1464039512-2683-6-git-send-email-reshma.pattan@intel.com> <2601191342CEEE43887BDE71AB97725836B67FBC@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB97725836B67FBC@irsmsx105.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjRjMTYwYjYtYjA4ZC00MTUzLWI0ODQtMGQxNjYxZDdmNDlhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkM4U0FaWnhSQVI0RWtBdnZYQnFDQUNrS1BJT0N2MWpSa0tVQVU1ZVQ2Umc9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 5/9] lib/librte_pdump: add new library for packet capturing support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2016 15:00:28 -0000 > -----Original Message----- > From: Ananyev, Konstantin > Sent: Friday, May 27, 2016 2:39 PM > To: Pattan, Reshma ; dev@dpdk.org > Cc: Pattan, Reshma > Subject: RE: [dpdk-dev] [PATCH v4 5/9] lib/librte_pdump: add new library = for > packet capturing support >=20 > > +/* 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 =3D SOCKET_PATH_VAR_RUN; > > + const char *home_dir =3D getenv(SOCKET_PATH_HOME); > > + > > + if (getuid() !=3D 0 && home_dir !=3D NULL) > > + dir =3D home_dir; > > + > > + mkdir(dir, 700); > > + if (type =3D=3D SERVER) > > + snprintf(buffer, bufsz, SERVER_SOCKET, dir); > > + else > > + snprintf(buffer, bufsz, CLIENT_SOCKET, dir, getpid(), > > + rte_sys_gettid()); >=20 >=20 > Probably add internal_config.hugefile_prefix into the name too, in case t= here is > multiple primary DPDK procs running? >=20 Since there is no public api in rte_eal to get internal_config.hugefile_pre= fix info, this cannot be affixed to the server name. =20 > Konstantin