github.com/dylandreimerink/gobpfld@v0.6.1-0.20220205171531-e79c330ad608/kernelsupport/versions.go (about) 1 package kernelsupport 2 3 type kernelFeatureVersion struct { 4 version KernelVersion 5 features KernelFeatures 6 } 7 8 // a list of eBPF kernel features which are available from a given kernel version forward. 9 // largely based on https://github.com/iovisor/bcc/blob/master/docs/kernel-versions.md 10 var featureMinVersion = []kernelFeatureVersion{ 11 { 12 version: KernelVersion{Major: 3, Minor: 16}, 13 features: KernelFeatures{ 14 Arch: KFeatArchx86_64, 15 }, 16 }, 17 { 18 version: KernelVersion{Major: 3, Minor: 18}, 19 features: KernelFeatures{ 20 Arch: KFeatArchARM64, 21 API: KFeatAPIBasic, 22 }, 23 }, 24 { 25 version: KernelVersion{Major: 3, Minor: 19}, 26 features: KernelFeatures{ 27 Map: KFeatMapHash | KFeatMapArray, 28 Program: KFeatProgSocketFilter, 29 Attach: KFeatAttachINetIngressEgress, 30 }, 31 }, 32 { 33 version: KernelVersion{Major: 4, Minor: 1}, 34 features: KernelFeatures{ 35 Arch: KFeatArchs390, 36 Program: KFeatProgKProbe | KFeatProgSchedCLS | KFeatProgSchedACT, 37 }, 38 }, 39 { 40 version: KernelVersion{Major: 4, Minor: 2}, 41 features: KernelFeatures{ 42 Map: KFeatMapTailCall, 43 }, 44 }, 45 { 46 version: KernelVersion{Major: 4, Minor: 3}, 47 features: KernelFeatures{ 48 Map: KFeatMapPerfEvent, 49 }, 50 }, 51 { 52 version: KernelVersion{Major: 4, Minor: 4}, 53 features: KernelFeatures{ 54 API: KFeatAPIObjPinGet, 55 }, 56 }, 57 { 58 version: KernelVersion{Major: 4, Minor: 6}, 59 features: KernelFeatures{ 60 Map: KFeatMapPerCPUHash | KFeatMapPerCPUArray | KFeatMapStackTrace, 61 }, 62 }, 63 { 64 version: KernelVersion{Major: 4, Minor: 7}, 65 features: KernelFeatures{ 66 Program: KFeatProgTracepoint, 67 }, 68 }, 69 { 70 version: KernelVersion{Major: 4, Minor: 8}, 71 features: KernelFeatures{ 72 Arch: KFeatArchPP64, 73 Map: KFeatMapCGroupArray, 74 Program: KFeatProgXDP, 75 }, 76 }, 77 { 78 version: KernelVersion{Major: 4, Minor: 9}, 79 features: KernelFeatures{ 80 Program: KFeatProgPerfEvent, 81 }, 82 }, 83 { 84 version: KernelVersion{Major: 4, Minor: 10}, 85 features: KernelFeatures{ 86 Map: KFeatMapLRUHash | KFeatMapLRUPerCPUHash, 87 Program: KFeatProgCGroupSKB | KFeatProgCGroupSocket | KFeatProgLWTIn | 88 KFeatProgLWTOut | KFeatProgLWTXmit, 89 Attach: KFeatAttachInetSocketCreate, 90 API: KFeatAPIProgramAttachDetach, 91 }, 92 }, 93 { 94 version: KernelVersion{Major: 4, Minor: 11}, 95 features: KernelFeatures{ 96 Map: KFeatMapLPMTrie, 97 }, 98 }, 99 { 100 version: KernelVersion{Major: 4, Minor: 12}, 101 features: KernelFeatures{ 102 Arch: KFeatArchSparc64, 103 Map: KFeatMapArrayOfMaps | KFeatMapHashOfMaps, 104 API: KFeatAPIMapGetNextNull | KFeatAPIProgramTestRun, 105 }, 106 }, 107 { 108 version: KernelVersion{Major: 4, Minor: 13}, 109 features: KernelFeatures{ 110 Arch: KFeatArchMIPS, 111 Program: KFeatProgSocketOps, 112 Attach: KFeatAttachSocketOps, 113 API: KFeatAPIProgramGetNextID | KFeatAPIMapGetNextID | 114 KFeatAPIProgramGetFDByID | KFeatAPIMapGetFDByID | KFeatAPIObjectGetInfoByFD, 115 }, 116 }, 117 { 118 version: KernelVersion{Major: 4, Minor: 14}, 119 features: KernelFeatures{ 120 Arch: KFeatArchARM32, 121 Map: KFeatMapNetdevArray | KFeatMapSocketArray, 122 API: KFeatAPIMapNumaCreate, 123 Program: KFeatProgSKSKB, 124 Attach: KFeatAttachStreamParserVerdict, 125 }, 126 }, 127 { 128 version: KernelVersion{Major: 4, Minor: 15}, 129 features: KernelFeatures{ 130 Map: KFeatMapCPU, 131 API: KFeatAPIMapSyscallRW | KFeatAPIMapName | KFeatAPIProgramQuery, 132 Program: KFeatProgCGroupDevice, 133 Attach: KFeatAttachCGroupDevice, 134 }, 135 }, 136 { 137 version: KernelVersion{Major: 4, Minor: 16}, 138 features: KernelFeatures{ 139 Map: KFeatMapLPMTrieNextKey, 140 }, 141 }, 142 { 143 version: KernelVersion{Major: 4, Minor: 17}, 144 features: KernelFeatures{ 145 Program: KFeatProgSKMsg | KFeatProgRawTracepoint | KFeatProgCGroupSocketAddr, 146 Attach: KFeatAttachSKMsgVerdict | KFeatAttachCGroupInetBind | 147 KFeatAttachCGroupInetConnect | KFeatAttachCGroupInetPostBind, 148 API: KFeatAPIRawTracepointOpen, 149 }, 150 }, 151 { 152 version: KernelVersion{Major: 4, Minor: 18}, 153 features: KernelFeatures{ 154 Arch: KFeatArchx86, 155 Map: KFeatMapAFXDP | KFeatMapSocketHash, 156 Program: KFeatProgLWTSeg6Local | KFeatProgLIRCMode2, 157 Attach: KFeatAttachCGroupUDPSendMsg | KFeatAttachLIRCMode2, 158 API: KFeatAPIBTFLoad | KFeatAPIBTFGetFDByID | KFeatAPITaskFDQuery, 159 }, 160 }, 161 { 162 version: KernelVersion{Major: 4, Minor: 19}, 163 features: KernelFeatures{ 164 Map: KFeatMapCGroupStorage | KFeatMapReuseportSocketArray, 165 Program: KFeatProgSKReusePort, 166 }, 167 }, 168 { 169 version: KernelVersion{Major: 4, Minor: 20}, 170 features: KernelFeatures{ 171 Map: KFeatMapPerCPUCGroupStorage | KFeatMapQueue | KFeatMapStack, 172 API: KFeatAPIMapLookupAndDelete, 173 Program: KFeatProgFlowDissector, 174 Attach: KFeatAttachFlowDissector, 175 }, 176 }, 177 { 178 version: KernelVersion{Major: 5, Minor: 0}, 179 features: KernelFeatures{ 180 API: KFeatAPIMapZeroSeed, 181 }, 182 }, 183 { 184 version: KernelVersion{Major: 5, Minor: 1}, 185 features: KernelFeatures{ 186 Arch: KFeatArchRiscVRV64G, 187 API: KFeatAPIMapLock, 188 }, 189 }, 190 { 191 version: KernelVersion{Major: 5, Minor: 2}, 192 features: KernelFeatures{ 193 Map: KFeatMapSocketLocalStorage, 194 API: KFeatAPIMapBPFRW | KFeatAPIMapFreeze, 195 Program: KFeatProgCGroupSysctl | KFeatProgRawTracepointWritable, 196 Attach: KFeatAttachCGroupSysctl | KFeatAttachCGroupUDPRecvMsg, 197 Misc: KFeatGlobalData, 198 }, 199 }, 200 { 201 version: KernelVersion{Major: 5, Minor: 3}, 202 features: KernelFeatures{ 203 Program: KFeatProgCgroupSocketOpt, 204 Attach: KFeatAttachCGroupGetSetSocket, 205 }, 206 }, 207 { 208 version: KernelVersion{Major: 5, Minor: 4}, 209 features: KernelFeatures{ 210 Map: KFeatMapNetdevHash, 211 API: KFeatAPIBTFGetNextID, 212 Misc: KFeatMiscXSKRingFlags, 213 }, 214 }, 215 { 216 version: KernelVersion{Major: 5, Minor: 5}, 217 features: KernelFeatures{ 218 API: KFeatAPIMapMMap, 219 Program: KFeatProgTracing, 220 Attach: KFeatAttachTraceRawTP | KFeatAttachTraceFentry | KFeatAttachTraceFExit, 221 }, 222 }, 223 { 224 version: KernelVersion{Major: 5, Minor: 6}, 225 features: KernelFeatures{ 226 Map: KFeatMapStructOps, 227 API: KFeatAPIMapBatchOps, 228 Program: KFeatProgStructOps | KFeatProgExt, 229 Misc: KFeatBTFFuncScope, 230 }, 231 }, 232 { 233 version: KernelVersion{Major: 5, Minor: 7}, 234 features: KernelFeatures{ 235 Arch: KFeatArchRiscVRV32G, 236 Program: KFeatProgLSM, 237 Attach: KFeatAttachModifyReturn | KFeatAttachLSMMAC, 238 API: KFeatAPILinkCreate | KFeatAPILinkUpdate, 239 }, 240 }, 241 { 242 version: KernelVersion{Major: 5, Minor: 8}, 243 features: KernelFeatures{ 244 Map: KFeatMapRingBuffer, 245 Attach: KFeatAttachTraceIter | KFeatAttachCGroupINetGetPeerName | 246 KFeatAttachCGroupINetGetSocketName | KFeatAttachXDPDevMap, 247 API: KFeatAPILinkGetFDByID | KFeatAPILinkGetNextID | KFeatAPIEnableStats | KFeatAPIIterCreate, 248 }, 249 }, 250 { 251 version: KernelVersion{Major: 5, Minor: 9}, 252 features: KernelFeatures{ 253 Program: KFeatProgSKLookup, 254 Attach: KFeatAttachCGroupInetSocketRelease | KFeatAttachXDPCPUMap | 255 KFeatAttachSKLookup | KFeatAttachXDP, 256 API: KFeatAPILinkDetach, 257 }, 258 }, 259 { 260 version: KernelVersion{Major: 5, Minor: 10}, 261 features: KernelFeatures{ 262 Map: KFeatMapINodeStorage | KFeatMapDynamicInnerMap, 263 API: KFeatAPIProgBindMap, 264 }, 265 }, 266 { 267 version: KernelVersion{Major: 5, Minor: 11}, 268 features: KernelFeatures{ 269 Map: KFeatMapTaskStorage, 270 }, 271 }, 272 { 273 version: KernelVersion{Major: 5, Minor: 13}, 274 features: KernelFeatures{ 275 Map: KFeatMapPerCPUArrayBatchOps | KFeatMapLPMTrieBatchOps, 276 }, 277 }, 278 }