From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luca Boccassi Subject: Re: [PATCH 1/7] member: implement main API Date: Tue, 22 Aug 2017 11:02:16 +0100 Message-ID: <1503396136.6638.1.camel@gmail.com> References: <1503361193-36699-1-git-send-email-yipeng1.wang@intel.com> <1503361193-36699-2-git-send-email-yipeng1.wang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Yipeng Wang Return-path: Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) by dpdk.org (Postfix) with ESMTP id A9D45237 for ; Tue, 22 Aug 2017 12:02:19 +0200 (CEST) Received: by mail-wr0-f180.google.com with SMTP id k46so45978045wre.2 for ; Tue, 22 Aug 2017 03:02:19 -0700 (PDT) In-Reply-To: <1503361193-36699-2-git-send-email-yipeng1.wang@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 reser= ved. > +#=C2=A0=C2=A0=C2=A0All rights reserved. > +# > +#=C2=A0=C2=A0=C2=A0Redistribution and use in source and binary forms, wi= th or > without > +#=C2=A0=C2=A0=C2=A0modification, are permitted provided that the followi= ng > conditions > +#=C2=A0=C2=A0=C2=A0are met: > +# > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Redistributions of source code must ret= ain the above > copyright > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0notice, this list of conditio= ns and the following > disclaimer. > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Redistributions in binary form must rep= roduce the above > copyright > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0notice, this list of conditio= ns and the following disclaimer > in > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0the documentation and/or othe= r 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 Corporation n= or the names of its > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0contributors may be used to e= ndorse or promote products > derived > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0from this software without sp= ecific prior written > permission. > +# > +#=C2=A0=C2=A0=C2=A0THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AN= D > CONTRIBUTORS > +#=C2=A0=C2=A0=C2=A0"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUD= ING, BUT > NOT > +#=C2=A0=C2=A0=C2=A0LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY= AND > FITNESS FOR > +#=C2=A0=C2=A0=C2=A0A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHAL= L THE > COPYRIGHT > +#=C2=A0=C2=A0=C2=A0OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIR= ECT, > INCIDENTAL, > +#=C2=A0=C2=A0=C2=A0SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDI= NG, BUT NOT > +#=C2=A0=C2=A0=C2=A0LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVIC= ES; LOSS OF > USE, > +#=C2=A0=C2=A0=C2=A0DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER C= AUSED AND > ON ANY > +#=C2=A0=C2=A0=C2=A0THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIAB= ILITY, OR > TORT > +#=C2=A0=C2=A0=C2=A0(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA= Y OUT OF > THE USE > +#=C2=A0=C2=A0=C2=A0OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY = OF SUCH > DAMAGE. > + > +include $(RTE_SDK)/mk/rte.vars.mk > + > +# library name > +LIB =3D librte_member.a > + > +CFLAGS +=3D $(WERROR_FLAGS) -I$(SRCDIR) -O3 > + This breaks reproducibility as the output directory will be included before the source directory, causing a race - please do something like: CFLAGS :=3D -I$(SRCDIR) $(CFLAGS) CFLAGS +=3D $(WERROR_FLAGS) -O3 > +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