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, 20 Mar 2014 17:30:32 +0100 Message-ID: <2143975.C98iGihseR@xps13> References: <20140227091856.768d413c@nehalam.linuxnetplumber.net> 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: <20140227091856.768d413c-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org> 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, 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 =E2=80=98rte_snprintf=E2=80=99 can never be inlined because= it uses variable > argument lists [-Werror=3Dinline] >=20 > Therefore since both rte_snprintf and rte_strsplit are not performanc= e > sensitive just move them to being real functions. >=20 > Signed-off-by: Stephen Hemminger > --- /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 > +#include > +#include > +#include I think stddef.h is not needed. =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" { > #include > #include > #include > -#include =20 stdarg and stddef are not needed. =20 [...] > +int > +rte_snprintf(char *buffer, int buflen, const char *format, ...); >=20 >=20 One blank line should be sufficient. > +int > rte_strsplit(char *string, int stringlen, Thank you --=20 Thomas