summaryrefslogtreecommitdiffhomepage
path: root/pkg/bpf
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2018-08-01 19:56:12 -0700
committerShentubot <shentubot@google.com>2018-08-01 19:57:32 -0700
commit60add78980737a7330100d98bf6a214892dee3c0 (patch)
tree14433da4615d2010a5d34ade91ff94b938c5a9b5 /pkg/bpf
parentb9e1cf8404ce1263176643dee1a1cc835c9d1448 (diff)
Automated rollback of changelist 207007153
PiperOrigin-RevId: 207037226 Change-Id: I8b5f1a056d4f3eab17846f2e0193bb737ecb5428
Diffstat (limited to 'pkg/bpf')
-rw-r--r--pkg/bpf/BUILD17
-rw-r--r--pkg/bpf/interpreter.go2
2 files changed, 15 insertions, 4 deletions
diff --git a/pkg/bpf/BUILD b/pkg/bpf/BUILD
index 564df3af5..403270049 100644
--- a/pkg/bpf/BUILD
+++ b/pkg/bpf/BUILD
@@ -1,11 +1,21 @@
package(licenses = ["notice"]) # Apache 2.0
-load("//tools/go_stateify:defs.bzl", "go_library", "go_test")
+load("//tools/go_stateify:defs.bzl", "go_library", "go_stateify", "go_test")
+
+go_stateify(
+ name = "bpf_state",
+ srcs = [
+ "interpreter.go",
+ ],
+ out = "bpf_state.go",
+ package = "bpf",
+)
go_library(
name = "bpf",
srcs = [
"bpf.go",
+ "bpf_state.go",
"decoder.go",
"input_bytes.go",
"interpreter.go",
@@ -13,7 +23,10 @@ go_library(
],
importpath = "gvisor.googlesource.com/gvisor/pkg/bpf",
visibility = ["//visibility:public"],
- deps = ["//pkg/abi/linux"],
+ deps = [
+ "//pkg/abi/linux",
+ "//pkg/state",
+ ],
)
go_test(
diff --git a/pkg/bpf/interpreter.go b/pkg/bpf/interpreter.go
index 111ada9d1..b7dee86a8 100644
--- a/pkg/bpf/interpreter.go
+++ b/pkg/bpf/interpreter.go
@@ -88,8 +88,6 @@ func (e Error) Error() string {
}
// Program is a BPF program that has been validated for consistency.
-//
-// +stateify savable
type Program struct {
instructions []linux.BPFInstruction
}