-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open or create all maps from cilium-agent #9276
Copy link
Copy link
Closed
Labels
area/daemonImpacts operation of the Cilium daemon.Impacts operation of the Cilium daemon.area/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.Impacts bpf/ or low-level forwarding details, including map management and monitor messages.good-first-issueGood starting point for new developers, which requires minimal understanding of Cilium.Good starting point for new developers, which requires minimal understanding of Cilium.kind/cleanupThis includes no functional changes.This includes no functional changes.pinnedThese issues are not marked stale by our issue bot.These issues are not marked stale by our issue bot.
Metadata
Metadata
Assignees
Labels
area/daemonImpacts operation of the Cilium daemon.Impacts operation of the Cilium daemon.area/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.Impacts bpf/ or low-level forwarding details, including map management and monitor messages.good-first-issueGood starting point for new developers, which requires minimal understanding of Cilium.Good starting point for new developers, which requires minimal understanding of Cilium.kind/cleanupThis includes no functional changes.This includes no functional changes.pinnedThese issues are not marked stale by our issue bot.These issues are not marked stale by our issue bot.
Currently (early v1.7 cycle), some of the global maps used by multiple BPF programs are opened/created from
cilium-agentin the function below:cilium/daemon/datapath.go
Lines 530 to 533 in d0f2435
But others (such as conntrack, or the global tail call map) are not.
Note that we must make sure that if any map is being created, its attributes must match the attributes defined in the C templates, otherwise when we load a program for an endpoint the first time, it will delete/recreate the map.
Tasks:
pkg/maps/andbpf/)OpenOrCreate()calls for all maps toinitMaps()so we can be sure that the globally shared maps are guaranteed to be in place before the first BPF program loadcilium-agent. These should be created, and pinned to the filesystem, then the fd closed.