BPF Features by Linux Kernel Version

eBPF support

Kernel versionCommit
3.15bd4cf0ed331a

JIT compiling

The list of supported architectures for your kernel can be retrieved with:

git grep HAVE_EBPF_JIT arch/
Feature / ArchitectureKernel versionCommit
x86_643.16622582786c9e
ARM643.18e54bcde3d69d
s3904.1054623105728
Constant blinding for JIT machines4.74f3446bb809f
PowerPC644.8156d0e290e96
Constant blinding - PowerPC644.9b7b7013cac55
Sparc644.127a12b5031c6b
MIPS4.13f381bf6d82f0
ARM324.1439c13c204bb1
x86_324.1803f5781be2c7
RISC-V RV64G5.12353ecc6f91f
RISC-V RV32G5.75f316b65e99f
PowerPC325.1351c66ad849a7
LoongArch6.15dc615520c4d

Main features

Several (but not all) of these main features translate to an eBPF program type. The list of such program types supported in your kernel can be found in file include/uapi/linux/bpf.h:

git grep -W 'bpf_prog_type {' include/uapi/linux/bpf.h
FeatureKernel versionCommit
AF_PACKET (libpcap/tcpdump, cls_bpf classifier, netfilter‘s xt_bpf, team driver’s load-balancing mode…)3.15bd4cf0ed331a
Kernel helpers3.15bd4cf0ed331a
bpf() syscall3.1899c55f7d47c0
Maps (a.k.a. Tables; details below)3.1899c55f7d47c0
BPF attached to sockets3.1989aa075832b0
BPF attached to kprobes4.12541517c32be
cls_bpf / act_bpf for tc4.1e2e9b6541dd4
Tail calls4.204fd61ab36ec
Non-root programs on sockets4.41be7f75d1668
Persistent maps and programs (virtual FS)4.4b2197755b263
tc's direct-action (da) mode4.4045efa82ff56
tc's clsact qdisc4.51f211a1b929c
BPF attached to tracepoints4.798b5c2c65c29
Direct packet access4.7969bf05eb3ce
XDP (see below)4.86a773a15a1e8
BPF attached to perf events4.90515e5999a46
Hardware offload for tc's cls_bpf4.9332ae8e2f6ec
Verifier exposure and internal hooks4.913a27dfc6697
BPF attached to cgroups for socket filtering4.100e33661de493
Lightweight tunnel encapsulation4.103a0af8fd61f9
eBPF support for xt_bpf module (iptables)4.102c16d6033264
BPF program tag4.107bd509e311f4
Tracepoints to debug BPF4.11 (removed in 4.18)a67edbf4fb6d 4d220ed0f814
Testing / benchmarking BPF programs4.121cf1cae963c2
BPF programs and maps IDs4.13dc4bb0e23561
BPF support for sock_ops4.1340304b2a1567
BPF support for skbs on sockets4.14b005fd189cec
bpftool utility in kernel sources4.1571bb428fe2c1
BPF attached to cgroups as device controller4.15ebc614f68736
bpf2bpf function calls4.16cc8b0b92a169
BPF used for monitoring socket RX/TX data4.174f738adba30a
BPF attached to raw tracepoints4.17c4f6699dfcb8
BPF attached to bind() system call4.174fbac77d2d09 aac3fc320d94
BPF attached to connect() system call4.17d74bad4e74ee
BPF Type Format (BTF)4.1869b693f0aefa
AF_XDP4.18fbfc504a24f5
bpfilter4.18d2ba09c17a06
End.BPF action for seg6local LWT4.18004d4b274e2a
BPF attached to LIRC devices4.18f4364dcfc86d
Pass map values to map helpers4.18d71962f3e627
BPF socket reuseport4.192dbb9b9e6df6
BPF flow dissector4.20d58e468b1112
BPF 1M insn limit5.2c04c0d2b968a
BPF cgroup sysctl5.27b146cebe30c
BPF raw tracepoint writable5.29df1c28bb752
BPF bounded loop5.32589726d12a1
BPF trampoline5.5fec56f5890d9
BPF LSM hook5.7fc611f47f218 641cd7b06c91
BPF iterator5.8180139dca8b3
BPF socket lookup hook5.9e9ddbb7707ff
Sleepable BPF programs5.101e6c62a88215
Mixing bpf2bpf function calls and tailcalls (x86_64)5.10e411901c0b77
Mixing bpf2bpf function calls and tailcalls (arm64)6.0d4609a5d8c70
Mixing bpf2bpf function calls and tailcalls (s390)6.3dd691e847d28
Mixing bpf2bpf function calls and tailcalls (loongarch)6.4bb035ef0cc91

Program types

