@@ -12,7 +12,11 @@ import (
12
12
// Upstream commit c04c0d2b968a ("bpf: increase complexity limit and maximum program size").
13
13
//
14
14
// See the package documentation for the meaning of the error return value.
15
- var HaveLargeInstructions = internal .NewFeatureTest (">4096 instructions" , "5.2" , func () error {
15
+ func HaveLargeInstructions () error {
16
+ return haveLargeInstructions ()
17
+ }
18
+
19
+ var haveLargeInstructions = internal .NewFeatureTest (">4096 instructions" , "5.2" , func () error {
16
20
const maxInsns = 4096
17
21
18
22
insns := make (asm.Instructions , maxInsns , maxInsns + 1 )
@@ -32,7 +36,11 @@ var HaveLargeInstructions = internal.NewFeatureTest(">4096 instructions", "5.2",
32
36
// Upstream commit 2589726d12a1 ("bpf: introduce bounded loops").
33
37
//
34
38
// See the package documentation for the meaning of the error return value.
35
- var HaveBoundedLoops = internal .NewFeatureTest ("bounded loops" , "5.3" , func () error {
39
+ func HaveBoundedLoops () error {
40
+ return haveBoundedLoops ()
41
+ }
42
+
43
+ var haveBoundedLoops = internal .NewFeatureTest ("bounded loops" , "5.3" , func () error {
36
44
return probeProgram (& ebpf.ProgramSpec {
37
45
Type : ebpf .SocketFilter ,
38
46
Instructions : asm.Instructions {
@@ -49,7 +57,11 @@ var HaveBoundedLoops = internal.NewFeatureTest("bounded loops", "5.3", func() er
49
57
// Upstream commit 92b31a9af73b ("bpf: add BPF_J{LT,LE,SLT,SLE} instructions").
50
58
//
51
59
// See the package documentation for the meaning of the error return value.
52
- var HaveV2ISA = internal .NewFeatureTest ("v2 ISA" , "4.14" , func () error {
60
+ func HaveV2ISA () error {
61
+ return haveV2ISA ()
62
+ }
63
+
64
+ var haveV2ISA = internal .NewFeatureTest ("v2 ISA" , "4.14" , func () error {
53
65
return probeProgram (& ebpf.ProgramSpec {
54
66
Type : ebpf .SocketFilter ,
55
67
Instructions : asm.Instructions {
@@ -66,7 +78,11 @@ var HaveV2ISA = internal.NewFeatureTest("v2 ISA", "4.14", func() error {
66
78
// Upstream commit 092ed0968bb6 ("bpf: verifier support JMP32").
67
79
//
68
80
// See the package documentation for the meaning of the error return value.
69
- var HaveV3ISA = internal .NewFeatureTest ("v3 ISA" , "5.1" , func () error {
81
+ func HaveV3ISA () error {
82
+ return haveV3ISA ()
83
+ }
84
+
85
+ var haveV3ISA = internal .NewFeatureTest ("v3 ISA" , "5.1" , func () error {
70
86
return probeProgram (& ebpf.ProgramSpec {
71
87
Type : ebpf .SocketFilter ,
72
88
Instructions : asm.Instructions {
0 commit comments