BPF in DPDK 18.05 as experimental
DPDK 18.05-rc3 will have a BPF experimental framework.
The symbols have been marked as experimental in the map file, but the doxygen has no experimental mention,
the section in MAINTAINERS has not the EXPERIMENTAL tag, and the API functions have not the attribute __rte_experimental. Konstantin, please make a patch to make the experimental status clear.
Thanks
PATCH 1/1 bpf: add missed EXPERIMENTAL tags
- 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.
--- MAINTAINERS | 2 +- lib/librte_bpf/rte_bpf.h | 26 ++++++++++++++++---------- lib/librte_bpf/rte_bpf_ethdev.h | 15 ++++++++++----- 3 files changed, 27 insertions(+), 16 deletions(-)
MAINTAINERS +1 -1
@@ -1100,7 +1100,7 @@ Latency statistics M: Reshma Pattan <[email protected]> F: lib/librte_latencystats/ -BPF +BPF - EXPERIMENTAL M: Konstantin Ananyev <[email protected]> F: lib/librte_bpf/ F: test/bpf/
lib/librte_bpf/rte_bpf.h +16 -10
@@ -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 }
lib/librte_bpf/rte_bpf_ethdev.h +10 -5
@@ -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);
Signature · 1 line
2.13.6
Re: [PATCH] bpf: add missed EXPERIMENTAL tags
Quoted 10 lines · Konstantin Ananyev
- add EXPERIMENTAL tag for the section in
MAINTAINERS.
- add EXPERIMENTAL tag to BPF public API files.
- add attribute__rte_experimentalto 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 <[email protected]>Signed-off-by Konstantin Ananyev <[email protected]>
Off the topic.
I guess this patch earned a free Ack as being pactwork patch 40000 :)
https://dpdk.org/dev/patchwork/patch/40000/
The historical numbers from DPDK patchwork:
40000 - May 14, 2018 (217 days) 30000 - Oct. 9, 2017 (258 days) 20000 - Jan. 25, 2017 (372 days) 10000 - Jan. 20, 2016 (645 days) 00001 - April 16, 2014
DPDK is getting faster and faster :)
Re: [PATCH] bpf: add missed EXPERIMENTAL tags
14/05/2018 16:20, Ferruh Yigit:
Quoted 26 lines · Konstantin Ananyev
Quoted 10 lines
- add EXPERIMENTAL tag for the section in
MAINTAINERS.
- add EXPERIMENTAL tag to BPF public API files.
- add attribute__rte_experimentalto 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 <[email protected]>Signed-off-by Konstantin Ananyev <[email protected]>Off the topic.
I guess this patch earned a free Ack as being pactwork patch 40000 :)
https://dpdk.org/dev/patchwork/patch/40000/The historical numbers from DPDK patchwork:
40000 - May 14, 2018 (217 days) 30000 - Oct. 9, 2017 (258 days) 20000 - Jan. 25, 2017 (372 days) 10000 - Jan. 20, 2016 (645 days) 00001 - April 16, 2014
Quoted 1 line
DPDK is getting faster and faster :)
Yes, it's impressive and scary!
Re: [PATCH] bpf: add missed EXPERIMENTAL tags
In reply to Konstantin Ananyev14/05/2018 15:15, Konstantin Ananyev:
Quoted 8 lines
- add EXPERIMENTAL tag for the section in
MAINTAINERS.
- add EXPERIMENTAL tag to BPF public API files.
- add attribute__rte_experimentalto 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")
Quoted 7 lines
Reported-by Thomas Monjalon <[email protected]>Signed-off-by Konstantin Ananyev <[email protected]>--- MAINTAINERS | 2 +- lib/librte_bpf/rte_bpf.h | 26 ++++++++++++++++---------- lib/librte_bpf/rte_bpf_ethdev.h | 15 ++++++++++----- 3 files changed, 27 insertions(+), 16 deletions(-)
You need to add __rte_experimental in function definitions too (.c file).
There is a tool to check it: buildtools/check-experimental-syms.sh
Re: [PATCH] bpf: add missed EXPERIMENTAL tags
Quoted 26 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday, May 14, 2018 3:31 PM
To: Ananyev, Konstantin <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] bpf: add missed EXPERIMENTAL tags14/05/2018 15:15, Konstantin Ananyev:
Quoted 8 lines
- add EXPERIMENTAL tag for the section in
MAINTAINERS.
- add EXPERIMENTAL tag to BPF public API files.
- add attribute__rte_experimentalto 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")Quoted 7 lines
Reported-by Thomas Monjalon <[email protected]>Signed-off-by Konstantin Ananyev <[email protected]>--- MAINTAINERS | 2 +- lib/librte_bpf/rte_bpf.h | 26 ++++++++++++++++---------- lib/librte_bpf/rte_bpf_ethdev.h | 15 ++++++++++----- 3 files changed, 27 insertions(+), 16 deletions(-)
Quoted 1 line
You need to add
__rte_experimentalin function definitions too (.c file).
I believe that was done in initial commit.
Quoted 3 lines
There is a tool to check it:
buildtools/check-experimental-syms.sh
./buildtools/check-experimental-syms.sh lib/librte_bpf/rte_bpf_version.map x86_64-native-linuxapp-gcc-meson/lib/librte_bpf.a
Don't produce any errors/warnings for me.
Do I miss something here?
Konstantin
Re: [PATCH] bpf: add missed EXPERIMENTAL tags
14/05/2018 16:55, Ananyev, Konstantin:
Quoted 25 lines
Quoted 25 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday, May 14, 2018 3:31 PM
To: Ananyev, Konstantin <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] bpf: add missed EXPERIMENTAL tags14/05/2018 15:15, Konstantin Ananyev:
Quoted 15 lines
- add EXPERIMENTAL tag for the section in
MAINTAINERS.
- add EXPERIMENTAL tag to BPF public API files.
- add attribute__rte_experimentalto 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 <[email protected]>Signed-off-by Konstantin Ananyev <[email protected]>--- MAINTAINERS | 2 +- lib/librte_bpf/rte_bpf.h | 26 ++++++++++++++++---------- lib/librte_bpf/rte_bpf_ethdev.h | 15 ++++++++++----- 3 files changed, 27 insertions(+), 16 deletions(-)
Quoted 3 lines
Quoted 1 line
You need to add
__rte_experimentalin function definitions too (.c file).I believe that was done in initial commit.
I did not check, sorry.
Quoted 7 lines
Quoted 2 lines
There is a tool to check it:
buildtools/check-experimental-syms.sh
./buildtools/check-experimental-syms.shlib/librte_bpf/rte_bpf_version.mapx86_64-native-linuxapp-gcc-meson/lib/librte_bpf.aDon't produce any errors/warnings for me.
Do I miss something here?
No, it's me doing wrong assumption :)
Thomas Monjalon
AppliedRe: [PATCH] bpf: add missed EXPERIMENTAL tags
In reply to Konstantin Ananyev14/05/2018 15:15, Konstantin Ananyev:
Quoted 10 lines
- add EXPERIMENTAL tag for the section in
MAINTAINERS.
- add EXPERIMENTAL tag to BPF public API files.
- add attribute__rte_experimentalto 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 <[email protected]>Signed-off-by Konstantin Ananyev <[email protected]>
Applied, thanks