From patchwork Mon May 14 13:15:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ananyev, Konstantin" X-Patchwork-Id: 40000 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC5CC1C845; Mon, 14 May 2018 15:16:24 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 6B6BC1C844 for ; Mon, 14 May 2018 15:16:22 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2018 06:16:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,400,1520924400"; d="scan'208";a="40789424" Received: from sivswdev02.ir.intel.com (HELO localhost.localdomain) ([10.237.217.46]) by orsmga007.jf.intel.com with ESMTP; 14 May 2018 06:16:20 -0700 From: Konstantin Ananyev To: dev@dpdk.org Cc: Konstantin Ananyev Date: Mon, 14 May 2018 14:15:42 +0100 Message-Id: <1526303742-18336-1-git-send-email-konstantin.ananyev@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <4850625.lUN5xUOOBk@xps> References: <4850625.lUN5xUOOBk@xps> Subject: [dpdk-dev] [PATCH] bpf: add missed EXPERIMENTAL tags 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" - add EXPERIMENTAL tag for the section in MAINTAINERS. - add EXPERIMENTAL tag to BPF public API files. - add attribute __rte_experimental to BPF public API declarations. Fixes: 94972f35a02e ("bpf: add BPF loading and execution framework") Fixes: 5dba93ae5f2d ("bpf: add ability to load eBPF program from ELF") Fixes: a93ff62a8938 ("bpf: add BPF loading and execution framework") Reported-by: Thomas Monjalon Signed-off-by: Konstantin Ananyev --- MAINTAINERS | 2 +- lib/librte_bpf/rte_bpf.h | 26 ++++++++++++++++---------- lib/librte_bpf/rte_bpf_ethdev.h | 15 ++++++++++----- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7a18e0dbf..2663f1c03 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1100,7 +1100,7 @@ Latency statistics M: Reshma Pattan F: lib/librte_latencystats/ -BPF +BPF - EXPERIMENTAL M: Konstantin Ananyev F: lib/librte_bpf/ F: test/bpf/ diff --git a/lib/librte_bpf/rte_bpf.h b/lib/librte_bpf/rte_bpf.h index 1d6c4a9d2..1249a992c 100644 --- a/lib/librte_bpf/rte_bpf.h +++ b/lib/librte_bpf/rte_bpf.h @@ -6,7 +6,8 @@ #define _RTE_BPF_H_ /** - * @file + * @file rte_bpf.h + * @b EXPERIMENTAL: this API may change without prior notice * * RTE BPF support. * librte_bpf provides a framework to load and execute eBPF bytecode @@ -99,7 +100,8 @@ struct rte_bpf; * @param bpf * BPF handle to destroy. */ -void rte_bpf_destroy(struct rte_bpf *bpf); +void __rte_experimental +rte_bpf_destroy(struct rte_bpf *bpf); /** * Create a new eBPF execution context and load given BPF code into it. @@ -113,7 +115,8 @@ void rte_bpf_destroy(struct rte_bpf *bpf); * - EINVAL - invalid parameter passed to function * - ENOMEM - can't reserve enough memory */ -struct rte_bpf *rte_bpf_load(const struct rte_bpf_prm *prm); +struct rte_bpf * __rte_experimental +rte_bpf_load(const struct rte_bpf_prm *prm); /** * Create a new eBPF execution context and load BPF code from given ELF @@ -132,9 +135,9 @@ struct rte_bpf *rte_bpf_load(const struct rte_bpf_prm *prm); * - EINVAL - invalid parameter passed to function * - ENOMEM - can't reserve enough memory */ -struct rte_bpf *rte_bpf_elf_load(const struct rte_bpf_prm *prm, - const char *fname, const char *sname); - +struct rte_bpf * __rte_experimental +rte_bpf_elf_load(const struct rte_bpf_prm *prm, const char *fname, + const char *sname); /** * Execute given BPF bytecode. * @@ -145,7 +148,8 @@ struct rte_bpf *rte_bpf_elf_load(const struct rte_bpf_prm *prm, * @return * BPF execution return value. */ -uint64_t rte_bpf_exec(const struct rte_bpf *bpf, void *ctx); +uint64_t __rte_experimental +rte_bpf_exec(const struct rte_bpf *bpf, void *ctx); /** * Execute given BPF bytecode over a set of input contexts. @@ -161,8 +165,9 @@ uint64_t rte_bpf_exec(const struct rte_bpf *bpf, void *ctx); * @return * number of successfully processed inputs. */ -uint32_t rte_bpf_exec_burst(const struct rte_bpf *bpf, void *ctx[], - uint64_t rc[], uint32_t num); +uint32_t __rte_experimental +rte_bpf_exec_burst(const struct rte_bpf *bpf, void *ctx[], uint64_t rc[], + uint32_t num); /** * Provide information about natively compield code for given BPF handle. @@ -175,7 +180,8 @@ uint32_t rte_bpf_exec_burst(const struct rte_bpf *bpf, void *ctx[], * - -EINVAL if the parameters are invalid. * - Zero if operation completed successfully. */ -int rte_bpf_get_jit(const struct rte_bpf *bpf, struct rte_bpf_jit *jit); +int __rte_experimental +rte_bpf_get_jit(const struct rte_bpf *bpf, struct rte_bpf_jit *jit); #ifdef __cplusplus } diff --git a/lib/librte_bpf/rte_bpf_ethdev.h b/lib/librte_bpf/rte_bpf_ethdev.h index b4d4d3b16..31731e7a9 100644 --- a/lib/librte_bpf/rte_bpf_ethdev.h +++ b/lib/librte_bpf/rte_bpf_ethdev.h @@ -6,7 +6,8 @@ #define _RTE_BPF_ETHDEV_H_ /** - * @file + * @file rte_bpf_ethdev.h + * @b EXPERIMENTAL: this API may change without prior notice * * API to install BPF filter as RX/TX callbacks for eth devices. * Note that right now: @@ -44,7 +45,8 @@ enum { * @param queue * The identifier of the RX queue on the given port */ -void rte_bpf_eth_rx_unload(uint16_t port, uint16_t queue); +void __rte_experimental +rte_bpf_eth_rx_unload(uint16_t port, uint16_t queue); /** * Unload previously loaded BPF program (if any) from given TX port/queue @@ -55,7 +57,8 @@ void rte_bpf_eth_rx_unload(uint16_t port, uint16_t queue); * @param queue * The identifier of the TX queue on the given port */ -void rte_bpf_eth_tx_unload(uint16_t port, uint16_t queue); +void __rte_experimental +rte_bpf_eth_tx_unload(uint16_t port, uint16_t queue); /** * Load BPF program from the ELF file and install callback to execute it @@ -77,7 +80,8 @@ void rte_bpf_eth_tx_unload(uint16_t port, uint16_t queue); * @return * Zero on successful completion or negative error code otherwise. */ -int rte_bpf_eth_rx_elf_load(uint16_t port, uint16_t queue, +int __rte_experimental +rte_bpf_eth_rx_elf_load(uint16_t port, uint16_t queue, const struct rte_bpf_prm *prm, const char *fname, const char *sname, uint32_t flags); @@ -101,7 +105,8 @@ int rte_bpf_eth_rx_elf_load(uint16_t port, uint16_t queue, * @return * Zero on successful completion or negative error code otherwise. */ -int rte_bpf_eth_tx_elf_load(uint16_t port, uint16_t queue, +int __rte_experimental +rte_bpf_eth_tx_elf_load(uint16_t port, uint16_t queue, const struct rte_bpf_prm *prm, const char *fname, const char *sname, uint32_t flags);