Skip to content

Commit

Permalink
bpf: introduce basic Rx/Tx filters
Browse files Browse the repository at this point in the history
Introduce API to install BPF based filters on ethdev RX/TX path.
Current implementation is pure SW one, based on ethdev RX/TX
callback mechanism.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
  • Loading branch information
kananyev authored and tmonjalo committed May 11, 2018
1 parent cc752e4 commit a93ff62
Show file tree
Hide file tree
Showing 6 changed files with 729 additions and 2 deletions.
2 changes: 2 additions & 0 deletions doc/guides/rel_notes/release_18_05.rst
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ New Features

The BPF Library provides the ability to load and execute
Enhanced Berkeley Packet Filter (eBPF) within user-space dpdk application.
Also it introduces basic framework to load/unload BPF-based filters
on eth devices (right now only via SW RX/TX callbacks).
It also adds dependency on libelf.


Expand Down
2 changes: 2 additions & 0 deletions lib/librte_bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ LIBABIVER := 1
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_pkt.c
SRCS-$(CONFIG_RTE_LIBRTE_BPF) += bpf_validate.c
ifeq ($(CONFIG_RTE_LIBRTE_BPF_ELF),y)
SRCS-$(CONFIG_RTE_LIBRTE_BPF) += bpf_load_elf.c
Expand All @@ -35,5 +36,6 @@ endif
# install header files
SYMLINK-$(CONFIG_RTE_LIBRTE_BPF)-include += bpf_def.h
SYMLINK-$(CONFIG_RTE_LIBRTE_BPF)-include += rte_bpf.h
SYMLINK-$(CONFIG_RTE_LIBRTE_BPF)-include += rte_bpf_ethdev.h

include $(RTE_SDK)/mk/rte.lib.mk
Loading

0 comments on commit a93ff62

Please sign in to comment.