From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 1.6.1] don't inline rte_string_fns Date: Thu, 17 Apr 2014 15:40:17 +0200 Message-ID: <1794311.7dRdTpIyDP@xps13> References: <20140227091856.768d413c@nehalam.linuxnetplumber.net> <2143975.C98iGihseR@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: dev-VfR2kkLFssw@public.gmane.org To: Stephen Hemminger Return-path: In-Reply-To: <2143975.C98iGihseR@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hi Stephen, This patch is still pending. Please send a v2. 2014-03-20 17:30, Thomas Monjalon: > Hi, >=20 > I have some minor comments below. >=20 > 27/02/2014 09:18, Stephen Hemminger : > > The function rte_snprintf() can never be inlined by Gcc. > >=20 > > If compiled with -Winline it generates an error: > > function =E2=80=98rte_snprintf=E2=80=99 can never be inlined becau= se it uses variable > >=20 > > argument lists [-Werror=3Dinline] > >=20 > > Therefore since both rte_snprintf and rte_strsplit are not performa= nce > > sensitive just move them to being real functions. > >=20 > > Signed-off-by: Stephen Hemminger > >=20 > > --- /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= . >=20 > It is now 2014 in version 1.6.0. >=20 > [...] >=20 > > +#include > > +#include > > +#include > > +#include >=20 > I think stddef.h is not needed. >=20 > [...] >=20 > > --- 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" { > >=20 > > #include > > #include > > #include > >=20 > > -#include >=20 > stdarg and stddef are not needed. >=20 > [...] >=20 > > +int > > +rte_snprintf(char *buffer, int buflen, const char *format, ...); >=20 > One blank line should be sufficient. >=20 > > +int > >=20 > > rte_strsplit(char *string, int stringlen, >=20 > Thank you