Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
README.MD | H A D | 08-Oct-2022 | 1.1 KiB | 45 | 35 | |
ipfirewall.c | H A D | 25-Sep-2022 | 1.4 KiB | 47 | 44 | |
ipfirewall_cmd.c | H A D | 25-Sep-2022 | 2.6 KiB | 97 | 92 | |
ipfirewall_kern.c | H A D | 25-Sep-2022 | 1.9 KiB | 79 | 63 | |
l3lb.c | H A D | 25-Sep-2022 | 2.1 KiB | 56 | 51 | |
l3lb.h | H A D | 25-Sep-2022 | 495 | 23 | 21 | |
l3lb_cmd.c | H A D | 25-Sep-2022 | 2.7 KiB | 101 | 96 | |
l3lb_kern.c | H A D | 25-Sep-2022 | 4.8 KiB | 172 | 143 | |
sock_sillycreate_kern.c | H A D | 08-Oct-2022 | 294 | 15 | 12 | |
sockconn4lb_admin.c | H A D | 25-Sep-2022 | 4.9 KiB | 178 | 164 | |
sockconn4lb_kern.c | H A D | 25-Sep-2022 | 957 | 38 | 33 | |
syscall_tp.h | H A D | 25-Sep-2022 | 150 | 10 | 7 | |
syscall_tp_openat_kern.c | H A D | 25-Sep-2022 | 794 | 35 | 27 | |
syscall_tp_openat_user.c | H A D | 25-Sep-2022 | 1.7 KiB | 72 | 50 | |
tc_filter_kern.c | H A D | 08-Oct-2022 | 889 | 31 | 25 | |
tclb_kern.c | H A D | 25-Sep-2022 | 1.3 KiB | 45 | 35 |
README.MD
1# Build 2 3- clone linux kernel source 4``` 5# for us who live in China 6git clone https://mirrors.tuna.tsinghua.edu.cn/git/linux.git 7``` 8 9- copy codes in this directory to `samples/bpf` 10 11- change the Makefile, following is a example for building l3lb.* 12 13``` 14diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile 15index f87ee02073ba..d35832a6a13e 100644 16--- a/samples/bpf/Makefile 17+++ b/samples/bpf/Makefile 18@@ -109,6 +109,7 @@ task_fd_query-objs := bpf_load.o task_fd_query_user.o $(TRACE_HELPERS) 19 xdp_sample_pkts-objs := xdp_sample_pkts_user.o $(TRACE_HELPERS) 20 ibumad-objs := bpf_load.o ibumad_user.o $(TRACE_HELPERS) 21 hbm-objs := bpf_load.o hbm.o $(CGROUP_HELPERS) 22+l3lb-objs := l3lb.o 23 24 # Tell kbuild to always build the programs 25 always-y := $(tprogs-y) 26@@ -170,6 +171,9 @@ always-y += ibumad_kern.o 27 always-y += hbm_out_kern.o 28 always-y += hbm_edt_kern.o 29 always-y += xdpsock_kern.o 30+always-y := sock_sillycreate_kern.o 31+always-y += l3lb_kern.o l3lb 32+ 33 34``` 35 36- Build the binary 37 38``` 39cd samples/bpf 40make 41 42# if the module has a userland admin tool, the tool needs to be build seperatedly, e.g. 43gcc -o l3lbadm l3lb_cmd.c 44``` 45