Skip to content

Commit

Permalink
Merge pull request #72 from sanfern/sanfern-rem-load-rl
Browse files Browse the repository at this point in the history
Removed ratelimiting user program
  • Loading branch information
sanfern authored Nov 2, 2023
2 parents 0fd3d9b + 94dd993 commit 9c4c353
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 510 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci-build-ratelimiting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,9 @@ jobs:
run: |
mkdir upload_artifact
copy D:\a\eBPF-Package-Repository\eBPF-Package-Repository\ratelimiting\build\ratelimiting_kern.o upload_artifact
copy D:\a\eBPF-Package-Repository\eBPF-Package-Repository\build\ratelimiting\${{env.BUILD_CONFIGURATION}}\ratelimiting.exe upload_artifact
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ratelimiting-windows-${{env.BUILD_CONFIGURATION}}-artifact
path: upload_artifact

12 changes: 0 additions & 12 deletions ratelimiting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
endif()
endif()

#
# eBPF application configuration
#

include_directories(../windows)
include_directories(../external/win-c/include)
add_executable(ratelimiting ratelimiting_user.c ../external/win-c/source/getopt.c ../windows/bpf_load.c)
target_link_libraries(ratelimiting PRIVATE iphlpapi)
target_link_libraries(ratelimiting PRIVATE ebpfapi)
add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Allow use of strerror
set_property(TARGET ratelimiting PROPERTY VS_PROJECT_IMPORT ${CMAKE_BINARY_DIR}/packages/eBPF-for-Windows/build/native/ebpf-for-windows.props)

#
# eBPF program configuration
#
Expand Down
8 changes: 1 addition & 7 deletions ratelimiting/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@ BPF_SAMPLES_PATH := $(LINUX_SRC_PATH)/samples/bpf
TOOLS_PATH := $(BPF_SAMPLES_PATH)/../../tools
L3AF_SRC_PATH := $(CURDIR)

# List of programs to build
tprogs-y := ratelimiting

# Libbpf dependencies
LIBBPF = $(TOOLS_PATH)/lib/bpf/libbpf.a

ratelimiting-objs := ratelimiting_user.o

# Tell kbuild to always build the programs
always-y := $(tprogs-y)
always-y += ratelimiting_kern.o
Expand Down Expand Up @@ -107,7 +102,6 @@ tar.zip:
@rm -f l3af_ratelimiting.tar.gz
@mkdir l3af_ratelimiting
@cp $(L3AF_SRC_PATH)/ratelimiting_kern.o l3af_ratelimiting/
@cp $(L3AF_SRC_PATH)/ratelimiting l3af_ratelimiting/
@tar -cvf l3af_ratelimiting.tar ./l3af_ratelimiting
@gzip l3af_ratelimiting.tar

Expand Down Expand Up @@ -211,4 +205,4 @@ $(obj)/%.o: $(src)/%.c
-I$(srctree)/samples/bpf/ -include asm_goto_workaround.h \
-O2 -emit-llvm -Xclang -disable-llvm-passes -c $< -o - | \
$(OPT) -O2 -mtriple=bpf-pc-linux | $(LLVM_DIS) | \
$(LLC) -march=bpf $(LLC_FLAGS) -filetype=obj -o $@
$(LLC) -march=bpf $(LLC_FLAGS) -filetype=obj -o $@
Loading

0 comments on commit 9c4c353

Please sign in to comment.