MCPcopy
hub / github.com/cilium/ebpf / mustHaveNoPrealloc

Method mustHaveNoPrealloc

types.go:180–189  ·  view source on GitHub ↗

mustHaveNoPrealloc returns true if the map type does not support preallocation and needs the BPF_F_NO_PREALLOC flag set to be created successfully.

()

Source from the content-addressed store, hash-verified

178// preallocation and needs the BPF_F_NO_PREALLOC flag set to be created
179// successfully.
180func (mt MapType) mustHaveNoPrealloc() bool {
181 switch mt {
182 case CgroupStorage, InodeStorage, TaskStorage, SkStorage:
183 return true
184 case LPMTrie:
185 return true
186 }
187
188 return false
189}
190
191// mustHaveZeroMaxEntries returns true if the map type requires MaxEntries to be zero.
192func (mt MapType) mustHaveZeroMaxEntries() bool {

Callers 1

handleMapCreateErrorFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected