From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id ED275C568 for ; Fri, 26 Jun 2015 10:25:59 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 26 Jun 2015 01:25:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,683,1427785200"; d="scan'208";a="750833295" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga002.fm.intel.com with ESMTP; 26 Jun 2015 01:25:58 -0700 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.39]) by IRSMSX106.ger.corp.intel.com ([169.254.8.121]) with mapi id 14.03.0224.002; Fri, 26 Jun 2015 09:25:57 +0100 From: "Mrzyglod, DanielX T" To: "Mrzyglod, DanielX T" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] cfgfile: Fix for Reading Files on nfs filesystem. Thread-Index: AQHQrplAGoPAdhztt0CYnAKl1v5dzZ2+de9A Date: Fri, 26 Jun 2015 08:25:56 +0000 Message-ID: <7ADD74816B4C8A45B56203CBA65FE5A61D905589@IRSMSX107.ger.corp.intel.com> References: <1435162530-9272-1-git-send-email-danielx.t.mrzyglod@intel.com> In-Reply-To: <1435162530-9272-1-git-send-email-danielx.t.mrzyglod@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] cfgfile: Fix for Reading Files on nfs filesystem. 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: Fri, 26 Jun 2015 08:26:00 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Daniel Mrzyglod > Sent: Wednesday, June 24, 2015 6:16 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] cfgfile: Fix for Reading Files on nfs filesys= tem. >=20 > The problem occure when we have config files on NFS filesystem. > Solution with minimal change to library is to add buffer for I/O operatio= ns. > Without buffering there is 3-10% of faulty Reading from NFS. >=20 > The problem seems to be only NFS filesystem. >=20 > Signed-off-by: Daniel Mrzyglod > --- > lib/librte_cfgfile/rte_cfgfile.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cf= gfile.c > index b81c273..6105e0c 100644 > --- a/lib/librte_cfgfile/rte_cfgfile.c > +++ b/lib/librte_cfgfile/rte_cfgfile.c > @@ -93,10 +93,13 @@ rte_cfgfile_load(const char *filename, int flags) > int curr_section =3D -1; > int curr_entry =3D -1; > char buffer[256]; > + char f_streambuff[BUFSIZ]; > int lineno =3D 0; > struct rte_cfgfile *cfg =3D NULL; > + memset(f_streambuff,'\0',BUFSIZ); >=20 > FILE *f =3D fopen(filename, "r"); > + setbuf( f, f_streambuff); > if (f =3D=3D NULL) > return NULL; >=20 > -- > 2.1.0 Self NACK