DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mrzyglod, DanielX T" <danielx.t.mrzyglod@intel.com>
To: "Mrzyglod, DanielX T" <danielx.t.mrzyglod@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] cfgfile: Fix for Reading Files on nfs filesystem.
Date: Fri, 26 Jun 2015 08:25:56 +0000	[thread overview]
Message-ID: <7ADD74816B4C8A45B56203CBA65FE5A61D905589@IRSMSX107.ger.corp.intel.com> (raw)
In-Reply-To: <1435162530-9272-1-git-send-email-danielx.t.mrzyglod@intel.com>



> -----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 filesystem.
> 
> The problem occure when we have config files on NFS filesystem.
> Solution with minimal change to library is to add buffer for I/O operations.
> Without buffering there is  3-10% of faulty Reading from NFS.
> 
> The problem seems to be only NFS filesystem.
> 
> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
> ---
>  lib/librte_cfgfile/rte_cfgfile.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.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 = -1;
>  	int curr_entry = -1;
>  	char buffer[256];
> +	char f_streambuff[BUFSIZ];
>  	int lineno = 0;
>  	struct rte_cfgfile *cfg = NULL;
> +	memset(f_streambuff,'\0',BUFSIZ);
> 
>  	FILE *f = fopen(filename, "r");
> +	setbuf( f, f_streambuff);
>  	if (f == NULL)
>  		return NULL;
> 
> --
> 2.1.0

Self NACK

      parent reply	other threads:[~2015-06-26  8:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24 16:15 Daniel Mrzyglod
2015-06-24 16:23 ` Thomas Monjalon
2015-06-26  8:25 ` Mrzyglod, DanielX T [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ADD74816B4C8A45B56203CBA65FE5A61D905589@IRSMSX107.ger.corp.intel.com \
    --to=danielx.t.mrzyglod@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).