Program typeKernel versionCommitEnum
Socket filter3.19ddd872bc3098BPF_PROG_TYPE_SOCKET_FILTER
Kprobe4.12541517c32beBPF_PROG_TYPE_KPROBE
traffic control (TC)4.196be4325f443BPF_PROG_TYPE_SCHED_CLS
traffic control (TC)4.194caee8c312dBPF_PROG_TYPE_SCHED_ACT
Tracepoint4.798b5c2c65c29BPF_PROG_TYPE_TRACEPOINT
XDP4.86a773a15a1e8BPF_PROG_TYPE_XDP
Perf event4.90515e5999a46BPF_PROG_TYPE_PERF_EVENT
cgroup socket filtering4.100e33661de493BPF_PROG_TYPE_CGROUP_SKB
cgroup sock modification4.10610236587600BPF_PROG_TYPE_CGROUP_SOCK
lightweight tunnel (IN)4.103a0af8fd61f9BPF_PROG_TYPE_LWT_IN
lightweight tunnel (OUT)4.103a0af8fd61f9BPF_PROG_TYPE_LWT_OUT
lightweight tunnel (XMIT)4.103a0af8fd61f9BPF_PROG_TYPE_LWT_XMIT
cgroup sock ops (per conn)4.1340304b2a1567BPF_PROG_TYPE_SOCK_OPS
stream parser / stream verdict4.14b005fd189cecBPF_PROG_TYPE_SK_SKB
cgroup device manager4.15ebc614f68736BPF_PROG_TYPE_CGROUP_DEVICE
socket msg verdict4.174f738adba30aBPF_PROG_TYPE_SK_MSG
Raw tracepoint4.17c4f6699dfcb8BPF_PROG_TYPE_RAW_TRACEPOINT
socket binding4.174fbac77d2d09BPF_PROG_TYPE_CGROUP_SOCK_ADDR
LWT seg6local4.18004d4b274e2aBPF_PROG_TYPE_LWT_SEG6LOCAL
lirc devices4.18f4364dcfc86dBPF_PROG_TYPE_LIRC_MODE2
lookup SO_REUSEPORT socket4.192dbb9b9e6df6BPF_PROG_TYPE_SK_REUSEPORT
flow dissector4.20d58e468b1112BPF_PROG_TYPE_FLOW_DISSECTOR
cgroup sysctl5.27b146cebe30cBPF_PROG_TYPE_CGROUP_SYSCTL
writable raw tracepoints5.29df1c28bb752BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE
cgroup getsockopt/setsockopt5.30d01da6afc54BPF_PROG_TYPE_CGROUP_SOCKOPT
Tracing (BTF/BPF trampoline)5.5f1b9509c2fb0BPF_PROG_TYPE_TRACING
struct ops5.627ae7997a661BPF_PROG_TYPE_STRUCT_OPS
extensions5.6be8704ff07d2BPF_PROG_TYPE_EXT
LSM5.7fc611f47f218BPF_PROG_TYPE_LSM
lookup listening socket5.9e9ddbb7707ffBPF_PROG_TYPE_SK_LOOKUP
Allow executing syscalls5.1579a7f8bdb159BPF_PROG_TYPE_SYSCALL

Maps (a.k.a. Tables, in BCC lingo)

Map types

The list of map types supported in your kernel can be found in file include/uapi/linux/bpf.h:

git grep -W 'bpf_map_type {' include/uapi/linux/bpf.h
Map typeKernel versionCommitEnum
Hash3.190f8e4bd8a1fcBPF_MAP_TYPE_HASH
Array3.1928fbcfa08d8eBPF_MAP_TYPE_ARRAY
Prog array4.204fd61ab36ecBPF_MAP_TYPE_PROG_ARRAY
Perf events4.3ea317b267e9dBPF_MAP_TYPE_PERF_EVENT_ARRAY
Per-CPU hash4.6824bd0ce6c7cBPF_MAP_TYPE_PERCPU_HASH
Per-CPU array4.6a10423b87a7eBPF_MAP_TYPE_PERCPU_ARRAY
Stack trace4.6d5a3b1f69186BPF_MAP_TYPE_STACK_TRACE
cgroup array4.84ed8ec521ed5BPF_MAP_TYPE_CGROUP_ARRAY
LRU hash4.1029ba732acbee 3a08c2fd7634BPF_MAP_TYPE_LRU_HASH
LRU per-CPU hash4.108f8449384ec3 961578b63474BPF_MAP_TYPE_LRU_PERCPU_HASH
LPM trie (longest-prefix match)4.11b95a5c4db09bBPF_MAP_TYPE_LPM_TRIE
Array of maps4.1256f668dfe00dBPF_MAP_TYPE_ARRAY_OF_MAPS
Hash of maps4.12bcc6b1b7ebf8BPF_MAP_TYPE_HASH_OF_MAPS
Netdevice references (array)4.14546ac1ffb70dBPF_MAP_TYPE_DEVMAP
Socket references (array)4.14174a79ff9515BPF_MAP_TYPE_SOCKMAP
CPU references4.156710e1126934BPF_MAP_TYPE_CPUMAP
AF_XDP socket (XSK) references4.18fbfc504a24f5BPF_MAP_TYPE_XSKMAP
Socket references (hashmap)4.1881110384441aBPF_MAP_TYPE_SOCKHASH
cgroup storage4.19de9cbbaadba5BPF_MAP_TYPE_CGROUP_STORAGE
reuseport sockarray4.195dc4c4b7d4e8BPF_MAP_TYPE_REUSEPORT_SOCKARRAY
precpu cgroup storage4.20b741f1630346BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE
queue4.20f1a2e44a3aecBPF_MAP_TYPE_QUEUE
stack4.20f1a2e44a3aecBPF_MAP_TYPE_STACK
socket local storage5.26ac99e8f23d4BPF_MAP_TYPE_SK_STORAGE
Netdevice references (hashmap)5.46f9d451ab1a3BPF_MAP_TYPE_DEVMAP_HASH
struct ops5.685d33df357b6BPF_MAP_TYPE_STRUCT_OPS
ring buffer5.8457f44363a88BPF_MAP_TYPE_RINGBUF
inode storage5.108ea636848acaBPF_MAP_TYPE_INODE_STORAGE
task storage5.114cf1bc1f1045BPF_MAP_TYPE_TASK_STORAGE
Bloom filter5.169330986c0300BPF_MAP_TYPE_BLOOM_FILTER
user ringbuf6.1583c1f420173BPF_MAP_TYPE_USER_RINGBUF

