From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f176.google.com (mail-wr0-f176.google.com [209.85.128.176]) by dpdk.org (Postfix) with ESMTP id 9CB8D7CCC for ; Sat, 2 Sep 2017 14:54:40 +0200 (CEST) Received: by mail-wr0-f176.google.com with SMTP id y21so2993113wrd.4 for ; Sat, 02 Sep 2017 05:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-transfer-encoding:mime-version; bh=LADRnIyDZkxgOsTJCDlBnVB5DMrPdpiNDaek4UQDXf0=; b=olk+2h38rPY6ythSyPL6Y0Eo4T8Zeng/mNrb/y16wBmg0oyfQATzV8fRKh8akKadU7 M9oWlBoF0PAIEo7bGDROP/iLIFreghr8T1uIkMspm0ScmrI4tcslJA4SlEvRQ623Fkfl Duqohi01aGyNaQQlq4eVbbkFJyD3Ihof9rM+Xhsp5Iy6Ns+lSw9IwIpcjRehyMQY2fgk 23FxilMrh14KegRt4ort05xEPs4HO9voHGtz4v5BaD488z3NdcmFrWIpdoKYZYAv/J/9 IG+sQoDozESyKCb9xdL9v16/FVg17R9yrnGSorFdMw/BvUWVCpxp+EJLZeENL4dAPD1G osHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=LADRnIyDZkxgOsTJCDlBnVB5DMrPdpiNDaek4UQDXf0=; b=iNlP1+BHNCwxEl+2fTOMYYTPEWsGAjD1O0hSfKWg+s8Tqn7evRTmJ3ZnPruSxQ816m knCY3etUg740x3Lftd8MhKimFC8jQEhdp8L6cOyceStgAxwbAHSab3U5xrNX8B5kAOep tCDcBQEX0lqTsOm5Ddxxd26nNiv2Ep8e1SQaHk3XRffXzq5KPi01fRYzoVp25Lt8sz6f m+WKBi5r9xpcIIY7EP9e4Fexqf1dmRvXbkbfLtkdEBkvG1AZS/tvTojYIMefEz0PwcYw 1apkT9LUZ/YrEx5YCTG104gvzmHB4pPePD1BPcPoIERDmoe2a3ntAVGNNztwzmwlc2O1 1P/g== X-Gm-Message-State: AHPjjUhII/fUFBgOirrQ04tQJRMYsG/MJA+/RrOWH5DpIonZ4Zir0tc4 wCFwU+115dQhQw== X-Google-Smtp-Source: ADKCNb44nOG+5wFyVrb/wf87DzY69gTSEd+ArlMnb8i+79Bu4J0c8gPZhsBQEOnbe16AtQMGDFw9yg== X-Received: by 10.223.160.97 with SMTP id l30mr2810393wrl.55.1504356879929; Sat, 02 Sep 2017 05:54:39 -0700 (PDT) Received: from localhost ([2a00:23c5:bef3:400:4a51:b7ff:fe0b:4749]) by smtp.gmail.com with ESMTPSA id d10sm1022073wmh.26.2017.09.02.05.54.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Sep 2017 05:54:39 -0700 (PDT) Message-ID: <1504356878.26853.3.camel@gmail.com> From: Luca Boccassi To: "Wang, Yipeng1" Cc: "dev@dpdk.org" Date: Sat, 02 Sep 2017 13:54:38 +0100 In-Reply-To: References: <1503361193-36699-1-git-send-email-yipeng1.wang@intel.com> <1503361193-36699-2-git-send-email-yipeng1.wang@intel.com> <1503396136.6638.1.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/7] member: implement main API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Sep 2017 12:54:40 -0000 On Thu, 2017-08-24 at 18:38 +0000, Wang, Yipeng1 wrote: > > -----Original Message----- > > From: Luca Boccassi [mailto:luca.boccassi@gmail.com] > > Sent: Tuesday, August 22, 2017 3:02 AM > > To: Wang, Yipeng1 > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH 1/7] member: implement main API > >=20 > > On Mon, 2017-08-21 at 17:19 -0700, Yipeng Wang wrote: > > > Membership library is an extension and generalization of a > > > traditional > > > filter (for example Bloom Filter) structure. In general, the > > > Membership > > > library is a data structure that provides a "set-summary" and > > > responds > > > to set-membership queries of whether a certain element belongs to > > > a > > > set(s). A membership test for an element will return the set this > > > element > > > belongs to or not-found if the element is never inserted into the > > > set-summary. > > >=20 > > > The results of the membership test is not 100% accurate. Certain > > > false positive or false negative probability could exist. > > > However, > > > comparing to a "full-blown" complete list of elements, a "set- > > > summary" > > > is memory efficient and fast on lookup. > > >=20 > > > This patch add the main API definition. > > >=20 > > > Signed-off-by: Yipeng Wang > > > --- > > > =C2=A0lib/Makefile=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0=C2=A0=C2=A02 + > > > =C2=A0lib/librte_eal/common/eal_common_log.c=C2=A0=C2=A0=C2=A0|=C2=A0= =C2=A0=C2=A01 + > > > =C2=A0lib/librte_eal/common/include/rte_log.h=C2=A0=C2=A0|=C2=A0=C2= =A0=C2=A01 + > > > =C2=A0lib/librte_member/Makefile=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0=C2=A048 +++ > > > =C2=A0lib/librte_member/rte_member.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0| 357 > > > +++++++++++++++++++++ > > > =C2=A0lib/librte_member/rte_member.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0| 518 > > > +++++++++++++++++++++++++++++++ > > > =C2=A0lib/librte_member/rte_member_version.map |=C2=A0=C2=A015 + > > > =C2=A07 files changed, 942 insertions(+) > > > =C2=A0create mode 100644 lib/librte_member/Makefile > > > =C2=A0create mode 100644 lib/librte_member/rte_member.c > > > =C2=A0create mode 100644 lib/librte_member/rte_member.h > > > =C2=A0create mode 100644 lib/librte_member/rte_member_version.map > > >=20 > > > diff --git a/lib/librte_member/Makefile > > > b/lib/librte_member/Makefile > > > new file mode 100644 > > > index 0000000..997c825 > > > --- /dev/null > > > +++ b/lib/librte_member/Makefile > > > @@ -0,0 +1,48 @@ > > > +#=C2=A0=C2=A0=C2=A0BSD LICENSE > > > +# > > > +#=C2=A0=C2=A0=C2=A0Copyright(c) 2017 Intel Corporation. All rights r= eserved. > > > +#=C2=A0=C2=A0=C2=A0All rights reserved. > > > +# > > > +#=C2=A0=C2=A0=C2=A0Redistribution and use in source and binary forms= , with or > > > without > > > +#=C2=A0=C2=A0=C2=A0modification, are permitted provided that the fol= lowing > > > conditions > > > +#=C2=A0=C2=A0=C2=A0are met: > > > +# > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Redistributions of source code must= retain the above > > > copyright > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0notice, this list of cond= itions and the following > > > disclaimer. > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Redistributions in binary form must= reproduce the above > > > copyright > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0notice, this list of cond= itions and the following > > > disclaimer > > > in > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0the documentation and/or = other materials provided with > > > the > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0distribution. > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Neither the name of Intel Corporati= on nor the names of > > > its > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0contributors may be used = to endorse or promote products > > > derived > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0from this software withou= t specific prior written > > > permission. > > > +# > > > +#=C2=A0=C2=A0=C2=A0THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER= S AND > > > CONTRIBUTORS > > > +#=C2=A0=C2=A0=C2=A0"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, IN= CLUDING, > > > BUT > > > NOT > > > +#=C2=A0=C2=A0=C2=A0LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABI= LITY AND > > > FITNESS FOR > > > +#=C2=A0=C2=A0=C2=A0A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT = SHALL THE > > > COPYRIGHT > > > +#=C2=A0=C2=A0=C2=A0OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, I= NDIRECT, > > > INCIDENTAL, > > > +#=C2=A0=C2=A0=C2=A0SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INC= LUDING, > >=20 > > BUT NOT > > > +#=C2=A0=C2=A0=C2=A0LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SE= RVICES; > >=20 > > LOSS OF > > > USE, > > > +#=C2=A0=C2=A0=C2=A0DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEV= ER CAUSED > >=20 > > AND > > > ON ANY > > > +#=C2=A0=C2=A0=C2=A0THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT = LIABILITY, > > > OR > > > TORT > > > +#=C2=A0=C2=A0=C2=A0(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN AN= Y WAY OUT > >=20 > > OF > > > THE USE > > > +#=C2=A0=C2=A0=C2=A0OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBIL= ITY OF SUCH > > > DAMAGE. > > > + > > > +include $(RTE_SDK)/mk/rte.vars.mk > > > + > > > +# library name > > > +LIB =3D librte_member.a > > > + > > > +CFLAGS +=3D $(WERROR_FLAGS) -I$(SRCDIR) -O3 > > > + > >=20 > > This breaks reproducibility as the output directory will be > > included > > before the source directory, causing a race - please do something > > like: > >=20 > > CFLAGS :=3D -I$(SRCDIR) $(CFLAGS) > > CFLAGS +=3D $(WERROR_FLAGS) -O3 > >=20 >=20 > [Wang, Yipeng]=C2=A0 > Thanks Luca, I will reverse the include order in next version. >=20 > I am not an expert on the build system, to be more clear, the race > condition you=C2=A0 > mentioned is because the library may search build directory first > that some symlinks > may have not been created yet, right? >=20 > Thanks Yes, and as a consequence on some builds the DWARF symbols list lib/libfoo/foo.h as the source file path in the .debug, and on some builds they list build-dir/include/foo.h > > > +EXPORT_MAP :=3D rte_member_version.map > > > + > > > +LIBABIVER :=3D 1 > > > + > > > +# all source are stored in SRCS-y > > > +SRCS-$(CONFIG_RTE_LIBRTE_MEMBER) +=3D=C2=A0=C2=A0rte_member.c > > > +# install includes > > > +SYMLINK-$(CONFIG_RTE_LIBRTE_MEMBER)-include :=3D rte_member.h > > > + > > > +include $(RTE_SDK)/mk/rte.lib.mk > >=20 > > -- > > Kind regards, > > Luca Boccassi --=20 Kind regards, Luca Boccassi