From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01hn0232.outbound.protection.outlook.com [104.47.32.232]) by dpdk.org (Postfix) with ESMTP id C46CEA49B for ; Tue, 13 Mar 2018 14:24:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8xxJU0Yi0PFUtYoIA8T341bV9g5w/vggyJgl8Cq823M=; b=h14bO3d7GpKkKeCg3bEGGkxOHJIafeN0FCd/JbUPTTmXacm3EpD4ZczcfNNmx/Uf7Wj/ZrJnFePDsOhruUSObBH18kKPbxhdGvPHitx6WHeCFLVvcqmfXqozc95HR0sVO9gAu0RzhqdeGB7y5wCVTsoK76iQxFiXOZi0Q/S/U38= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by CY1PR07MB2522.namprd07.prod.outlook.com (10.167.16.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.567.14; Tue, 13 Mar 2018 13:24:50 +0000 Date: Tue, 13 Mar 2018 18:54:34 +0530 From: Jerin Jacob To: Konstantin Ananyev Cc: dev@dpdk.org Message-ID: <20180313132433.GA564@jerin> References: <1520613725-9176-1-git-send-email-konstantin.ananyev@intel.com> <1520613725-9176-2-git-send-email-konstantin.ananyev@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1520613725-9176-2-git-send-email-konstantin.ananyev@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0038.INDPRD01.PROD.OUTLOOK.COM (10.174.214.24) To CY1PR07MB2522.namprd07.prod.outlook.com (10.167.16.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9189f81a-ae16-4159-710e-08d588e5cd6c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:CY1PR07MB2522; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2522; 3:nlOrAETPsgg473j3RtERqi0BYAjAfdk2ZFEs1g/OYNFOMD9VH1djUqvz4geRvPVkKQpzFm43OI5dDgsYffgHPAsu1kU5rxS2aIMkmT+r1RjdxWccUKFpIH9eRcr+VZTmH8fnErCXz5KHL8SNbaJXi3fmKSclrcYGsIYbyCTNoDMyQBCLq7G54KNRxWAagaDcu7+kmT1WieUCL+q3E0nrdjhfGsyIvV2vs6w0szh/NOJvmmw/Lj48EMAl8M49lPWm; 25:i1ufnHffhOeJl2BsT2I5HtHGK6YxSz1IyYvjRj6kStKb62S2E+bHMZG0i4n6OK6uHGJfLE7LTavlXqDbBK58sGOyv6SMMCG1nSShHSFkuy2sEcjgKl5kHye+n7KcpFa10sfyPU1OJpkAG7Yx7vjh3xMEhmEe9+DPpMvPBXuiLTyfZP/7hTdobRXy9Rj8NbAsA19n9m5P4UPYa4rBIYyFHLcaPlaA2MzRpXeNE5YBybfaO5KipKnucPsL1MHC6T+Iet7AvVIhgaqo226isTTVSxRdp8TIH+MrRE5cq/eUZcBp0o950iQ9GIRxGagK6kpUy5MVdauQudBZubUCoFRm8g==; 31:c0qUBC8COMR1Ql6t1waBJKAiDS2C+O6mODmOemoca/qkM7XTxatkSyz8ISUCsSb2QOIB38NuCvr2coz09Hs9RlsRtTKt5LUPzejogdhG7NL32tY5Tb9RMyfdVQi8749ySp+t4T997xonUqRn2en+P4gk9hLb0GEKlwLc58+v/JLNuyEbC59p3rxd95wIZJhWB/fQ8AVzYboQCqp8wr2wHAcrbmV3rta3x0ngam5FwaQ= X-MS-TrafficTypeDiagnostic: CY1PR07MB2522: X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2522; 20:28GBZ8o7osCTmob/8vcptqK1Q8vtOWUoG1ARf2sJGoHL4Uuga2Gt4dv1bX/CFhS/qrPS4930pDe6v12otFwTUpwPYMxjNb2vCaDnL9/I6Io0Rj1iAIiN0cSzavP8LhL2xr3RyGFLqyixUOaBcuFK70paYuz5Gg3K3a9egCno00qs1ecf1ipsRdjxGFqSZkq4oK5+1rqPtJgnCd1KVAzpujdw1HMouky8oM9HgUzfjT6YRaq6LVKmwiVymhW8ZIr7rNtQjIBWz24GrSphitU5v7CnzB/MN0+PZlhaPGsplgDbup4HyWrUUiDhYDafWjDSdLZsEyfy9l9pXSz+vkvZWPRywVt3Qex58iiylkwGBPvYphsI2B1BdDGAY8ifAeWfmXC0hwlcpTnO2/rWQKBjaDYUypbZWRR+d+pzsAxppaSVZ9buE6dylNUs8F3fdyvNga1n6Xm06z8iEWeX8u8VGo0WEWJAzHwT3516rBRu9b0jtrR6Yi71DKQFCGD/AJxu6itUd3xi5qjxjek9h3stp6rCpHAETY35ai2EyfMmWLtc24JsBqRKLQORwAmPWcLZ/L6pcti2X7S3S7+0YXnUYRV7Hf7YyDxxfD9AFAtq4AE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(66839620246622)(228905959029699)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(10201501046)(3231221)(2232076)(944501244)(52105095)(6041310)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:CY1PR07MB2522; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2522; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2522; 4:RRISVOcHwAxsE71xD+BJsKV0Z3ivsgd9ks6bGNJRs0xOo9Ep2ztdV2EEjBYGh+P+MEpV3xsKDBcp5wI415fFWd2iu8ZMgo7yZNttsxCvvlZnEyi91qT+kXx/vaAplo4YH+Epi5dUmgUMbXT3kDMVLkdRr2aGGRCOBcKf5++H8cy7A4PGbC75CikAFbHst+R0zDP8rjSXVEA1xTYFGTWsDBtALrxAsjpM0ZJ7jmQnlwrR4wMnCs0D6B8pnUYAWadOoW3ZFP8Fy8wft6gd4xM9iGZcB1Cf5oL4cnJmUtVKK2ho88IapL/AszEld3UZsj5HQOFdtM3vs29Vp8wPo6M/OU6EwwwQARZ+lvFhM0nHwYcDdDRf5elVtjMFfoLbI+eE X-Forefront-PRVS: 0610D16BBE X-Forefront-Antispam-Report: SFV:SPM; SFS:(10009020)(366004)(39860400002)(346002)(376002)(396003)(39380400002)(13464003)(199004)(189003)(2906002)(16526019)(478600001)(316002)(33656002)(16586007)(72206003)(58126008)(7736002)(186003)(5009440100003)(105586002)(50466002)(229853002)(47776003)(68736007)(66066001)(25786009)(575784001)(305945005)(26005)(4326008)(106356001)(6116002)(3846002)(1076002)(6246003)(23726003)(81166006)(53936002)(81156014)(8676002)(33896004)(76176011)(386003)(8936002)(33716001)(97736004)(9686003)(6306002)(42882007)(55016002)(52116002)(6496006)(6666003)(5660300001)(2950100002)(6916009)(59450400001)(59010400001)(18370500001); DIR:OUT; SFP:1501; SCL:5; SRVR:CY1PR07MB2522; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2522; 23:wed9PH9/aR4djLWwKoNtUSn97dLH/1z2LrstVcFnO?= =?us-ascii?Q?6ioMU5j5sBJrtk3qKGCRXZ0jAoFZTBQ/dYbhoaaDv6ycK4fXtxZazhA5t54p?= =?us-ascii?Q?WSwkRWm+3uB6h9+lp8RTjzraIgsYNhp9s8qIDybtZgtYXBxYFNgQ2z2MBke4?= =?us-ascii?Q?h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mi00x+WuIg5wOhksHA2eHyDG7QIj2MHOtfvadufL9lL8sjDpJTqL2GsAKtzuL93+DO6su0otUOJ96mN0NZthy6LeXISRFzlUtJvJmVXDS8qW3WRB49hFLXSbF938V2LG7tbKCrCzSRNwRkxV4DgoM0k6XqTL8JZnUPtk4PIMfak3V8/YJfVxXpLNpdozqWqJPzW39piXbZBT4shE/6tBHPNHqsT+dtO1QT8QJIg6C0fvkJfB8ZqIVol4FunwUvOoD/b3aBk4CtjwC6xGq9mrZQXGn97DHioBdGkOnWmYRvZuPo2gw+dZe4S1U3kA8+bgxp4qIOKRSdi322lXxlO3PYLBZL2V04jTYgRX1mhhnlfmMHaXkPNX8BPt4zEDA8zTm6ibRJTimw==; 5:Icd36hswExfdebfnkMip+Iq1/Ab9m9Apb3c4ccMLG5S09tPwAAe4PXrTFw9Oqi4iGqgFX3wuts0XfK3Gl9j/6VLYwPQIvhQOOl9qXWl+GTzha9TMxpM3pHXjfSY6R59U5zl4obk5oS+5odXuJhzIxbgvqMF4/8lf72D4XMwXTOs=; 24:5WRIqt/6lOIqkrRq8qEMK32nZT1rbMS5hmPANwgBj2n9okAVgdV1ogGSstsiVw7+6UyRyPorGHYFE7iB0+uaFw==; 7:oBzBnE1kEl6UcLKHmzI2z50TR4WO/HcjbFhqGlzwaDTuEPSeolkc0KD+HqxOYYaMD9mB0ooVlDnL3U77D+YkgzsQUZGSFvEsREUqZGLF8gLS6MX0evuwG8NtbSSNhLQ945f+nfs1vEU/xMHIXNRYae5a1JlBiBCP63V0bpDViKsWAzW/yz2qqNBSFoa9cceA00Lj3R7tg4BX69qe9ewOk+nqplxWmW1tclJj/jwf8mjg9mLMgRrnjs1c8MeVVyiE SpamDiagnosticOutput: 1:22 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2018 13:24:50.7023 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9189f81a-ae16-4159-710e-08d588e5cd6c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2522 Subject: Re: [dpdk-dev] [PATCH v1 1/5] bpf: add BPF loading and execution framework 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: Tue, 13 Mar 2018 13:24:54 -0000 -----Original Message----- > Date: Fri, 9 Mar 2018 16:42:01 +0000 > From: Konstantin Ananyev > To: dev@dpdk.org > CC: Konstantin Ananyev > Subject: [dpdk-dev] [PATCH v1 1/5] bpf: add BPF loading and execution > framework > X-Mailer: git-send-email 1.7.0.7 > > librte_bpf provides a framework to load and execute eBPF bytecode > inside user-space dpdk based applications. > It supports basic set of features from eBPF spec > (https://www.kernel.org/doc/Documentation/networking/filter.txt). > > Not currently supported features: > - JIT > - cBPF > - tail-pointer call > - eBPF MAP > - skb > > It also adds dependency on libelf. > > Signed-off-by: Konstantin Ananyev > --- > config/common_base | 5 + > config/common_linuxapp | 1 + > lib/Makefile | 2 + > lib/librte_bpf/Makefile | 30 +++ > lib/librte_bpf/bpf.c | 48 ++++ > lib/librte_bpf/bpf_exec.c | 452 +++++++++++++++++++++++++++++++++++++ > lib/librte_bpf/bpf_impl.h | 37 +++ > lib/librte_bpf/bpf_load.c | 380 +++++++++++++++++++++++++++++++ > lib/librte_bpf/bpf_validate.c | 55 +++++ > lib/librte_bpf/rte_bpf.h | 158 +++++++++++++ > lib/librte_bpf/rte_bpf_version.map | 12 + > mk/rte.app.mk | 2 + > 12 files changed, 1182 insertions(+) > create mode 100644 lib/librte_bpf/Makefile > create mode 100644 lib/librte_bpf/bpf.c > create mode 100644 lib/librte_bpf/bpf_exec.c > create mode 100644 lib/librte_bpf/bpf_impl.h > create mode 100644 lib/librte_bpf/bpf_load.c > create mode 100644 lib/librte_bpf/bpf_validate.c > create mode 100644 lib/librte_bpf/rte_bpf.h > create mode 100644 lib/librte_bpf/rte_bpf_version.map > > diff --git a/config/common_base b/config/common_base > index ad03cf433..2205b684f 100644 > --- a/config/common_base > +++ b/config/common_base > @@ -823,3 +823,8 @@ CONFIG_RTE_APP_CRYPTO_PERF=y > # Compile the eventdev application > # > CONFIG_RTE_APP_EVENTDEV=y > + > +# > +# Compile librte_bpf > +# > +CONFIG_RTE_LIBRTE_BPF=n > diff --git a/config/common_linuxapp b/config/common_linuxapp > index ff98f2355..7b4a0ce7d 100644 > --- a/config/common_linuxapp > +++ b/config/common_linuxapp > @@ -10,6 +10,7 @@ CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=y > CONFIG_RTE_EAL_IGB_UIO=y > CONFIG_RTE_EAL_VFIO=y > CONFIG_RTE_KNI_KMOD=y > +CONFIG_RTE_LIBRTE_BPF=y > CONFIG_RTE_LIBRTE_KNI=y > CONFIG_RTE_LIBRTE_PMD_KNI=y > CONFIG_RTE_LIBRTE_VHOST=y > diff --git a/lib/Makefile b/lib/Makefile > index ec965a606..a4a2329f9 100644 > --- a/lib/Makefile > +++ b/lib/Makefile > @@ -97,6 +97,8 @@ DEPDIRS-librte_pdump := librte_eal librte_mempool librte_mbuf librte_ether > DIRS-$(CONFIG_RTE_LIBRTE_GSO) += librte_gso > DEPDIRS-librte_gso := librte_eal librte_mbuf librte_ether librte_net > DEPDIRS-librte_gso += librte_mempool > +DIRS-$(CONFIG_RTE_LIBRTE_BPF) += librte_bpf > +DEPDIRS-librte_bpf := librte_eal librte_mempool librte_mbuf librte_ether > > ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) > DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni > diff --git a/lib/librte_bpf/Makefile b/lib/librte_bpf/Makefile > new file mode 100644 > index 000000000..e0f434e77 > --- /dev/null > +++ b/lib/librte_bpf/Makefile > @@ -0,0 +1,30 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2018 Intel Corporation > + > +include $(RTE_SDK)/mk/rte.vars.mk > + > +# library name > +LIB = librte_bpf.a > + > +CFLAGS += -O3 > +CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) > +CFLAGS += -DALLOW_EXPERIMENTAL_API > +LDLIBS += -lrte_net -lrte_eal > +LDLIBS += -lrte_mempool -lrte_ring > +LDLIBS += -lrte_mbuf -lrte_ethdev > +LDLIBS += -lelf > + > +EXPORT_MAP := rte_bpf_version.map > + > +LIBABIVER := 1 > + > +# all source are stored in SRCS-y > +SRCS-$(CONFIG_RTE_LIBRTE_BPF) += bpf.c > +SRCS-$(CONFIG_RTE_LIBRTE_BPF) += bpf_exec.c > +SRCS-$(CONFIG_RTE_LIBRTE_BPF) += bpf_load.c > +SRCS-$(CONFIG_RTE_LIBRTE_BPF) += bpf_validate.c > + > +# install header files > +SYMLINK-$(CONFIG_RTE_LIBRTE_BPF)-include += rte_bpf.h > + > +include $(RTE_SDK)/mk/rte.lib.mk > diff --git a/lib/librte_bpf/bpf.c b/lib/librte_bpf/bpf.c > new file mode 100644 > index 000000000..4727d2251 > --- /dev/null > +++ b/lib/librte_bpf/bpf.c > @@ -0,0 +1,48 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2018 Intel Corporation > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > + > +#include "bpf_impl.h" > + > +__rte_experimental void > +rte_bpf_destroy(struct rte_bpf *bpf) > +{ > + if (bpf != NULL) { > + if (bpf->jit.func != NULL) > + munmap(bpf->jit.func, bpf->jit.sz); > + munmap(bpf, bpf->sz); Any specific reason to not use this memory from huge page using rte_zmalloc to avoid normal TLB misses? > + } > +} > + > +__rte_experimental int > +rte_bpf_get_jit(const struct rte_bpf *bpf, struct rte_bpf_jit *jit) > +{ > + if (bpf == NULL || jit == NULL) > + return -EINVAL; > + > + jit[0] = bpf->jit; > + return 0; > +} > + > +int > +bpf_jit(struct rte_bpf *bpf) > +{ > + int32_t rc; > + > + rc = -ENOTSUP; > + > + if (rc != 0) > + RTE_LOG(WARNING, USER1, "%s(%p) failed, error code: %d;\n", > + __func__, bpf, rc); How about using new dynamic logging option for this library? > + return rc;