Map userspace API

Some (but not all) of these API features translate to a subcommand beginning with BPF_MAP_. The list of subcommands supported in your kernel can be found in file include/uapi/linux/bpf.h:

git grep -W 'bpf_cmd {' include/uapi/linux/bpf.h
FeatureKernel versionCommit
Basic operations (lookup, update, delete, GET_NEXT_KEY)3.18db20fd2b0108
Pass flags to UPDATE_ELEM3.193274f52073d8
Pre-alloc map memory by default4.66c9059817432
Pass NULL to GET_NEXT_KEY4.128fe45924387b
Creation: select NUMA node4.1496eabe7a40aa
Restrict access from syscall side4.156e71b04a8224
Creation: specify map name4.15ad5b177bd73f
LOOKUP_AND_DELETE_ELEM4.20bd513cd08f10
Creation: BPF_F_ZERO_SEED5.096b3b6c9091d
BPF_F_LOCK flag for lookup / update5.196049f3afd50
Restrict access from BPF side5.2591fe9888d78
FREEZE5.287df15de441b
mmap() support for array maps5.5fc9702273e2e
LOOKUP_BATCH5.6cb4d03ab499d
UPDATE_BATCH, DELETE_BATCH5.6aa2e93b8e58e
LOOKUP_AND_DELETE_BATCH5.6057996380a42
LOOKUP_AND_DELETE_ELEM support for hash maps5.143e87f192b405

XDP

An approximate list of drivers or components supporting XDP programs for your kernel can be retrieved with:

git grep -l XDP_SETUP_PROG drivers/
Feature / DriverKernel versionCommit
XDP core architecture4.86a773a15a1e8
Action: drop4.86a773a15a1e8
Action: pass on to stack4.86a773a15a1e8
Action: direct forwarding (on same port)4.86ce96ca348a9
Direct packet data write4.84acf6c0b84c9
Mellanox mlx4 driver4.847a38e155037
Mellanox mlx5 driver4.986994156c736
Netronome nfp driver4.10ecd63a0217d5
QLogic (Cavium) qed* drivers4.10496e05170958
virtio_net driver4.10f600b6905015
Broadcom bnxt_en driver4.11c6d30e8391b8
Intel ixgbe* drivers4.12924708081629
Cavium thunderx driver4.1205c773f52b96
Generic XDP4.12b5cdae3291f7
Intel i40e driver4.130c8493d90b6b
Action: redirect4.146453073987ba
Support for tap4.14761876c857cb
Support for veth4.14d445516966dc
Intel ixgbevf driver4.17c7aec59657b6
Freescale dpaa2 driver5.07e273a8ebdd3
Socionext netsec driver5.3ba2b232108d3
TI cpsw driver5.39ed4050c0d75
Intel ice driver5.5efc2214b6047
Solarflare sfc driver5.5eb9a36be7f3e
Marvell mvneta driver5.50db51da7a8e9
Microsoft hv_netvsc driver5.6351e1581395f
Amazon ena driver5.6838c93dc5449
xen-netfront driver5.96c5aa6fc4def
Marvell mvpp2 driver5.907dd0a7aae7f
Intel igb driver5.109cbc948b5a20
Freescale dpaa driver5.1186c0c196cbe4
Intel igc driver5.1326575105d6ed
Freescale enetc driver5.13d1b15102dd16
STMicro stmmac driver5.135fabb01207a2
bonding driver5.159e2ee5c7e7c3
Marvell otx25.1606059a1a9a4a
Microsoft mana driver5.17ed5356b53f07
Fungible fun driver5.18db37bc177dae
Aquantia atlantic driver5.190d14657f4083
Mediatek mtk driver6.07c26c20da5d4
Freescale fec_enet driver6.26d6b39f180b8
Microchip lan966x driver6.26a2159be7604
Engleder tsnep driver6.3d24bc0bcbbff
Google gve driver6.42e80aeae9f80
VMware vmxnet3 driver6.654f00cce1178

Helpers

The list of helpers supported in your kernel can be found in file include/uapi/linux/bpf.h:

git grep '	FN(' include/uapi/linux/bpf.h

Alphabetical order

