-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
This supersedes #24013.
When an ELF is loaded and one or more of its maps are incompatible with a pinned map on bpffs, something needs to be done for ELF loading to proceed normally. Historically, we've opted for renaming the existing map pin with a :pending
suffix, but this has the unfortunate downside of creating state to manage on bpffs.
As an alternative, I'm proposing to remove {Start,Finalize}BPFFSMapMigration
altogether, and return a commit()
closure from bpf.LoadCollection()
instead of finalize()
in replaceDatapath()
. This would minimize changes in callers of replaceDatapath()
.
As a follow-up, we can make bpf.NewCollection
support custom pinning flags for e.g. per-endpoint maps and always-recreated maps like cilium_calls. commit()
can be used to perform the pinning operations for those maps as well, e.g. for #29334.