Name Date Size #Lines LOC

..--

README.MDH A D08-Oct-20221.1 KiB4535

ipfirewall.cH A D25-Sep-20221.4 KiB4744

ipfirewall_cmd.cH A D25-Sep-20222.6 KiB9792

ipfirewall_kern.cH A D25-Sep-20221.9 KiB7963

l3lb.cH A D25-Sep-20222.1 KiB5651

l3lb.hH A D25-Sep-2022495 2321

l3lb_cmd.cH A D25-Sep-20222.7 KiB10196

l3lb_kern.cH A D25-Sep-20224.8 KiB172143

sock_sillycreate_kern.cH A D08-Oct-2022294 1512

sockconn4lb_admin.cH A D25-Sep-20224.9 KiB178164

sockconn4lb_kern.cH A D25-Sep-2022957 3833

syscall_tp.hH A D25-Sep-2022150 107

syscall_tp_openat_kern.cH A D25-Sep-2022794 3527

syscall_tp_openat_user.cH A D25-Sep-20221.7 KiB7250

tc_filter_kern.cH A D08-Oct-2022889 3125

tclb_kern.cH A D25-Sep-20221.3 KiB4535

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