mustHaveNoPrealloc returns true if the map type does not support preallocation and needs the BPF_F_NO_PREALLOC flag set to be created successfully.
()
| 178 | // preallocation and needs the BPF_F_NO_PREALLOC flag set to be created |
| 179 | // successfully. |
| 180 | func (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. |
| 192 | func (mt MapType) mustHaveZeroMaxEntries() bool { |
no outgoing calls
no test coverage detected