HelperKernel versionLicenseCommit
BPF_FUNC_bind()4.17d74bad4e74ee
BPF_FUNC_bprm_opts_set()5.113f6719c7b62f
BPF_FUNC_btf_find_by_name_kind()5.143d78417b60fb
BPF_FUNC_cgrp_storage_delete()6.2c4bcfb38a95e
BPF_FUNC_cgrp_storage_get()6.2c4bcfb38a95e
BPF_FUNC_check_mtu()5.1234b2021cc616
BPF_FUNC_clone_redirect()4.23896d655f4d4
BPF_FUNC_copy_from_user()5.1007be4c4a3e7a
BPF_FUNC_copy_from_user_task()5.18GPL376040e47334
BPF_FUNC_csum_diff()4.67d672345ed29
BPF_FUNC_csum_level()5.77cdec54f9713
BPF_FUNC_csum_update()4.936bbef52c7eb
BPF_FUNC_current_task_under_cgroup()4.960d20f9195b2
BPF_FUNC_d_path()5.106e22ab9da793
BPF_FUNC_dynptr_data()5.1934d4ef5775f7
BPF_FUNC_dynptr_from_mem()5.19263ae152e962
BPF_FUNC_dynptr_read()5.1913bbbfbea759
BPF_FUNC_dynptr_write()5.1913bbbfbea759
BPF_FUNC_fib_lookup()4.18GPL87f5fc7e48dd
BPF_FUNC_find_vma()5.177c7e3d31e785
BPF_FUNC_for_each_map_elem()5.1369c087ba6225
BPF_FUNC_get_attach_cookie()5.157adfc6c9b315
BPF_FUNC_get_branch_snapshot()5.16GPL856c02dbce4f
BPF_FUNC_get_current_ancestor_cgroup_id()5.6b4490c5c4e02
BPF_FUNC_get_cgroup_classid()4.38d20aabe1c76
BPF_FUNC_get_current_cgroup_id()4.18bf6fa2c893c5
BPF_FUNC_get_current_comm()4.2ffeedafbf023
BPF_FUNC_get_current_pid_tgid()4.2ffeedafbf023
BPF_FUNC_get_current_task()4.8GPL606274c5abd8
BPF_FUNC_get_current_task_btf()5.11GPL3ca1032ab7ab
BPF_FUNC_get_current_uid_gid()4.2ffeedafbf023
BPF_FUNC_get_func_arg()5.17f92c1e183604
BPF_FUNC_get_func_arg_cnt()5.17f92c1e183604
BPF_FUNC_get_func_ip()5.155d8b583d04ae
BPF_FUNC_get_func_ret()5.17f92c1e183604
BPF_FUNC_get_retval()5.18b44123b4a3dc
BPF_FUNC_get_hash_recalc()4.813c5c240f789
BPF_FUNC_get_listener_sock()5.1dbafd7ddd623
BPF_FUNC_get_local_storage()4.19cd3394317653
BPF_FUNC_get_netns_cookie()5.7f318903c0bf4
BPF_FUNC_get_ns_current_pid_tgid()5.7b4490c5c4e02
BPF_FUNC_get_numa_node_id()4.102d0e30c30f84
BPF_FUNC_get_prandom_u32()4.103e69b508b6f
BPF_FUNC_get_route_realm()4.4c46646d0484f
BPF_FUNC_get_smp_processor_id()4.1c04167ce2ca0
BPF_FUNC_get_socket_cookie()4.1291b8270f2a4d
BPF_FUNC_get_socket_uid()4.126acc5c291068
BPF_FUNC_get_stack()4.18GPLde2ff05f48af
BPF_FUNC_get_stackid()4.6GPLd5a3b1f69186
BPF_FUNC_get_task_stack()5.9fa28dcb82a38
BPF_FUNC_getsockopt()4.15cd86d1fd2102
BPF_FUNC_ima_file_hash()5.18174b16946e39
BPF_FUNC_ima_inode_hash()5.1127672f0d280a
BPF_FUNC_inode_storage_delete()5.108ea636848aca
BPF_FUNC_inode_storage_get()5.108ea636848aca
BPF_FUNC_jiffies64()5.55576b991e9c1
BPF_FUNC_kallsyms_lookup_name()5.16d6aef08a872b
BPF_FUNC_kptr_xchg()5.19c0a5a21c25f3
BPF_FUNC_ktime_get_boot_ns()5.871d19214776e
BPF_FUNC_ktime_get_coarse_ns()5.11d05512618056
BPF_FUNC_ktime_get_ns()4.1d9847d310ab4
BPF_FUNC_ktime_get_tai_ns()6.1c8996c98f703
BPF_FUNC_l3_csum_replace()4.191bc4822c3d6
BPF_FUNC_l4_csum_replace()4.191bc4822c3d6
BPF_FUNC_load_hdr_opt()5.100813a841566f
BPF_FUNC_loop()5.17e6f2dd0f8067
BPF_FUNC_lwt_push_encap()4.18fe94cc290f53
BPF_FUNC_lwt_seg6_action()4.18fe94cc290f53
BPF_FUNC_lwt_seg6_adjust_srh()4.18fe94cc290f53
BPF_FUNC_lwt_seg6_store_bytes()4.18fe94cc290f53
BPF_FUNC_map_delete_elem()3.19d0003ec01c66
BPF_FUNC_map_lookup_elem()3.19d0003ec01c66
BPF_FUNC_map_lookup_percpu_elem()5.1907343110b293
BPF_FUNC_map_peek_elem()4.20f1a2e44a3aec
BPF_FUNC_map_pop_elem()4.20f1a2e44a3aec
BPF_FUNC_map_push_elem()4.20f1a2e44a3aec
BPF_FUNC_map_update_elem()3.19d0003ec01c66
BPF_FUNC_msg_apply_bytes()4.172a100317c9eb
BPF_FUNC_msg_cork_bytes()4.1791843d540a13
BPF_FUNC_msg_pop_data()5.07246d8ed4dcc
BPF_FUNC_msg_pull_data()4.17015632bb30da
BPF_FUNC_msg_push_data()4.206fff607e2f14
BPF_FUNC_msg_redirect_hash()4.1881110384441a
BPF_FUNC_msg_redirect_map()4.174f738adba30a
BPF_FUNC_per_cpu_ptr()5.10eaa6bcb71ef6
BPF_FUNC_perf_event_output()4.4GPLa43eec304259
BPF_FUNC_perf_event_read()4.3GPL35578d798400
BPF_FUNC_perf_event_read_value()4.15GPL908432ca84fc
BPF_FUNC_perf_prog_read_value()4.15GPL4bebdc7a85aa
BPF_FUNC_probe_read()4.1GPL2541517c32be
BPF_FUNC_probe_read_kernel()5.5GPL6ae08ae3dea2
BPF_FUNC_probe_read_kernel_str()5.5GPL6ae08ae3dea2
BPF_FUNC_probe_read_user()5.5GPL6ae08ae3dea2
BPF_FUNC_probe_read_user_str()5.5GPL6ae08ae3dea2
BPF_FUNC_probe_read_str()4.11GPLa5e8c07059d0
BPF_FUNC_probe_write_user()4.8GPL96ae52279594
BPF_FUNC_rc_keydown()4.18GPLf4364dcfc86d
BPF_FUNC_rc_pointer_rel()5.0GPL01d3240a04f4
BPF_FUNC_rc_repeat()4.18GPLf4364dcfc86d
BPF_FUNC_read_branch_records()5.6GPLfff7b64355ea
BPF_FUNC_redirect()4.427b29f63058d
BPF_FUNC_redirect_map()4.1497f91a7cf04f
BPF_FUNC_redirect_neigh()5.10b4ab31414970
BPF_FUNC_redirect_peer()5.109aa1206e8f48
BPF_FUNC_reserve_hdr_opt()5.100813a841566f
BPF_FUNC_ringbuf_discard()5.8457f44363a88
BPF_FUNC_ringbuf_discard_dynptr()5.19bc34dee65a65
BPF_FUNC_ringbuf_output()5.8457f44363a88
BPF_FUNC_ringbuf_query()5.8457f44363a88
BPF_FUNC_ringbuf_reserve()5.8457f44363a88
BPF_FUNC_ringbuf_reserve_dynptr()5.19bc34dee65a65
BPF_FUNC_ringbuf_submit()5.8457f44363a88
BPF_FUNC_ringbuf_submit_dynptr()5.19bc34dee65a65
BPF_FUNC_send_signal()5.38b401f9ed244
BPF_FUNC_send_signal_thread()5.58482941f0906
BPF_FUNC_seq_printf()5.7GPL492e639f0c22
BPF_FUNC_seq_printf_btf()5.10eb411377aed9
BPF_FUNC_seq_write()5.7GPL492e639f0c22
BPF_FUNC_set_hash()4.13ded092cd73c2
BPF_FUNC_set_hash_invalid()4.97a4b28c6cc9f
BPF_FUNC_set_retval()5.18b44123b4a3dc
BPF_FUNC_setsockopt()4.138c4b4c7e9ff0
BPF_FUNC_sk_ancestor_cgroup_id()5.7f307fa2cb4c9
BPF_FUNC_sk_assign()5.6cf7fbe660f2d
BPF_FUNC_sk_cgroup_id()5.7f307fa2cb4c9
BPF_FUNC_sk_fullsock()5.146f8bc92758c
BPF_FUNC_sk_lookup_tcp()4.206acc9b432e67
BPF_FUNC_sk_lookup_udp()4.206acc9b432e67
BPF_FUNC_sk_redirect_hash()4.1881110384441a
BPF_FUNC_sk_redirect_map()4.14174a79ff9515
BPF_FUNC_sk_release()4.206acc9b432e67
BPF_FUNC_sk_select_reuseport()4.192dbb9b9e6df6
BPF_FUNC_sk_storage_delete()5.26ac99e8f23d4
BPF_FUNC_sk_storage_get()5.26ac99e8f23d4
BPF_FUNC_skb_adjust_room()4.132be7e212d541
BPF_FUNC_skb_ancestor_cgroup_id()4.197723628101aa
BPF_FUNC_skb_change_head()4.103a0af8fd61f9
BPF_FUNC_skb_change_proto()4.86578171a7ff0
BPF_FUNC_skb_change_tail()4.95293efe62df8
BPF_FUNC_skb_change_type()4.8d2485c4242a8
BPF_FUNC_skb_cgroup_classid()5.10b426ce83baa7
BPF_FUNC_skb_cgroup_id()4.18cb20b08ead40
BPF_FUNC_skb_ecn_set_ce()5.1f7c917ba11a6
BPF_FUNC_skb_get_tunnel_key()4.3d3aa45ce6b94
BPF_FUNC_skb_get_tunnel_opt()4.614ca0751c96f
BPF_FUNC_skb_get_xfrm_state()4.1812bed760a78d
BPF_FUNC_skb_load_bytes()4.505c74e5e53f6
BPF_FUNC_skb_load_bytes_relative()4.184e1ec56cdc59
BPF_FUNC_skb_output()5.5a7658e1a4164
BPF_FUNC_skb_pull_data()4.936bbef52c7eb
BPF_FUNC_skb_set_tstamp()5.189bb984f28d5b
BPF_FUNC_skb_set_tunnel_key()4.3d3aa45ce6b94
BPF_FUNC_skb_set_tunnel_opt()4.614ca0751c96f
BPF_FUNC_skb_store_bytes()4.191bc4822c3d6
BPF_FUNC_skb_under_cgroup()4.84a482f34afcc
BPF_FUNC_skb_vlan_pop()4.34e10df9a60d9
BPF_FUNC_skb_vlan_push()4.34e10df9a60d9
BPF_FUNC_skc_lookup_tcp()5.2edbf8c01de5a
BPF_FUNC_skc_to_mctcp_sock()5.193bc253c2e652
BPF_FUNC_skc_to_tcp_sock()5.9478cfbdf5f13
BPF_FUNC_skc_to_tcp_request_sock()5.9478cfbdf5f13
BPF_FUNC_skc_to_tcp_timewait_sock()5.9478cfbdf5f13
BPF_FUNC_skc_to_tcp6_sock()5.9af7ec1383361
BPF_FUNC_skc_to_udp6_sock()5.90d4fad3e57df
BPF_FUNC_skc_to_unix_sock()5.169eeb3aa33ae0
BPF_FUNC_snprintf()5.137b15523a989b
BPF_FUNC_snprintf_btf()5.10c4d0bfb45068
BPF_FUNC_sock_from_file()5.114f19cab76136
BPF_FUNC_sock_hash_update()4.1881110384441a
BPF_FUNC_sock_map_update()4.14174a79ff9515
BPF_FUNC_spin_lock()5.1d83525ca62cf
BPF_FUNC_spin_unlock()5.1d83525ca62cf
BPF_FUNC_store_hdr_opt()5.100813a841566f
BPF_FUNC_strncmp()5.17c5fb19937455
BPF_FUNC_strtol()5.2d7a4cb9b6705
BPF_FUNC_strtoul()5.2d7a4cb9b6705
BPF_FUNC_sys_bpf()5.1479a7f8bdb159
BPF_FUNC_sys_close()5.143abea089246f
BPF_FUNC_sysctl_get_current_value()5.21d11b3016cec
BPF_FUNC_sysctl_get_name()5.2808649fb787d
BPF_FUNC_sysctl_get_new_value()5.24e63acdff864
BPF_FUNC_sysctl_set_new_value()5.24e63acdff864
BPF_FUNC_tail_call()4.204fd61ab36ec
BPF_FUNC_task_pt_regs()5.15GPLdd6e10fbd9f
BPF_FUNC_task_storage_delete()5.114cf1bc1f1045
BPF_FUNC_task_storage_get()5.114cf1bc1f1045
BPF_FUNC_tcp_check_syncookie()5.2399040847084
BPF_FUNC_tcp_gen_syncookie()5.370d66244317e
BPF_FUNC_tcp_raw_check_syncookie_ipv4()6.033bf9885040c
BPF_FUNC_tcp_raw_check_syncookie_ipv6()6.033bf9885040c
BPF_FUNC_tcp_raw_gen_syncookie_ipv4()6.033bf9885040c
BPF_FUNC_tcp_raw_gen_syncookie_ipv6()6.033bf9885040c
BPF_FUNC_tcp_send_ack()5.5206057fe020a
BPF_FUNC_tcp_sock()5.1655a51e536c0
BPF_FUNC_this_cpu_ptr()5.1063d9b80dcf2c
BPF_FUNC_timer_init()5.15b00628b1c7d5
BPF_FUNC_timer_set_callback()5.15b00628b1c7d5
BPF_FUNC_timer_start()5.15b00628b1c7d5
BPF_FUNC_timer_cancel()5.15b00628b1c7d5
BPF_FUNC_trace_printk()4.1GPL9c959c863f82
BPF_FUNC_trace_vprintk()5.16GPL10aceb629e19
BPF_FUNC_user_ringbuf_drain()6.1205715673844
BPF_FUNC_xdp_adjust_head()4.1017bedab27231
BPF_FUNC_xdp_adjust_meta()4.15de8f3a83b0a0
BPF_FUNC_xdp_adjust_tail()4.18b32cc5b9a346
BPF_FUNC_xdp_get_buff_len()5.180165cc817075
BPF_FUNC_xdp_load_bytes()5.183f364222d032
BPF_FUNC_xdp_store_bytes()5.183f364222d032
BPF_FUNC_xdp_output()5.6GPLd831ee84bfc9
BPF_FUNC_override_return()4.16GPL9802d86585db
BPF_FUNC_sock_ops_cb_flags_set()4.16b13d88072172

