From df247d4cb5eabaa842f1b41bb2238ffc477977b1 Mon Sep 17 00:00:00 2001 From: Dinko Korunic Date: Tue, 24 Dec 2024 10:09:33 +0100 Subject: [PATCH] Recompile Go eBPF bindings --- counter_bpfeb.go | 16 +++++++++++++++- counter_bpfel.go | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/counter_bpfeb.go b/counter_bpfeb.go index 26802d6..051cdbd 100644 --- a/counter_bpfeb.go +++ b/counter_bpfeb.go @@ -61,9 +61,10 @@ func loadCounterObjects(obj interface{}, opts *ebpf.CollectionOptions) error { type counterSpecs struct { counterProgramSpecs counterMapSpecs + counterVariableSpecs } -// counterSpecs contains programs before they are loaded into the kernel. +// counterProgramSpecs contains programs before they are loaded into the kernel. // // It can be passed ebpf.CollectionSpec.Assign. type counterProgramSpecs struct { @@ -78,12 +79,19 @@ type counterMapSpecs struct { PktCount *ebpf.MapSpec `ebpf:"pkt_count"` } +// counterVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type counterVariableSpecs struct { +} + // counterObjects contains all objects after they have been loaded into the kernel. // // It can be passed to loadCounterObjects or ebpf.CollectionSpec.LoadAndAssign. type counterObjects struct { counterPrograms counterMaps + counterVariables } func (o *counterObjects) Close() error { @@ -106,6 +114,12 @@ func (m *counterMaps) Close() error { ) } +// counterVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to loadCounterObjects or ebpf.CollectionSpec.LoadAndAssign. +type counterVariables struct { +} + // counterPrograms contains all programs after they have been loaded into the kernel. // // It can be passed to loadCounterObjects or ebpf.CollectionSpec.LoadAndAssign. diff --git a/counter_bpfel.go b/counter_bpfel.go index 9f261b0..b82be75 100644 --- a/counter_bpfel.go +++ b/counter_bpfel.go @@ -61,9 +61,10 @@ func loadCounterObjects(obj interface{}, opts *ebpf.CollectionOptions) error { type counterSpecs struct { counterProgramSpecs counterMapSpecs + counterVariableSpecs } -// counterSpecs contains programs before they are loaded into the kernel. +// counterProgramSpecs contains programs before they are loaded into the kernel. // // It can be passed ebpf.CollectionSpec.Assign. type counterProgramSpecs struct { @@ -78,12 +79,19 @@ type counterMapSpecs struct { PktCount *ebpf.MapSpec `ebpf:"pkt_count"` } +// counterVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type counterVariableSpecs struct { +} + // counterObjects contains all objects after they have been loaded into the kernel. // // It can be passed to loadCounterObjects or ebpf.CollectionSpec.LoadAndAssign. type counterObjects struct { counterPrograms counterMaps + counterVariables } func (o *counterObjects) Close() error { @@ -106,6 +114,12 @@ func (m *counterMaps) Close() error { ) } +// counterVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to loadCounterObjects or ebpf.CollectionSpec.LoadAndAssign. +type counterVariables struct { +} + // counterPrograms contains all programs after they have been loaded into the kernel. // // It can be passed to loadCounterObjects or ebpf.CollectionSpec.LoadAndAssign.