-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eBPF library support for SONiC applications
It provides a generic library support for filtering the netlink message using eBPF based packet filtering. Linux netlink messaging system is a broadcast domain, every netlink message is broadcasted to all the subscribed appplications regardless whether the application is interested in it or not. In a scaled scenario, more than 1 million message is being broadcasted across applications. This framework helps to filter the unwanted netlink message at the kernel space itself and eliminates the unnecessary passing of message to the user space application and then it get dropped. This improves the system performance and scale the system to higher level.
- Loading branch information
1 parent
54681f1
commit 4554211
Showing
30 changed files
with
3,599 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
SPATH := $($(LIBEBPF)_SRC_PATH) | ||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/libebpf.mk rules/libebpf.dep | ||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) | ||
DEP_FILES += $(shell git ls-files $(SPATH)) | ||
|
||
$(LIBEBPF)_CACHE_MODE := GIT_CONTENT_SHA | ||
$(LIBEBPF)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) | ||
$(LIBEBPF)_DEP_FILES := $(DEP_FILES) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# BPF package | ||
BPF_VERSION := 1.0.0 | ||
LIBEBPF = libebpf_$(BPF_VERSION)_$(CONFIGURED_ARCH).deb | ||
$(LIBEBPF)_SRC_PATH = $(SRC_PATH)/libebpf | ||
$(LIBEBPF)_DEPENDS += $(LINUX_HEADERS) $(LINUX_COMMON_HEADERS) | ||
SONIC_MAKE_DEBS += $(LIBEBPF) | ||
|
||
LIBEBPF_DBG = libebpf-dbgsym_$(BPF_VERSION)_$(CONFIGURED_ARCH).deb | ||
$(LIBEBPF_DBG)_DEPENDS += $(LIBEBPF) | ||
$(eval $(call add_derived_package,$(LIBEBPF),$(LIBEBPF_DBG))) | ||
|
||
export LIBEBPF LIBEBPF_DBG BPF_VERSION | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
SHELL = /bin/bash | ||
.ONESHELL: | ||
.SHELLFLAGS += -e | ||
|
||
MAIN_TARGET := libebpf_$(EBPF_VERSION)_$(CONFIGURED_ARCH).deb | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
|
||
pushd src | ||
[ ! -f ./autogen.sh ] || ./autogen.sh | ||
dpkg-buildpackage -us -uc -b -j$(SONIC_CONFIG_MAKE_JOBS) | ||
popd | ||
|
||
mv $(LIBEBPF_DBG) $* $(DEST)/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ACLOCAL_AMFLAGS = -I m4 | ||
|
||
SUBDIRS = libutil samples/ebpf-kern-mod samples/ebpf-user-mod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
libtoolize --force --copy && | ||
autoreconf --force --install -I m4 | ||
rm -Rf autom4te.cache | ||
|
Oops, something went wrong.