Skip to content

Commit

Permalink
complexity-tests: add bpf_network configuration
Browse files Browse the repository at this point in the history
[ upstream commit e95f2e0 ]

[ backporter's note:
  - Makefile target structure is different between v1.12 and main. Took
    the v1.12's structure.
  - TRACE_NOTIFY is already defined in the bpf_align_checker.c. Avoid
    redefining it.
  - verifier_test.go doesn't exist on v1.12 branch. Removed it.
]

Add an initial bpf_network configuration. The defines are taken from a
sysdump for a failing CI run that seems to exhibit verifier problems.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
  • Loading branch information
lmb authored and dylandreimerink committed Jan 11, 2024
1 parent 7c2ace9 commit e83e21a
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 2 deletions.
3 changes: 1 addition & 2 deletions bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ include ../Makefile.defs
SUBDIRS = sockops custom

BPF_SIMPLE = bpf_network.o bpf_alignchecker.o
BPF_SIMPLE_C = $(patsubst %.o,%.c,${BPF_SIMPLE})
BPF_SIMPLE_LL = $(patsubst %.o,%.ll,${BPF_SIMPLE})
BPF = bpf_lxc.o bpf_overlay.o bpf_sock.o bpf_host.o bpf_xdp.o $(BPF_SIMPLE)

Expand All @@ -29,7 +28,7 @@ build_all: force

BUILD_PERMUTATIONS ?= ""

BPF_SIMPLE_OPTIONS += \
BPF_SIMPLE_OPTIONS ?= \
-DENABLE_IPV4=1 -DENABLE_IPV6=1 -DENABLE_IPSEC=1
ifneq ("$(KERNEL)","49")
BPF_SIMPLE_OPTIONS += -DHAVE_LPM_TRIE_MAP_TYPE -DHAVE_LRU_HASH_MAP_TYPE
Expand Down
2 changes: 2 additions & 0 deletions bpf/bpf_alignchecker.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

/* Ensure declaration of notification event types */
#define DEBUG
#ifndef TRACE_NOTIFY
#define TRACE_NOTIFY
#endif
#define DROP_NOTIFY
#define POLICY_VERDICT_NOTIFY
#define ENABLE_EGRESS_GATEWAY
Expand Down
7 changes: 7 additions & 0 deletions bpf/complexity-tests/419/bpf_network/1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-DENABLE_ICMP_RULE=1
-DENABLE_IDENTITY_MARK=1
-DENABLE_IPSEC=1
-DENABLE_IPV4_FRAGMENTS=1
-DENABLE_IPV4=1
-DENABLE_IPV6=1
-DTRACE_NOTIFY=1
7 changes: 7 additions & 0 deletions bpf/complexity-tests/510/bpf_network/1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-DENABLE_ICMP_RULE=1
-DENABLE_IDENTITY_MARK=1
-DENABLE_IPSEC=1
-DENABLE_IPV4_FRAGMENTS=1
-DENABLE_IPV4=1
-DENABLE_IPV6=1
-DTRACE_NOTIFY=1
7 changes: 7 additions & 0 deletions bpf/complexity-tests/54/bpf_network/1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-DENABLE_ICMP_RULE=1
-DENABLE_IDENTITY_MARK=1
-DENABLE_IPSEC=1
-DENABLE_IPV4_FRAGMENTS=1
-DENABLE_IPV4=1
-DENABLE_IPV6=1
-DTRACE_NOTIFY=1
7 changes: 7 additions & 0 deletions bpf/complexity-tests/61/bpf_network/1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-DENABLE_ICMP_RULE=1
-DENABLE_IDENTITY_MARK=1
-DENABLE_IPSEC=1
-DENABLE_IPV4_FRAGMENTS=1
-DENABLE_IPV4=1
-DENABLE_IPV6=1
-DTRACE_NOTIFY=1
7 changes: 7 additions & 0 deletions bpf/complexity-tests/netnext/bpf_network/1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-DENABLE_ICMP_RULE=1
-DENABLE_IDENTITY_MARK=1
-DENABLE_IPSEC=1
-DENABLE_IPV4_FRAGMENTS=1
-DENABLE_IPV4=1
-DENABLE_IPV6=1
-DTRACE_NOTIFY=1

0 comments on commit e83e21a

Please sign in to comment.