From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1.6.1] don't inline rte_string_fns
Date: Thu, 17 Apr 2014 15:40:17 +0200 [thread overview]
Message-ID: <1794311.7dRdTpIyDP@xps13> (raw)
In-Reply-To: <2143975.C98iGihseR@xps13>
Hi Stephen,
This patch is still pending.
Please send a v2.
2014-03-20 17:30, Thomas Monjalon:
> Hi,
>
> I have some minor comments below.
>
> 27/02/2014 09:18, Stephen Hemminger :
> > The function rte_snprintf() can never be inlined by Gcc.
> >
> > If compiled with -Winline it generates an error:
> > function ‘rte_snprintf’ can never be inlined because it uses variable
> >
> > argument lists [-Werror=inline]
> >
> > Therefore since both rte_snprintf and rte_strsplit are not performance
> > sensitive just move them to being real functions.
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> >
> > --- /dev/null
> > +++ b/lib/librte_eal/common/eal_common_string_fns.c
> > @@ -0,0 +1,95 @@
> > +/*-
> > + * BSD LICENSE
> > + *
> > + * Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
>
> It is now 2014 in version 1.6.0.
>
> [...]
>
> > +#include <stdio.h>
> > +#include <stdarg.h>
> > +#include <stddef.h>
> > +#include <errno.h>
>
> I think stddef.h is not needed.
>
> [...]
>
> > --- a/lib/librte_eal/common/include/rte_string_fns.h
> > +++ b/lib/librte_eal/common/include/rte_string_fns.h
> > @@ -47,7 +47,6 @@ extern "C" {
> >
> > #include <stdio.h>
> > #include <stdarg.h>
> > #include <stddef.h>
> >
> > -#include <errno.h>
>
> stdarg and stddef are not needed.
>
> [...]
>
> > +int
> > +rte_snprintf(char *buffer, int buflen, const char *format, ...);
>
> One blank line should be sufficient.
>
> > +int
> >
> > rte_strsplit(char *string, int stringlen,
>
> Thank you
prev parent reply other threads:[~2014-04-17 13:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 17:18 Stephen Hemminger
2014-03-20 16:30 ` Thomas Monjalon
2014-04-17 13:40 ` Thomas Monjalon [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=1794311.7dRdTpIyDP@xps13 \
--to=thomas.monjalon@6wind.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.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).