Note: GPL-only BPF helpers require a GPL-compatible license. The current licenses considered GPL-compatible by the kernel are:

  • GPL
  • GPL v2
  • GPL and additional rights
  • Dual BSD/GPL
  • Dual MIT/GPL
  • Dual MPL/GPL

Check the list of GPL-compatible licenses in your kernel source code.

Program Types

The list of program types and supported helper functions can be retrieved with:

git grep -W 'func_proto(enum bpf_func_id func_id' kernel/ net/ drivers/
Program TypeHelper Functions
BPF_PROG_TYPE_SOCKET_FILTERBPF_FUNC_skb_load_bytes()
BPF_FUNC_skb_load_bytes_relative()
BPF_FUNC_get_socket_cookie()
BPF_FUNC_get_socket_uid()
BPF_FUNC_perf_event_output()
Base functions
BPF_PROG_TYPE_KPROBEBPF_FUNC_perf_event_output()
BPF_FUNC_get_stackid()
BPF_FUNC_get_stack()
BPF_FUNC_perf_event_read_value()
BPF_FUNC_override_return()
Tracing functions
BPF_PROG_TYPE_SCHED_CLS
BPF_PROG_TYPE_SCHED_ACT
BPF_FUNC_skb_store_bytes()
BPF_FUNC_skb_load_bytes()
BPF_FUNC_skb_load_bytes_relative()
BPF_FUNC_skb_pull_data()
BPF_FUNC_csum_diff()
BPF_FUNC_csum_update()
BPF_FUNC_l3_csum_replace()
BPF_FUNC_l4_csum_replace()
BPF_FUNC_clone_redirect()
BPF_FUNC_get_cgroup_classid()
BPF_FUNC_skb_vlan_push()
BPF_FUNC_skb_vlan_pop()
BPF_FUNC_skb_change_proto()
BPF_FUNC_skb_change_type()
BPF_FUNC_skb_adjust_room()
BPF_FUNC_skb_change_tail()
BPF_FUNC_skb_get_tunnel_key()
BPF_FUNC_skb_set_tunnel_key()
BPF_FUNC_skb_get_tunnel_opt()
BPF_FUNC_skb_set_tunnel_opt()
BPF_FUNC_redirect()
BPF_FUNC_get_route_realm()
BPF_FUNC_get_hash_recalc()
BPF_FUNC_set_hash_invalid()
BPF_FUNC_set_hash()
BPF_FUNC_perf_event_output()
BPF_FUNC_get_smp_processor_id()
BPF_FUNC_skb_under_cgroup()
BPF_FUNC_get_socket_cookie()
BPF_FUNC_get_socket_uid()
BPF_FUNC_fib_lookup()
BPF_FUNC_skb_get_xfrm_state()
BPF_FUNC_skb_cgroup_id()
Base functions
BPF_PROG_TYPE_TRACEPOINTBPF_FUNC_perf_event_output()
BPF_FUNC_get_stackid()
BPF_FUNC_get_stack()
BPF_FUNC_d_path()
Tracing functions
BPF_PROG_TYPE_XDPBPF_FUNC_perf_event_output()
BPF_FUNC_get_smp_processor_id()
BPF_FUNC_csum_diff()
BPF_FUNC_xdp_adjust_head()
BPF_FUNC_xdp_adjust_meta()
BPF_FUNC_redirect()
BPF_FUNC_redirect_map()
BPF_FUNC_xdp_adjust_tail()
BPF_FUNC_fib_lookup()
Base functions
BPF_PROG_TYPE_PERF_EVENTBPF_FUNC_perf_event_output()
BPF_FUNC_get_stackid()
BPF_FUNC_get_stack()
BPF_FUNC_perf_prog_read_value()
Tracing functions
BPF_PROG_TYPE_CGROUP_SKBBPF_FUNC_skb_load_bytes()
BPF_FUNC_skb_load_bytes_relative()
BPF_FUNC_get_socket_cookie()
BPF_FUNC_get_socket_uid()
Base functions
BPF_PROG_TYPE_CGROUP_SOCKBPF_FUNC_get_current_uid_gid()
Base functions
BPF_PROG_TYPE_LWT_INBPF_FUNC_lwt_push_encap()
LWT functions
Base functions
BPF_PROG_TYPE_LWT_OUTLWT functions
Base functions
BPF_PROG_TYPE_LWT_XMITBPF_FUNC_skb_get_tunnel_key()
BPF_FUNC_skb_set_tunnel_key()
BPF_FUNC_skb_get_tunnel_opt()
BPF_FUNC_skb_set_tunnel_opt()
BPF_FUNC_redirect()
BPF_FUNC_clone_redirect()
BPF_FUNC_skb_change_tail()
BPF_FUNC_skb_change_head()
BPF_FUNC_skb_store_bytes()
BPF_FUNC_csum_update()
BPF_FUNC_l3_csum_replace()
BPF_FUNC_l4_csum_replace()
BPF_FUNC_set_hash_invalid()
LWT functions
BPF_PROG_TYPE_SOCK_OPSBPF_FUNC_setsockopt()
BPF_FUNC_getsockopt()
BPF_FUNC_sock_ops_cb_flags_set()
BPF_FUNC_sock_map_update()
BPF_FUNC_sock_hash_update()
BPF_FUNC_get_socket_cookie()
Base functions
BPF_PROG_TYPE_SK_SKBBPF_FUNC_skb_store_bytes()
BPF_FUNC_skb_load_bytes()
BPF_FUNC_skb_pull_data()
BPF_FUNC_skb_change_tail()
BPF_FUNC_skb_change_head()
BPF_FUNC_get_socket_cookie()
BPF_FUNC_get_socket_uid()
BPF_FUNC_sk_redirect_map()
BPF_FUNC_sk_redirect_hash()
BPF_FUNC_sk_lookup_tcp()
BPF_FUNC_sk_lookup_udp()
BPF_FUNC_sk_release()
Base functions
BPF_PROG_TYPE_CGROUP_DEVICEBPF_FUNC_map_lookup_elem()
BPF_FUNC_map_update_elem()
BPF_FUNC_map_delete_elem()
BPF_FUNC_get_current_uid_gid()
BPF_FUNC_trace_printk()
BPF_PROG_TYPE_SK_MSGBPF_FUNC_msg_redirect_map()
BPF_FUNC_msg_redirect_hash()
BPF_FUNC_msg_apply_bytes()
BPF_FUNC_msg_cork_bytes()
BPF_FUNC_msg_pull_data()
BPF_FUNC_msg_push_data()
BPF_FUNC_msg_pop_data()
Base functions
BPF_PROG_TYPE_RAW_TRACEPOINTBPF_FUNC_perf_event_output()
BPF_FUNC_get_stackid()
BPF_FUNC_get_stack()
BPF_FUNC_skb_output()
Tracing functions
BPF_PROG_TYPE_CGROUP_SOCK_ADDRBPF_FUNC_get_current_uid_gid()
BPF_FUNC_bind()
BPF_FUNC_get_socket_cookie()
Base functions
BPF_PROG_TYPE_LWT_SEG6LOCALBPF_FUNC_lwt_seg6_store_bytes()
BPF_FUNC_lwt_seg6_action()
BPF_FUNC_lwt_seg6_adjust_srh()
LWT functions
BPF_PROG_TYPE_LIRC_MODE2BPF_FUNC_rc_repeat()
BPF_FUNC_rc_keydown()
BPF_FUNC_rc_pointer_rel()
BPF_FUNC_map_lookup_elem()
BPF_FUNC_map_update_elem()
BPF_FUNC_map_delete_elem()
BPF_FUNC_ktime_get_ns()
BPF_FUNC_tail_call()
BPF_FUNC_get_prandom_u32()
BPF_FUNC_trace_printk()
BPF_PROG_TYPE_SK_REUSEPORTBPF_FUNC_sk_select_reuseport()
BPF_FUNC_skb_load_bytes()
BPF_FUNC_load_bytes_relative()
Base functions
BPF_PROG_TYPE_FLOW_DISSECTORBPF_FUNC_skb_load_bytes()
Base functions
Function GroupFunctions
Base functionsBPF_FUNC_map_lookup_elem()
BPF_FUNC_map_update_elem()
BPF_FUNC_map_delete_elem()
BPF_FUNC_map_peek_elem()
BPF_FUNC_map_pop_elem()
BPF_FUNC_map_push_elem()
BPF_FUNC_get_prandom_u32()
BPF_FUNC_get_smp_processor_id()
BPF_FUNC_get_numa_node_id()
BPF_FUNC_tail_call()
BPF_FUNC_ktime_get_boot_ns()
BPF_FUNC_ktime_get_ns()
BPF_FUNC_trace_printk()
BPF_FUNC_spin_lock()
BPF_FUNC_spin_unlock()
Tracing functionsBPF_FUNC_map_lookup_elem()
BPF_FUNC_map_update_elem()
BPF_FUNC_map_delete_elem()
BPF_FUNC_probe_read()
BPF_FUNC_ktime_get_boot_ns()
BPF_FUNC_ktime_get_ns()
BPF_FUNC_tail_call()
BPF_FUNC_get_current_pid_tgid()
BPF_FUNC_get_current_task()
BPF_FUNC_get_current_uid_gid()
BPF_FUNC_get_current_comm()
BPF_FUNC_trace_printk()
BPF_FUNC_get_smp_processor_id()
BPF_FUNC_get_numa_node_id()
BPF_FUNC_perf_event_read()
BPF_FUNC_probe_write_user()
BPF_FUNC_current_task_under_cgroup()
BPF_FUNC_get_prandom_u32()
BPF_FUNC_probe_read_str()
BPF_FUNC_get_current_cgroup_id()
BPF_FUNC_send_signal()
BPF_FUNC_probe_read_kernel()
BPF_FUNC_probe_read_kernel_str()
BPF_FUNC_probe_read_user()
BPF_FUNC_probe_read_user_str()
BPF_FUNC_send_signal_thread()
BPF_FUNC_get_ns_current_pid_tgid()
BPF_FUNC_xdp_output()
BPF_FUNC_get_task_stack()
LWT functionsBPF_FUNC_skb_load_bytes()
BPF_FUNC_skb_pull_data()
BPF_FUNC_csum_diff()
BPF_FUNC_get_cgroup_classid()
BPF_FUNC_get_route_realm()
BPF_FUNC_get_hash_recalc()
BPF_FUNC_perf_event_output()
BPF_FUNC_get_smp_processor_id()
BPF_FUNC_skb_under_cgroup()