Skip to content

Commit 80670ed

Browse files
committed
chore: Refactor map handling and add BPF tracing definitions
Signed-off-by: cfc4n <cfc4n.cs@gmail.com>
1 parent 4e86beb commit 80670ed

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ func (m *Manager) matchSpecs() error {
11191119
return errors.New(fmt.Sprintf("error:%v , couldn't find map at maps/%s", ErrUnknownMap, managerMap.Name))
11201120
}
11211121
spec.Contents = managerMap.Contents
1122-
spec.Freeze = managerMap.Freeze
1122+
//spec.Freeze = managerMap.Freeze
11231123
managerMap.arraySpec = spec
11241124
}
11251125

map.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ import (
1919
//
2020
// A map can only be in one of the following categories
2121
//
22-
// ---------------------- ---------------------------------------
23-
// | Internally loaded | | Externally loaded |
24-
// ---------------------- ---------------------------------------
25-
// Categories: | Pinned | Not Pinned | | Pinned | Pinned and Edited | Edited |
26-
// ---------------------- ---------------------------------------
27-
//
22+
// ---------------------- ---------------------------------------
23+
// | Internally loaded | | Externally loaded |
24+
// ---------------------- ---------------------------------------
25+
// Categories: | Pinned | Not Pinned | | Pinned | Pinned and Edited | Edited |
26+
// ---------------------- ---------------------------------------
2827
type MapCleanupType int
2928

3029
const (
@@ -82,10 +81,10 @@ type Map struct {
8281
func loadNewMap(spec ebpf.MapSpec, options MapOptions) (*Map, error) {
8382
// Create new map
8483
managerMap := Map{
85-
arraySpec: &spec,
86-
Name: spec.Name,
87-
Contents: spec.Contents,
88-
Freeze: spec.Freeze,
84+
arraySpec: &spec,
85+
Name: spec.Name,
86+
Contents: spec.Contents,
87+
//Freeze: spec.Freeze,
8988
MapOptions: options,
9089
}
9190

0 commit comments

Comments
 (0)