8sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget./translations/zh_CN/userspace-api/ebpf/syscallmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/zh_TW/userspace-api/ebpf/syscallmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/it_IT/userspace-api/ebpf/syscallmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ja_JP/userspace-api/ebpf/syscallmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ko_KR/userspace-api/ebpf/syscallmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/sp_SP/userspace-api/ebpf/syscallmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhH/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall.rsthKubhsection)}(hhh](htitle)}(h eBPF Syscallh]h eBPF Syscall}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh field_list)}(hhh]hfield)}(hhh](h field_name)}(hAuthorsh]hAuthors}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh field_body)}(hr- Alexei Starovoitov - Joe Stringer - Michael Kerrisk h]h bullet_list)}(hhh](h list_item)}(h#Alexei Starovoitov h]h paragraph)}(hhh](hAlexei Starovoitov <}(hhhhhNhNubh reference)}(hast@kernel.orgh]hast@kernel.org}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:ast@kernel.orguh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hJoe Stringer h]h)}(hj!h](hJoe Stringer <}(hj#hhhNhNubh)}(hjoe@wand.net.nzh]hjoe@wand.net.nz}(hj*hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:joe@wand.net.nzuh1hhj#ubh>}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhubh)}(h)Michael Kerrisk h]h)}(h(Michael Kerrisk h](hMichael Kerrisk <}(hjNhhhNhNubh)}(hmtk.manpages@gmail.comh]hmtk.manpages@gmail.com}(hjVhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:mtk.manpages@gmail.comuh1hhjNubh>}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjJubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]bullet-uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hTThe primary info for the bpf syscall is available in the `man-pages`_ for `bpf(2)`_.h](h9The primary info for the bpf syscall is available in the }(hjhhhNhNubh)}(h `man-pages`_h]h man-pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]name man-pagesrefuri%https://www.kernel.org/doc/man-pages/uh1hhjresolvedKubh for }(hjhhhNhNubh)}(h `bpf(2)`_h]hbpf(2)}(hjhhhNhNubah}(h]h ]h"]h$]h&]namebpf(2)j0https://man7.org/linux/man-pages/man2/bpf.2.htmluh1hhjjKubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(hbpf() subcommand referenceh]hbpf() subcommand reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hX$The operation to be performed by the **bpf**\ () system call is determined by the *cmd* argument. Each operation takes an accompanying argument, provided via *attr*, which is a pointer to a union of type *bpf_attr* (see below). The size argument is the size of the union pointed to by *attr*.h](h%The operation to be performed by the }(hjhhhNhNubhstrong)}(h**bpf**h]hbpf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh& () system call is determined by the }(hjhhhNhNubhemphasis)}(h*cmd*h]hcmd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhG argument. Each operation takes an accompanying argument, provided via }(hjhhhNhNubj)}(h*attr*h]hattr}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh(, which is a pointer to a union of type }(hjhhhNhNubj)}(h *bpf_attr*h]hbpf_attr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhG (see below). The size argument is the size of the union pointed to by }(hjhhhNhNubj)}(h*attr*h]hattr}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:16: ./include/uapi/linux/bpf.hhKhjhhubhdefinition_list)}(hhh](hdefinition_list_item)}(hXBPF_MAP_CREATE Description Create a map and return a file descriptor that refers to the map. The close-on-exec file descriptor flag (see **fcntl**\ (2)) is automatically enabled for the new file descriptor. Applying **close**\ (2) to the file descriptor returned by **BPF_MAP_CREATE** will delete the map (but see NOTES). Return A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](hterm)}(hBPF_MAP_CREATEh]hBPF_MAP_CREATE}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjOubh definition)}(hhh]jI)}(hhh](jN)}(hX4Description Create a map and return a file descriptor that refers to the map. The close-on-exec file descriptor flag (see **fcntl**\ (2)) is automatically enabled for the new file descriptor. Applying **close**\ (2) to the file descriptor returned by **BPF_MAP_CREATE** will delete the map (but see NOTES). h](jT)}(h Descriptionh]h Description}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjlubje)}(hhh](h)}(hCreate a map and return a file descriptor that refers to the map. The close-on-exec file descriptor flag (see **fcntl**\ (2)) is automatically enabled for the new file descriptor.h](hnCreate a map and return a file descriptor that refers to the map. The close-on-exec file descriptor flag (see }(hjhhhNhNubj)}(h **fcntl**h]hfcntl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh< (2)) is automatically enabled for the new file descriptor.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubh)}(hrApplying **close**\ (2) to the file descriptor returned by **BPF_MAP_CREATE** will delete the map (but see NOTES).h](h Applying }(hjhhhNhNubj)}(h **close**h]hclose}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) (2) to the file descriptor returned by }(hjhhhNhNubj)}(h**BPF_MAP_CREATE**h]hBPF_MAP_CREATE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh% will delete the map (but see NOTES).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubeh}(h]h ]h"]h$]h&]uh1jdhjlubeh}(h]h ]h"]h$]h&]uh1jMhj~hKhjiubjN)}(hReturn A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hReturnh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShjchKhjubje)}(hhh]h)}(hxA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately).h](hZA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, }(hjhhhNhNubj)}(h*errno*h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is set appropriately).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjchKhjiubeh}(h]h ]h"]h$]h&]uh1jHhjfubah}(h]h ]h"]h$]h&]uh1jdhjOubeh}(h]h ]h"]h$]h&]uh1jMhjchKhjJubjN)}(hXBPF_MAP_LOOKUP_ELEM Description Look up an element with a given *key* in the map referred to by the file descriptor *map_fd*. The *flags* argument may be specified as one of the following: **BPF_F_LOCK** Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_MAP_LOOKUP_ELEMh]hBPF_MAP_LOOKUP_ELEM}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhj6ubje)}(hhh]jI)}(hhh](jN)}(hXPDescription Look up an element with a given *key* in the map referred to by the file descriptor *map_fd*. The *flags* argument may be specified as one of the following: **BPF_F_LOCK** Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock. h](jT)}(h Descriptionh]h Description}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjOubje)}(hhh](h)}(h]Look up an element with a given *key* in the map referred to by the file descriptor *map_fd*.h](h Look up an element with a given }(hjehhhNhNubj)}(h*key*h]hkey}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubh/ in the map referred to by the file descriptor }(hjehhhNhNubj)}(h*map_fd*h]hmap_fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubh.}(hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjbubh)}(h>The *flags* argument may be specified as one of the following:h](hThe }(hjhhhNhNubj)}(h*flags*h]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh3 argument may be specified as one of the following:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjbubjI)}(hhh]jN)}(h**BPF_F_LOCK** Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock. h](jT)}(h**BPF_F_LOCK**h]j)}(hjh]h BPF_F_LOCK}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jShjahKhjubje)}(hhh]h)}(h}Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock.h]h}Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjahKhjubah}(h]h ]h"]h$]h&]uh1jHhjbubeh}(h]h ]h"]h$]h&]uh1jdhjOubeh}(h]h ]h"]h$]h&]uh1jMhjahKhjLubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jShjHhKhjubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hjhhhNhNubj)}(h*errno*h]herrno}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is set appropriately.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjHhKhjLubeh}(h]h ]h"]h$]h&]uh1jHhjIubah}(h]h ]h"]h$]h&]uh1jdhj6ubeh}(h]h ]h"]h$]h&]uh1jMhjHhKhjJubjN)}(hXBPF_MAP_UPDATE_ELEM Description Create or update an element (key/value pair) in a specified map. The *flags* argument should be specified as one of the following: **BPF_ANY** Create a new element or update an existing element. **BPF_NOEXIST** Create a new element only if it did not exist. **BPF_EXIST** Update an existing element. **BPF_F_LOCK** Update a spin_lock-ed map element. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. May set *errno* to **EINVAL**, **EPERM**, **ENOMEM**, **E2BIG**, **EEXIST**, or **ENOENT**. **E2BIG** The number of elements in the map reached the *max_entries* limit specified at map creation time. **EEXIST** If *flags* specifies **BPF_NOEXIST** and the element with *key* already exists in the map. **ENOENT** If *flags* specifies **BPF_EXIST** and the element with *key* does not exist in the map. h](jT)}(hBPF_MAP_UPDATE_ELEMh]hBPF_MAP_UPDATE_ELEM}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhj[ubje)}(hhh]jI)}(hhh](jN)}(hXDescription Create or update an element (key/value pair) in a specified map. The *flags* argument should be specified as one of the following: **BPF_ANY** Create a new element or update an existing element. **BPF_NOEXIST** Create a new element only if it did not exist. **BPF_EXIST** Update an existing element. **BPF_F_LOCK** Update a spin_lock-ed map element. h](jT)}(h Descriptionh]h Description}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjtubje)}(hhh](h)}(h@Create or update an element (key/value pair) in a specified map.h]h@Create or update an element (key/value pair) in a specified map.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubh)}(hAThe *flags* argument should be specified as one of the following:h](hThe }(hjhhhNhNubj)}(h*flags*h]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh6 argument should be specified as one of the following:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubjI)}(hhh](jN)}(h?**BPF_ANY** Create a new element or update an existing element.h](jT)}(h **BPF_ANY**h]j)}(hjh]hBPF_ANY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubje)}(hhh]h)}(h3Create a new element or update an existing element.h]h3Create a new element or update an existing element.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhKhjubjN)}(h>**BPF_NOEXIST** Create a new element only if it did not exist.h](jT)}(h**BPF_NOEXIST**h]j)}(hjh]h BPF_NOEXIST}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubje)}(hhh]h)}(h.Create a new element only if it did not exist.h]h.Create a new element only if it did not exist.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhKhjubjN)}(h)**BPF_EXIST** Update an existing element.h](jT)}(h **BPF_EXIST**h]j)}(hj7h]h BPF_EXIST}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhj1ubje)}(hhh]h)}(hUpdate an existing element.h]hUpdate an existing element.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjMubah}(h]h ]h"]h$]h&]uh1jdhj1ubeh}(h]h ]h"]h$]h&]uh1jMhjLhKhjubjN)}(h2**BPF_F_LOCK** Update a spin_lock-ed map element. h](jT)}(h**BPF_F_LOCK**h]j)}(hjqh]h BPF_F_LOCK}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&]uh1jShjhKhjkubje)}(hhh]h)}(h"Update a spin_lock-ed map element.h]h"Update a spin_lock-ed map element.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jdhjkubeh}(h]h ]h"]h$]h&]uh1jMhjhKhjubeh}(h]h ]h"]h$]h&]uh1jHhjubeh}(h]h ]h"]h$]h&]uh1jdhjtubeh}(h]h ]h"]h$]h&]uh1jMhjhKhjqubjN)}(hXReturn Returns zero on success. On error, -1 is returned and *errno* is set appropriately. May set *errno* to **EINVAL**, **EPERM**, **ENOMEM**, **E2BIG**, **EEXIST**, or **ENOENT**. **E2BIG** The number of elements in the map reached the *max_entries* limit specified at map creation time. **EEXIST** If *flags* specifies **BPF_NOEXIST** and the element with *key* already exists in the map. **ENOENT** If *flags* specifies **BPF_EXIST** and the element with *key* does not exist in the map. h](jT)}(hReturnh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShjmhKhjubje)}(hhh](h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hjhhhNhNubj)}(h*errno*h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is set appropriately.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubh)}(h[May set *errno* to **EINVAL**, **EPERM**, **ENOMEM**, **E2BIG**, **EEXIST**, or **ENOENT**.h](hMay set }(hjhhhNhNubj)}(h*errno*h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h **EINVAL**h]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h **EPERM**h]hEPERM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h **ENOMEM**h]hENOMEM}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h **E2BIG**h]hE2BIG}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h **EEXIST**h]hEEXIST}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, or }(hjhhhNhNubj)}(h **ENOENT**h]hENOENT}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubjI)}(hhh](jN)}(hk**E2BIG** The number of elements in the map reached the *max_entries* limit specified at map creation time.h](jT)}(h **E2BIG**h]j)}(hjh]hE2BIG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhj{ubje)}(hhh]h)}(haThe number of elements in the map reached the *max_entries* limit specified at map creation time.h](h.The number of elements in the map reached the }(hjhhhNhNubj)}(h *max_entries*h]h max_entries}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh& limit specified at map creation time.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jdhj{ubeh}(h]h ]h"]h$]h&]uh1jMhjhKhjxubjN)}(he**EEXIST** If *flags* specifies **BPF_NOEXIST** and the element with *key* already exists in the map.h](jT)}(h **EEXIST**h]j)}(hjh]hEEXIST}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubje)}(hhh]h)}(hZIf *flags* specifies **BPF_NOEXIST** and the element with *key* already exists in the map.h](hIf }(hjhhhNhNubj)}(h*flags*h]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh specifies }(hjhhhNhNubj)}(h**BPF_NOEXIST**h]h BPF_NOEXIST}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and the element with }(hjhhhNhNubj)}(h*key*h]hkey}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh already exists in the map.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhKhjxubjN)}(hd**ENOENT** If *flags* specifies **BPF_EXIST** and the element with *key* does not exist in the map. h](jT)}(h **ENOENT**h]j)}(hj;h]hENOENT}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1jShjmhKhj5ubje)}(hhh]h)}(hXIf *flags* specifies **BPF_EXIST** and the element with *key* does not exist in the map.h](hIf }(hjShhhNhNubj)}(h*flags*h]hflags}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubh specifies }(hjShhhNhNubj)}(h **BPF_EXIST**h]h BPF_EXIST}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubh and the element with }(hjShhhNhNubj)}(h*key*h]hkey}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubh does not exist in the map.}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjPubah}(h]h ]h"]h$]h&]uh1jdhj5ubeh}(h]h ]h"]h$]h&]uh1jMhjmhKhjxubeh}(h]h ]h"]h$]h&]uh1jHhjubeh}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjmhKhjqubeh}(h]h ]h"]h$]h&]uh1jHhjnubah}(h]h ]h"]h$]h&]uh1jdhj[ubeh}(h]h ]h"]h$]h&]uh1jMhjmhKhjJubjN)}(hBPF_MAP_DELETE_ELEM Description Look up and delete an element by key in a specified map. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_MAP_DELETE_ELEMh]hBPF_MAP_DELETE_ELEM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubje)}(hhh]jI)}(hhh](jN)}(hEDescription Look up and delete an element by key in a specified map. h](jT)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubje)}(hhh]h)}(h8Look up and delete an element by key in a specified map.h]h8Look up and delete an element by key in a specified map.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhKhjubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShjhKhjubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hj&hhhNhNubj)}(h*errno*h]herrno}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh is set appropriately.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhj#ubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhKhjubeh}(h]h ]h"]h$]h&]uh1jHhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhKhjJubjN)}(hXQBPF_MAP_GET_NEXT_KEY Description Look up an element by key in a specified map and return the key of the next element. Can be used to iterate over all elements in the map. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. The following cases can be used to iterate over all elements of the map: * If *key* is not found, the operation returns zero and sets the *next_key* pointer to the key of the first element. * If *key* is found, the operation returns zero and sets the *next_key* pointer to the key of the next element. * If *key* is the last element, returns -1 and *errno* is set to **ENOENT**. May set *errno* to **ENOMEM**, **EFAULT**, **EPERM**, or **EINVAL** on error. h](jT)}(hBPF_MAP_GET_NEXT_KEYh]hBPF_MAP_GET_NEXT_KEY}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjeubje)}(hhh]jI)}(hhh](jN)}(hDescription Look up an element by key in a specified map and return the key of the next element. Can be used to iterate over all elements in the map. h](jT)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhj~ubje)}(hhh]h)}(hLook up an element by key in a specified map and return the key of the next element. Can be used to iterate over all elements in the map.h]hLook up an element by key in a specified map and return the key of the next element. Can be used to iterate over all elements in the map.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubah}(h]h ]h"]h$]h&]uh1jdhj~ubeh}(h]h ]h"]h$]h&]uh1jMhjhKhj{ubjN)}(hX-Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. The following cases can be used to iterate over all elements of the map: * If *key* is not found, the operation returns zero and sets the *next_key* pointer to the key of the first element. * If *key* is found, the operation returns zero and sets the *next_key* pointer to the key of the next element. * If *key* is the last element, returns -1 and *errno* is set to **ENOENT**. May set *errno* to **ENOMEM**, **EFAULT**, **EPERM**, or **EINVAL** on error. h](jT)}(hReturnh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShjwhKhjubje)}(hhh](h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hjhhhNhNubj)}(h*errno*h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is set appropriately.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubh)}(hHThe following cases can be used to iterate over all elements of the map:h]hHThe following cases can be used to iterate over all elements of the map:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubh)}(hhh](h)}(hrIf *key* is not found, the operation returns zero and sets the *next_key* pointer to the key of the first element.h]h)}(hrIf *key* is not found, the operation returns zero and sets the *next_key* pointer to the key of the first element.h](hIf }(hjhhhNhNubj)}(h*key*h]hkey}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh7 is not found, the operation returns zero and sets the }(hjhhhNhNubj)}(h *next_key*h]hnext_key}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) pointer to the key of the first element.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hmIf *key* is found, the operation returns zero and sets the *next_key* pointer to the key of the next element.h]h)}(hmIf *key* is found, the operation returns zero and sets the *next_key* pointer to the key of the next element.h](hIf }(hj8 hhhNhNubj)}(h*key*h]hkey}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8 ubh3 is found, the operation returns zero and sets the }(hj8 hhhNhNubj)}(h *next_key*h]hnext_key}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8 ubh( pointer to the key of the next element.}(hj8 hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhj4 ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hKIf *key* is the last element, returns -1 and *errno* is set to **ENOENT**. h]h)}(hJIf *key* is the last element, returns -1 and *errno* is set to **ENOENT**.h](hIf }(hju hhhNhNubj)}(h*key*h]hkey}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1jhju ubh% is the last element, returns -1 and }(hju hhhNhNubj)}(h*errno*h]herrno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhju ubh is set to }(hju hhhNhNubj)}(h **ENOENT**h]hENOENT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhju ubh.}(hju hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjq ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j|*uh1hhj- hKhjubh)}(hMMay set *errno* to **ENOMEM**, **EFAULT**, **EPERM**, or **EINVAL** on error.h](hMay set }(hj hhhNhNubj)}(h*errno*h]herrno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh to }(hj hhhNhNubj)}(h **ENOMEM**h]hENOMEM}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, }(hj hhhNhNubj)}(h **EFAULT**h]hEFAULT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, }hj sbj)}(h **EPERM**h]hEPERM}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, or }(hj hhhNhNubj)}(h **EINVAL**h]hEINVAL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh on error.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjubeh}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjwhKhj{ubeh}(h]h ]h"]h$]h&]uh1jHhjxubah}(h]h ]h"]h$]h&]uh1jdhjeubeh}(h]h ]h"]h$]h&]uh1jMhjwhKhjJubjN)}(hX(BPF_PROG_LOAD Description Verify and load an eBPF program, returning a new file descriptor associated with the program. Applying **close**\ (2) to the file descriptor returned by **BPF_PROG_LOAD** will unload the eBPF program (but see NOTES). The close-on-exec file descriptor flag (see **fcntl**\ (2)) is automatically enabled for the new file descriptor. Return A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(h BPF_PROG_LOADh]h BPF_PROG_LOAD}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjN ubje)}(hhh]jI)}(hhh](jN)}(hXYDescription Verify and load an eBPF program, returning a new file descriptor associated with the program. Applying **close**\ (2) to the file descriptor returned by **BPF_PROG_LOAD** will unload the eBPF program (but see NOTES). The close-on-exec file descriptor flag (see **fcntl**\ (2)) is automatically enabled for the new file descriptor. h](jT)}(h Descriptionh]h Description}(hjk hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjg ubje)}(hhh](h)}(h]Verify and load an eBPF program, returning a new file descriptor associated with the program.h]h]Verify and load an eBPF program, returning a new file descriptor associated with the program.}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhKhjz ubh)}(hzApplying **close**\ (2) to the file descriptor returned by **BPF_PROG_LOAD** will unload the eBPF program (but see NOTES).h](h Applying }(hj hhhNhNubj)}(h **close**h]hclose}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh) (2) to the file descriptor returned by }(hj hhhNhNubj)}(h**BPF_PROG_LOAD**h]h BPF_PROG_LOAD}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh. will unload the eBPF program (but see NOTES).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjz ubh)}(hqThe close-on-exec file descriptor flag (see **fcntl**\ (2)) is automatically enabled for the new file descriptor.h](h,The close-on-exec file descriptor flag (see }(hj hhhNhNubj)}(h **fcntl**h]hfcntl}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh< (2)) is automatically enabled for the new file descriptor.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjz ubeh}(h]h ]h"]h$]h&]uh1jdhjg ubeh}(h]h ]h"]h$]h&]uh1jMhjy hMhjd ubjN)}(hReturn A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hReturnh]hReturn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj` hMhj ubje)}(hhh]h)}(hxA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately).h](hZA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, }(hj hhhNhNubj)}(h*errno*h]herrno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh is set appropriately).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj ubah}(h]h ]h"]h$]h&]uh1jdhj ubeh}(h]h ]h"]h$]h&]uh1jMhj` hMhjd ubeh}(h]h ]h"]h$]h&]uh1jHhja ubah}(h]h ]h"]h$]h&]uh1jdhjN ubeh}(h]h ]h"]h$]h&]uh1jMhj` hMhjJubjN)}(hXBPF_OBJ_PIN Description Pin an eBPF program or map referred by the specified *bpf_fd* to the provided *pathname* on the filesystem. The *pathname* argument must not contain a dot ("."). On success, *pathname* retains a reference to the eBPF object, preventing deallocation of the object when the original *bpf_fd* is closed. This allow the eBPF object to live beyond **close**\ (\ *bpf_fd*\ ), and hence the lifetime of the parent process. Applying **unlink**\ (2) or similar calls to the *pathname* unpins the object from the filesystem, removing the reference. If no other file descriptors or filesystem nodes refer to the same object, it will be deallocated (see NOTES). The filesystem type for the parent directory of *pathname* must be **BPF_FS_MAGIC**. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(h BPF_OBJ_PINh]h BPF_OBJ_PIN}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM!hj@ ubje)}(hhh]jI)}(hhh](jN)}(hXDescription Pin an eBPF program or map referred by the specified *bpf_fd* to the provided *pathname* on the filesystem. The *pathname* argument must not contain a dot ("."). On success, *pathname* retains a reference to the eBPF object, preventing deallocation of the object when the original *bpf_fd* is closed. This allow the eBPF object to live beyond **close**\ (\ *bpf_fd*\ ), and hence the lifetime of the parent process. Applying **unlink**\ (2) or similar calls to the *pathname* unpins the object from the filesystem, removing the reference. If no other file descriptors or filesystem nodes refer to the same object, it will be deallocated (see NOTES). The filesystem type for the parent directory of *pathname* must be **BPF_FS_MAGIC**. h](jT)}(h Descriptionh]h Description}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjY ubje)}(hhh](h)}(hkPin an eBPF program or map referred by the specified *bpf_fd* to the provided *pathname* on the filesystem.h](h5Pin an eBPF program or map referred by the specified }(hjo hhhNhNubj)}(h*bpf_fd*h]hbpf_fd}(hjw hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjo ubh to the provided }(hjo hhhNhNubj)}(h *pathname*h]hpathname}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjo ubh on the filesystem.}(hjo hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM hjl ubh)}(h5The *pathname* argument must not contain a dot (".").h](hThe }(hj hhhNhNubj)}(h *pathname*h]hpathname}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh+ argument must not contain a dot (“.”).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjl ubh)}(hOn success, *pathname* retains a reference to the eBPF object, preventing deallocation of the object when the original *bpf_fd* is closed. This allow the eBPF object to live beyond **close**\ (\ *bpf_fd*\ ), and hence the lifetime of the parent process.h](h On success, }(hj hhhNhNubj)}(h *pathname*h]hpathname}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubha retains a reference to the eBPF object, preventing deallocation of the object when the original }(hj hhhNhNubj)}(h*bpf_fd*h]hbpf_fd}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh6 is closed. This allow the eBPF object to live beyond }(hj hhhNhNubj)}(h **close**h]hclose}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh ( }(hj hhhNhNubj)}(h*bpf_fd*h]hbpf_fd}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh2 ), and hence the lifetime of the parent process.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjl ubh)}(hApplying **unlink**\ (2) or similar calls to the *pathname* unpins the object from the filesystem, removing the reference. If no other file descriptors or filesystem nodes refer to the same object, it will be deallocated (see NOTES).h](h Applying }(hj hhhNhNubj)}(h **unlink**h]hunlink}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh (2) or similar calls to the }(hj hhhNhNubj)}(h *pathname*h]hpathname}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh unpins the object from the filesystem, removing the reference. If no other file descriptors or filesystem nodes refer to the same object, it will be deallocated (see NOTES).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjl ubh)}(hTThe filesystem type for the parent directory of *pathname* must be **BPF_FS_MAGIC**.h](h0The filesystem type for the parent directory of }(hjM hhhNhNubj)}(h *pathname*h]hpathname}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjM ubh must be }(hjM hhhNhNubj)}(h**BPF_FS_MAGIC**h]h BPF_FS_MAGIC}(hjg hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjM ubh.}(hjM hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjl ubeh}(h]h ]h"]h$]h&]uh1jdhjY ubeh}(h]h ]h"]h$]h&]uh1jMhjk hMhjV ubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jShjR hM!hj ubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hj hhhNhNubj)}(h*errno*h]herrno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh is set appropriately.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM hj ubah}(h]h ]h"]h$]h&]uh1jdhj ubeh}(h]h ]h"]h$]h&]uh1jMhjR hM!hjV ubeh}(h]h ]h"]h$]h&]uh1jHhjS ubah}(h]h ]h"]h$]h&]uh1jdhj@ ubeh}(h]h ]h"]h$]h&]uh1jMhjR hM!hjJubjN)}(hXBPF_OBJ_GET Description Open a file descriptor for the eBPF object pinned to the specified *pathname*. Return A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(h BPF_OBJ_GETh]h BPF_OBJ_GET}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM*hj ubje)}(hhh]jI)}(hhh](jN)}(h[Description Open a file descriptor for the eBPF object pinned to the specified *pathname*. h](jT)}(h Descriptionh]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM&hj ubje)}(hhh]h)}(hNOpen a file descriptor for the eBPF object pinned to the specified *pathname*.h](hCOpen a file descriptor for the eBPF object pinned to the specified }(hj hhhNhNubj)}(h *pathname*h]hpathname}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM%hj ubah}(h]h ]h"]h$]h&]uh1jdhj ubeh}(h]h ]h"]h$]h&]uh1jMhj hM&hj ubjN)}(hReturn A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hReturnh]hReturn}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj hM*hj< ubje)}(hhh]h)}(hxA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately).h](hZA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, }(hjQ hhhNhNubj)}(h*errno*h]herrno}(hjY hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQ ubh is set appropriately).}(hjQ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM)hjN ubah}(h]h ]h"]h$]h&]uh1jdhj< ubeh}(h]h ]h"]h$]h&]uh1jMhj hM*hj ubeh}(h]h ]h"]h$]h&]uh1jHhj ubah}(h]h ]h"]h$]h&]uh1jdhj ubeh}(h]h ]h"]h$]h&]uh1jMhj hM*hjJubjN)}(hX?BPF_PROG_ATTACH Description Attach an eBPF program to a *target_fd* at the specified *attach_type* hook. The *attach_type* specifies the eBPF attachment point to attach the program to, and must be one of *bpf_attach_type* (see below). The *attach_bpf_fd* must be a valid file descriptor for a loaded eBPF program of a cgroup, flow dissector, LIRC, sockmap or sock_ops type corresponding to the specified *attach_type*. The *target_fd* must be a valid file descriptor for a kernel object which depends on the attach type of *attach_bpf_fd*: **BPF_PROG_TYPE_CGROUP_DEVICE**, **BPF_PROG_TYPE_CGROUP_SKB**, **BPF_PROG_TYPE_CGROUP_SOCK**, **BPF_PROG_TYPE_CGROUP_SOCK_ADDR**, **BPF_PROG_TYPE_CGROUP_SOCKOPT**, **BPF_PROG_TYPE_CGROUP_SYSCTL**, **BPF_PROG_TYPE_SOCK_OPS** Control Group v2 hierarchy with the eBPF controller enabled. Requires the kernel to be compiled with **CONFIG_CGROUP_BPF**. **BPF_PROG_TYPE_FLOW_DISSECTOR** Network namespace (eg /proc/self/ns/net). **BPF_PROG_TYPE_LIRC_MODE2** LIRC device path (eg /dev/lircN). Requires the kernel to be compiled with **CONFIG_BPF_LIRC_MODE2**. **BPF_PROG_TYPE_SK_SKB**, **BPF_PROG_TYPE_SK_MSG** eBPF map of socket type (eg **BPF_MAP_TYPE_SOCKHASH**). Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_PROG_ATTACHh]hBPF_PROG_ATTACH}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMXhj ubje)}(hhh]jI)}(hhh](jN)}(hXDescription Attach an eBPF program to a *target_fd* at the specified *attach_type* hook. The *attach_type* specifies the eBPF attachment point to attach the program to, and must be one of *bpf_attach_type* (see below). The *attach_bpf_fd* must be a valid file descriptor for a loaded eBPF program of a cgroup, flow dissector, LIRC, sockmap or sock_ops type corresponding to the specified *attach_type*. The *target_fd* must be a valid file descriptor for a kernel object which depends on the attach type of *attach_bpf_fd*: **BPF_PROG_TYPE_CGROUP_DEVICE**, **BPF_PROG_TYPE_CGROUP_SKB**, **BPF_PROG_TYPE_CGROUP_SOCK**, **BPF_PROG_TYPE_CGROUP_SOCK_ADDR**, **BPF_PROG_TYPE_CGROUP_SOCKOPT**, **BPF_PROG_TYPE_CGROUP_SYSCTL**, **BPF_PROG_TYPE_SOCK_OPS** Control Group v2 hierarchy with the eBPF controller enabled. Requires the kernel to be compiled with **CONFIG_CGROUP_BPF**. **BPF_PROG_TYPE_FLOW_DISSECTOR** Network namespace (eg /proc/self/ns/net). **BPF_PROG_TYPE_LIRC_MODE2** LIRC device path (eg /dev/lircN). Requires the kernel to be compiled with **CONFIG_BPF_LIRC_MODE2**. **BPF_PROG_TYPE_SK_SKB**, **BPF_PROG_TYPE_SK_MSG** eBPF map of socket type (eg **BPF_MAP_TYPE_SOCKHASH**). h](jT)}(h Descriptionh]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMThj ubje)}(hhh](h)}(hLAttach an eBPF program to a *target_fd* at the specified *attach_type* hook.h](hAttach an eBPF program to a }(hj hhhNhNubj)}(h *target_fd*h]h target_fd}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh at the specified }(hj hhhNhNubj)}(h *attach_type*h]h attach_type}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh hook.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM.hj ubh)}(hThe *attach_type* specifies the eBPF attachment point to attach the program to, and must be one of *bpf_attach_type* (see below).h](hThe }(hj hhhNhNubj)}(h *attach_type*h]h attach_type}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhR specifies the eBPF attachment point to attach the program to, and must be one of }(hj hhhNhNubj)}(h*bpf_attach_type*h]hbpf_attach_type}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh (see below).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM1hj ubh)}(hThe *attach_bpf_fd* must be a valid file descriptor for a loaded eBPF program of a cgroup, flow dissector, LIRC, sockmap or sock_ops type corresponding to the specified *attach_type*.h](hThe }(hj%hhhNhNubj)}(h*attach_bpf_fd*h]h attach_bpf_fd}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh must be a valid file descriptor for a loaded eBPF program of a cgroup, flow dissector, LIRC, sockmap or sock_ops type corresponding to the specified }(hj%hhhNhNubj)}(h *attach_type*h]h attach_type}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM5hj ubh)}(hxThe *target_fd* must be a valid file descriptor for a kernel object which depends on the attach type of *attach_bpf_fd*:h](hThe }(hjXhhhNhNubj)}(h *target_fd*h]h target_fd}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubhY must be a valid file descriptor for a kernel object which depends on the attach type of }(hjXhhhNhNubj)}(h*attach_bpf_fd*h]h attach_bpf_fd}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubh:}(hjXhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM9hj ubh)}(h**BPF_PROG_TYPE_CGROUP_DEVICE**, **BPF_PROG_TYPE_CGROUP_SKB**, **BPF_PROG_TYPE_CGROUP_SOCK**, **BPF_PROG_TYPE_CGROUP_SOCK_ADDR**, **BPF_PROG_TYPE_CGROUP_SOCKOPT**, **BPF_PROG_TYPE_CGROUP_SYSCTL**, **BPF_PROG_TYPE_SOCK_OPS**h](j)}(h**BPF_PROG_TYPE_CGROUP_DEVICE**h]hBPF_PROG_TYPE_CGROUP_DEVICE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h**BPF_PROG_TYPE_CGROUP_SKB**h]hBPF_PROG_TYPE_CGROUP_SKB}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h**BPF_PROG_TYPE_CGROUP_SOCK**h]hBPF_PROG_TYPE_CGROUP_SOCK}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h"**BPF_PROG_TYPE_CGROUP_SOCK_ADDR**h]hBPF_PROG_TYPE_CGROUP_SOCK_ADDR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h **BPF_PROG_TYPE_CGROUP_SOCKOPT**h]hBPF_PROG_TYPE_CGROUP_SOCKOPT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h**BPF_PROG_TYPE_CGROUP_SYSCTL**h]hBPF_PROG_TYPE_CGROUP_SYSCTL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h**BPF_PROG_TYPE_SOCK_OPS**h]hBPF_PROG_TYPE_SOCK_OPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM<hj ubh block_quote)}(h|Control Group v2 hierarchy with the eBPF controller enabled. Requires the kernel to be compiled with **CONFIG_CGROUP_BPF**. h]h)}(h{Control Group v2 hierarchy with the eBPF controller enabled. Requires the kernel to be compiled with **CONFIG_CGROUP_BPF**.h](heControl Group v2 hierarchy with the eBPF controller enabled. Requires the kernel to be compiled with }(hjhhhNhNubj)}(h**CONFIG_CGROUP_BPF**h]hCONFIG_CGROUP_BPF}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMDhjubah}(h]h ]h"]h$]h&]uh1jhj6hMDhj ubh)}(h **BPF_PROG_TYPE_FLOW_DISSECTOR**h]j)}(hj?h]hBPF_PROG_TYPE_FLOW_DISSECTOR}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMHhj ubj)}(h*Network namespace (eg /proc/self/ns/net). h]h)}(h)Network namespace (eg /proc/self/ns/net).h]h)Network namespace (eg /proc/self/ns/net).}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMJhjUubah}(h]h ]h"]h$]h&]uh1jhjghMJhj ubh)}(h**BPF_PROG_TYPE_LIRC_MODE2**h]j)}(hjph]hBPF_PROG_TYPE_LIRC_MODE2}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMLhj ubj)}(heLIRC device path (eg /dev/lircN). Requires the kernel to be compiled with **CONFIG_BPF_LIRC_MODE2**. h]h)}(hdLIRC device path (eg /dev/lircN). Requires the kernel to be compiled with **CONFIG_BPF_LIRC_MODE2**.h](hJLIRC device path (eg /dev/lircN). Requires the kernel to be compiled with }(hjhhhNhNubj)}(h**CONFIG_BPF_LIRC_MODE2**h]hCONFIG_BPF_LIRC_MODE2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMNhjubah}(h]h ]h"]h$]h&]uh1jhjhMNhj ubh)}(h2**BPF_PROG_TYPE_SK_SKB**, **BPF_PROG_TYPE_SK_MSG**h](j)}(h**BPF_PROG_TYPE_SK_SKB**h]hBPF_PROG_TYPE_SK_SKB}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h**BPF_PROG_TYPE_SK_MSG**h]hBPF_PROG_TYPE_SK_MSG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMQhj ubj)}(h8eBPF map of socket type (eg **BPF_MAP_TYPE_SOCKHASH**). h]h)}(h7eBPF map of socket type (eg **BPF_MAP_TYPE_SOCKHASH**).h](heBPF map of socket type (eg }(hjhhhNhNubj)}(h**BPF_MAP_TYPE_SOCKHASH**h]hBPF_MAP_TYPE_SOCKHASH}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hMThjubah}(h]h ]h"]h$]h&]uh1jhj hMThj ubeh}(h]h ]h"]h$]h&]uh1jdhj ubeh}(h]h ]h"]h$]h&]uh1jMhj hMThj ubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShj hMXhjubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hj'hhhNhNubj)}(h*errno*h]herrno}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh is set appropriately.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMWhj$ubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhj hMXhj ubeh}(h]h ]h"]h$]h&]uh1jHhj ubah}(h]h ]h"]h$]h&]uh1jdhj ubeh}(h]h ]h"]h$]h&]uh1jMhj hMXhjJubjN)}(hXJBPF_PROG_DETACH Description Detach the eBPF program associated with the *target_fd* at the hook specified by *attach_type*. The program must have been previously attached using **BPF_PROG_ATTACH**. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_PROG_DETACHh]hBPF_PROG_DETACH}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMbhjfubje)}(hhh]jI)}(hhh](jN)}(hDescription Detach the eBPF program associated with the *target_fd* at the hook specified by *attach_type*. The program must have been previously attached using **BPF_PROG_ATTACH**. h](jT)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM^hjubje)}(hhh]h)}(hDetach the eBPF program associated with the *target_fd* at the hook specified by *attach_type*. The program must have been previously attached using **BPF_PROG_ATTACH**.h](h,Detach the eBPF program associated with the }(hjhhhNhNubj)}(h *target_fd*h]h target_fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh at the hook specified by }(hjhhhNhNubj)}(h *attach_type*h]h attach_type}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh7. The program must have been previously attached using }(hjhhhNhNubj)}(h**BPF_PROG_ATTACH**h]hBPF_PROG_ATTACH}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM\hjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhM^hj|ubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShjxhMbhjubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hjhhhNhNubj)}(h*errno*h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is set appropriately.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMahjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjxhMbhj|ubeh}(h]h ]h"]h$]h&]uh1jHhjyubah}(h]h ]h"]h$]h&]uh1jdhjfubeh}(h]h ]h"]h$]h&]uh1jMhjxhMbhjJubjN)}(hXBPF_PROG_TEST_RUN Description Run the eBPF program associated with the *prog_fd* a *repeat* number of times against a provided program context *ctx_in* and data *data_in*, and return the modified program context *ctx_out*, *data_out* (for example, packet data), result of the execution *retval*, and *duration* of the test run. The sizes of the buffers provided as input and output parameters *ctx_in*, *ctx_out*, *data_in*, and *data_out* must be provided in the corresponding variables *ctx_size_in*, *ctx_size_out*, *data_size_in*, and/or *data_size_out*. If any of these parameters are not provided (ie set to NULL), the corresponding size field must be zero. Some program types have particular requirements: **BPF_PROG_TYPE_SK_LOOKUP** *data_in* and *data_out* must be NULL. **BPF_PROG_TYPE_RAW_TRACEPOINT**, **BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE** *ctx_out*, *data_in* and *data_out* must be NULL. *repeat* must be zero. BPF_PROG_RUN is an alias for BPF_PROG_TEST_RUN. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. **ENOSPC** Either *data_size_out* or *ctx_size_out* is too small. **ENOTSUPP** This command is not supported by the program type of the program referred to by *prog_fd*. h](jT)}(hBPF_PROG_TEST_RUNh]hBPF_PROG_TEST_RUN}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj:ubje)}(hhh]jI)}(hhh](jN)}(hXDescription Run the eBPF program associated with the *prog_fd* a *repeat* number of times against a provided program context *ctx_in* and data *data_in*, and return the modified program context *ctx_out*, *data_out* (for example, packet data), result of the execution *retval*, and *duration* of the test run. The sizes of the buffers provided as input and output parameters *ctx_in*, *ctx_out*, *data_in*, and *data_out* must be provided in the corresponding variables *ctx_size_in*, *ctx_size_out*, *data_size_in*, and/or *data_size_out*. If any of these parameters are not provided (ie set to NULL), the corresponding size field must be zero. Some program types have particular requirements: **BPF_PROG_TYPE_SK_LOOKUP** *data_in* and *data_out* must be NULL. **BPF_PROG_TYPE_RAW_TRACEPOINT**, **BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE** *ctx_out*, *data_in* and *data_out* must be NULL. *repeat* must be zero. BPF_PROG_RUN is an alias for BPF_PROG_TEST_RUN. h](jT)}(h Descriptionh]h Description}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM~hjSubje)}(hhh](h)}(hX)Run the eBPF program associated with the *prog_fd* a *repeat* number of times against a provided program context *ctx_in* and data *data_in*, and return the modified program context *ctx_out*, *data_out* (for example, packet data), result of the execution *retval*, and *duration* of the test run.h](h)Run the eBPF program associated with the }(hjihhhNhNubj)}(h *prog_fd*h]hprog_fd}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh a }(hjihhhNhNubj)}(h*repeat*h]hrepeat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh4 number of times against a provided program context }(hjihhhNhNubj)}(h*ctx_in*h]hctx_in}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh and data }(hjihhhNhNubj)}(h *data_in*h]hdata_in}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh*, and return the modified program context }(hjihhhNhNubj)}(h *ctx_out*h]hctx_out}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh, }(hjihhhNhNubj)}(h *data_out*h]hdata_out}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh5 (for example, packet data), result of the execution }(hjihhhNhNubj)}(h*retval*h]hretval}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh, and }(hjihhhNhNubj)}(h *duration*h]hduration}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh of the test run.}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMfhjfubh)}(hXOThe sizes of the buffers provided as input and output parameters *ctx_in*, *ctx_out*, *data_in*, and *data_out* must be provided in the corresponding variables *ctx_size_in*, *ctx_size_out*, *data_size_in*, and/or *data_size_out*. If any of these parameters are not provided (ie set to NULL), the corresponding size field must be zero.h](hAThe sizes of the buffers provided as input and output parameters }(hjhhhNhNubj)}(h*ctx_in*h]hctx_in}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h *ctx_out*h]hctx_out}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h *data_in*h]hdata_in}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, and }(hjhhhNhNubj)}(h *data_out*h]hdata_out}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh1 must be provided in the corresponding variables }(hjhhhNhNubj)}(h *ctx_size_in*h]h ctx_size_in}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h*ctx_size_out*h]h ctx_size_out}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h*data_size_in*h]h data_size_in}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh , and/or }(hjhhhNhNubj)}(h*data_size_out*h]h data_size_out}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhj. If any of these parameters are not provided (ie set to NULL), the corresponding size field must be zero.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMlhjfubh)}(h0Some program types have particular requirements:h]h0Some program types have particular requirements:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMshjfubjI)}(hhh]jN)}(hC**BPF_PROG_TYPE_SK_LOOKUP** *data_in* and *data_out* must be NULL. h](jT)}(h**BPF_PROG_TYPE_SK_LOOKUP**h]j)}(hjh]hBPF_PROG_TYPE_SK_LOOKUP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMvhjubje)}(hhh]h)}(h&*data_in* and *data_out* must be NULL.h](j)}(h *data_in*h]hdata_in}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h *data_out*h]hdata_out}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh must be NULL.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMvhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMvhjubah}(h]h ]h"]h$]h&]uh1jHhjfubh)}(hK**BPF_PROG_TYPE_RAW_TRACEPOINT**, **BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE**h](j)}(h **BPF_PROG_TYPE_RAW_TRACEPOINT**h]hBPF_PROG_TYPE_RAW_TRACEPOINT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h)**BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE**h]h%BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMxhjfubj)}(hI*ctx_out*, *data_in* and *data_out* must be NULL. *repeat* must be zero. h]h)}(hH*ctx_out*, *data_in* and *data_out* must be NULL. *repeat* must be zero.h](j)}(h *ctx_out*h]hctx_out}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh, }(hjGhhhNhNubj)}(h *data_in*h]hdata_in}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh and }(hjGhhhNhNubj)}(h *data_out*h]hdata_out}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh must be NULL. }(hjGhhhNhNubj)}(h*repeat*h]hrepeat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh must be zero.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM{hjCubah}(h]h ]h"]h$]h&]uh1jhjhM{hjfubh)}(h/BPF_PROG_RUN is an alias for BPF_PROG_TEST_RUN.h]h/BPF_PROG_RUN is an alias for BPF_PROG_TEST_RUN.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehM~hjfubeh}(h]h ]h"]h$]h&]uh1jdhjSubeh}(h]h ]h"]h$]h&]uh1jMhjehM~hjPubjN)}(hXReturn Returns zero on success. On error, -1 is returned and *errno* is set appropriately. **ENOSPC** Either *data_size_out* or *ctx_size_out* is too small. **ENOTSUPP** This command is not supported by the program type of the program referred to by *prog_fd*. h](jT)}(hReturnh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShjLhMhjubje)}(hhh](h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hjhhhNhNubj)}(h*errno*h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is set appropriately.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubjI)}(hhh](jN)}(hA**ENOSPC** Either *data_size_out* or *ctx_size_out* is too small.h](jT)}(h **ENOSPC**h]j)}(hjh]hENOSPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh]h)}(h6Either *data_size_out* or *ctx_size_out* is too small.h](hEither }(hjhhhNhNubj)}(h*data_size_out*h]h data_size_out}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh or }(hjhhhNhNubj)}(h*ctx_size_out*h]h ctx_size_out}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is too small.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubjN)}(hh**ENOTSUPP** This command is not supported by the program type of the program referred to by *prog_fd*. h](jT)}(h **ENOTSUPP**h]j)}(hjWh]hENOTSUPP}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1jShjLhMhjQubje)}(hhh]h)}(hZThis command is not supported by the program type of the program referred to by *prog_fd*.h](hPThis command is not supported by the program type of the program referred to by }(hjohhhNhNubj)}(h *prog_fd*h]hprog_fd}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubh.}(hjohhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjlubah}(h]h ]h"]h$]h&]uh1jdhjQubeh}(h]h ]h"]h$]h&]uh1jMhjLhMhjubeh}(h]h ]h"]h$]h&]uh1jHhjubeh}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjLhMhjPubeh}(h]h ]h"]h$]h&]uh1jHhjMubah}(h]h ]h"]h$]h&]uh1jdhj:ubeh}(h]h ]h"]h$]h&]uh1jMhjLhMhjJubjN)}(hXBPF_PROG_GET_NEXT_ID Description Fetch the next eBPF program currently loaded into the kernel. Looks for the eBPF program with an id greater than *start_id* and updates *next_id* on success. If no other eBPF programs remain with ids higher than *start_id*, returns -1 and sets *errno* to **ENOENT**. Return Returns zero on success. On error, or when no id remains, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_PROG_GET_NEXT_IDh]hBPF_PROG_GET_NEXT_ID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh]jI)}(hhh](jN)}(hXDescription Fetch the next eBPF program currently loaded into the kernel. Looks for the eBPF program with an id greater than *start_id* and updates *next_id* on success. If no other eBPF programs remain with ids higher than *start_id*, returns -1 and sets *errno* to **ENOENT**. h](jT)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh](h)}(h=Fetch the next eBPF program currently loaded into the kernel.h]h=Fetch the next eBPF program currently loaded into the kernel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubh)}(hLooks for the eBPF program with an id greater than *start_id* and updates *next_id* on success. If no other eBPF programs remain with ids higher than *start_id*, returns -1 and sets *errno* to **ENOENT**.h](h3Looks for the eBPF program with an id greater than }(hjhhhNhNubj)}(h *start_id*h]hstart_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and updates }(hjhhhNhNubj)}(h *next_id*h]hnext_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhC on success. If no other eBPF programs remain with ids higher than }(hjhhhNhNubj)}(h *start_id*h]hstart_id}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, returns -1 and sets }(hjhhhNhNubj)}(h*errno*h]herrno}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h **ENOENT**h]hENOENT}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubeh}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubjN)}(hrReturn Returns zero on success. On error, or when no id remains, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jShjhMhjsubje)}(hhh]h)}(hjReturns zero on success. On error, or when no id remains, -1 is returned and *errno* is set appropriately.h](hMReturns zero on success. On error, or when no id remains, -1 is returned and }(hjhhhNhNubj)}(h*errno*h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is set appropriately.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubah}(h]h ]h"]h$]h&]uh1jdhjsubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubeh}(h]h ]h"]h$]h&]uh1jHhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjJubjN)}(hXBPF_MAP_GET_NEXT_ID Description Fetch the next eBPF map currently loaded into the kernel. Looks for the eBPF map with an id greater than *start_id* and updates *next_id* on success. If no other eBPF maps remain with ids higher than *start_id*, returns -1 and sets *errno* to **ENOENT**. Return Returns zero on success. On error, or when no id remains, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_MAP_GET_NEXT_IDh]hBPF_MAP_GET_NEXT_ID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh]jI)}(hhh](jN)}(hX Description Fetch the next eBPF map currently loaded into the kernel. Looks for the eBPF map with an id greater than *start_id* and updates *next_id* on success. If no other eBPF maps remain with ids higher than *start_id*, returns -1 and sets *errno* to **ENOENT**. h](jT)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh](h)}(h9Fetch the next eBPF map currently loaded into the kernel.h]h9Fetch the next eBPF map currently loaded into the kernel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubh)}(hLooks for the eBPF map with an id greater than *start_id* and updates *next_id* on success. If no other eBPF maps remain with ids higher than *start_id*, returns -1 and sets *errno* to **ENOENT**.h](h/Looks for the eBPF map with an id greater than }(hjhhhNhNubj)}(h *start_id*h]hstart_id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and updates }(hjhhhNhNubj)}(h *next_id*h]hnext_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh? on success. If no other eBPF maps remain with ids higher than }(hjhhhNhNubj)}(h *start_id*h]hstart_id}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, returns -1 and sets }(hjhhhNhNubj)}(h*errno*h]herrno}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h **ENOENT**h]hENOENT}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubeh}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubjN)}(hrReturn Returns zero on success. On error, or when no id remains, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jShjhMhjzubje)}(hhh]h)}(hjReturns zero on success. On error, or when no id remains, -1 is returned and *errno* is set appropriately.h](hMReturns zero on success. On error, or when no id remains, -1 is returned and }(hjhhhNhNubj)}(h*errno*h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is set appropriately.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubah}(h]h ]h"]h$]h&]uh1jdhjzubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubeh}(h]h ]h"]h$]h&]uh1jHhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjJubjN)}(hX BPF_PROG_GET_FD_BY_ID Description Open a file descriptor for the eBPF program corresponding to *prog_id*. Return A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hBPF_PROG_GET_FD_BY_IDh]hBPF_PROG_GET_FD_BY_ID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh]jI)}(hhh](jN)}(hTDescription Open a file descriptor for the eBPF program corresponding to *prog_id*. h](jT)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh]h)}(hGOpen a file descriptor for the eBPF program corresponding to *prog_id*.h](h=Open a file descriptor for the eBPF program corresponding to }(hjhhhNhNubj)}(h *prog_id*h]hprog_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubjN)}(hReturn A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hReturnh]hReturn}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jShjhMhj*ubje)}(hhh]h)}(hxA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately).h](hZA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, }(hj?hhhNhNubj)}(h*errno*h]herrno}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh is set appropriately).}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj<ubah}(h]h ]h"]h$]h&]uh1jdhj*ubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubeh}(h]h ]h"]h$]h&]uh1jHhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjJubjN)}(hXBPF_MAP_GET_FD_BY_ID Description Open a file descriptor for the eBPF map corresponding to *map_id*. Return A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hBPF_MAP_GET_FD_BY_IDh]hBPF_MAP_GET_FD_BY_ID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj~ubje)}(hhh]jI)}(hhh](jN)}(hODescription Open a file descriptor for the eBPF map corresponding to *map_id*. h](jT)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh]h)}(hBOpen a file descriptor for the eBPF map corresponding to *map_id*.h](h9Open a file descriptor for the eBPF map corresponding to }(hjhhhNhNubj)}(h*map_id*h]hmap_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubjN)}(hReturn A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hReturnh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShjhMhjubje)}(hhh]h)}(hxA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately).h](hZA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, }(hjhhhNhNubj)}(h*errno*h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is set appropriately).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubeh}(h]h ]h"]h$]h&]uh1jHhjubah}(h]h ]h"]h$]h&]uh1jdhj~ubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjJubjN)}(hXBPF_OBJ_GET_INFO_BY_FD Description Obtain information about the eBPF object corresponding to *bpf_fd*. Populates up to *info_len* bytes of *info*, which will be in one of the following formats depending on the eBPF object type of *bpf_fd*: * **struct bpf_prog_info** * **struct bpf_map_info** * **struct bpf_btf_info** * **struct bpf_link_info** Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_OBJ_GET_INFO_BY_FDh]hBPF_OBJ_GET_INFO_BY_FD}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj.ubje)}(hhh]jI)}(hhh](jN)}(hXEDescription Obtain information about the eBPF object corresponding to *bpf_fd*. Populates up to *info_len* bytes of *info*, which will be in one of the following formats depending on the eBPF object type of *bpf_fd*: * **struct bpf_prog_info** * **struct bpf_map_info** * **struct bpf_btf_info** * **struct bpf_link_info** h](jT)}(h Descriptionh]h Description}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjGubje)}(hhh](h)}(hCObtain information about the eBPF object corresponding to *bpf_fd*.h](h:Obtain information about the eBPF object corresponding to }(hj]hhhNhNubj)}(h*bpf_fd*h]hbpf_fd}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubh.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjZubh)}(hPopulates up to *info_len* bytes of *info*, which will be in one of the following formats depending on the eBPF object type of *bpf_fd*:h](hPopulates up to }(hj~hhhNhNubj)}(h *info_len*h]hinfo_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubh bytes of }(hj~hhhNhNubj)}(h*info*h]hinfo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubhU, which will be in one of the following formats depending on the eBPF object type of }(hj~hhhNhNubj)}(h*bpf_fd*h]hbpf_fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubh:}(hj~hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjZubh)}(hhh](h)}(h**struct bpf_prog_info**h]h)}(hjh]j)}(hjh]hstruct bpf_prog_info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h**struct bpf_map_info**h]h)}(hjh]j)}(hjh]hstruct bpf_map_info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h**struct bpf_btf_info**h]h)}(hj h]j)}(hj h]hstruct bpf_btf_info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h**struct bpf_link_info** h]h)}(h**struct bpf_link_info**h]j)}(hj/h]hstruct bpf_link_info}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1hhjYhMhj)ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j|j uh1hhjhMhjZubeh}(h]h ]h"]h$]h&]uh1jdhjGubeh}(h]h ]h"]h$]h&]uh1jMhjYhMhjDubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj@hMhj\ubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hjqhhhNhNubj)}(h*errno*h]herrno}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubh is set appropriately.}(hjqhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjnubah}(h]h ]h"]h$]h&]uh1jdhj\ubeh}(h]h ]h"]h$]h&]uh1jMhj@hMhjDubeh}(h]h ]h"]h$]h&]uh1jHhjAubah}(h]h ]h"]h$]h&]uh1jdhj.ubeh}(h]h ]h"]h$]h&]uh1jMhj@hMhjJubjN)}(hXBPF_PROG_QUERY Description Obtain information about eBPF programs associated with the specified *attach_type* hook. The *target_fd* must be a valid file descriptor for a kernel object which depends on the attach type of *attach_bpf_fd*: **BPF_PROG_TYPE_CGROUP_DEVICE**, **BPF_PROG_TYPE_CGROUP_SKB**, **BPF_PROG_TYPE_CGROUP_SOCK**, **BPF_PROG_TYPE_CGROUP_SOCK_ADDR**, **BPF_PROG_TYPE_CGROUP_SOCKOPT**, **BPF_PROG_TYPE_CGROUP_SYSCTL**, **BPF_PROG_TYPE_SOCK_OPS** Control Group v2 hierarchy with the eBPF controller enabled. Requires the kernel to be compiled with **CONFIG_CGROUP_BPF**. **BPF_PROG_TYPE_FLOW_DISSECTOR** Network namespace (eg /proc/self/ns/net). **BPF_PROG_TYPE_LIRC_MODE2** LIRC device path (eg /dev/lircN). Requires the kernel to be compiled with **CONFIG_BPF_LIRC_MODE2**. **BPF_PROG_QUERY** always fetches the number of programs attached and the *attach_flags* which were used to attach those programs. Additionally, if *prog_ids* is nonzero and the number of attached programs is less than *prog_cnt*, populates *prog_ids* with the eBPF program ids of the programs attached at *target_fd*. The following flags may alter the result: **BPF_F_QUERY_EFFECTIVE** Only return information regarding programs which are currently effective at the specified *target_fd*. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_PROG_QUERYh]hBPF_PROG_QUERY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh]jI)}(hhh](jN)}(hX;Description Obtain information about eBPF programs associated with the specified *attach_type* hook. The *target_fd* must be a valid file descriptor for a kernel object which depends on the attach type of *attach_bpf_fd*: **BPF_PROG_TYPE_CGROUP_DEVICE**, **BPF_PROG_TYPE_CGROUP_SKB**, **BPF_PROG_TYPE_CGROUP_SOCK**, **BPF_PROG_TYPE_CGROUP_SOCK_ADDR**, **BPF_PROG_TYPE_CGROUP_SOCKOPT**, **BPF_PROG_TYPE_CGROUP_SYSCTL**, **BPF_PROG_TYPE_SOCK_OPS** Control Group v2 hierarchy with the eBPF controller enabled. Requires the kernel to be compiled with **CONFIG_CGROUP_BPF**. **BPF_PROG_TYPE_FLOW_DISSECTOR** Network namespace (eg /proc/self/ns/net). **BPF_PROG_TYPE_LIRC_MODE2** LIRC device path (eg /dev/lircN). Requires the kernel to be compiled with **CONFIG_BPF_LIRC_MODE2**. **BPF_PROG_QUERY** always fetches the number of programs attached and the *attach_flags* which were used to attach those programs. Additionally, if *prog_ids* is nonzero and the number of attached programs is less than *prog_cnt*, populates *prog_ids* with the eBPF program ids of the programs attached at *target_fd*. The following flags may alter the result: **BPF_F_QUERY_EFFECTIVE** Only return information regarding programs which are currently effective at the specified *target_fd*. h](jT)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh](h)}(hXObtain information about eBPF programs associated with the specified *attach_type* hook.h](hEObtain information about eBPF programs associated with the specified }(hjhhhNhNubj)}(h *attach_type*h]h attach_type}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh hook.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubh)}(hxThe *target_fd* must be a valid file descriptor for a kernel object which depends on the attach type of *attach_bpf_fd*:h](hThe }(hjhhhNhNubj)}(h *target_fd*h]h target_fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhY must be a valid file descriptor for a kernel object which depends on the attach type of }(hjhhhNhNubj)}(h*attach_bpf_fd*h]h attach_bpf_fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubh)}(h**BPF_PROG_TYPE_CGROUP_DEVICE**, **BPF_PROG_TYPE_CGROUP_SKB**, **BPF_PROG_TYPE_CGROUP_SOCK**, **BPF_PROG_TYPE_CGROUP_SOCK_ADDR**, **BPF_PROG_TYPE_CGROUP_SOCKOPT**, **BPF_PROG_TYPE_CGROUP_SYSCTL**, **BPF_PROG_TYPE_SOCK_OPS**h](j)}(h**BPF_PROG_TYPE_CGROUP_DEVICE**h]hBPF_PROG_TYPE_CGROUP_DEVICE}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh, }(hj3hhhNhNubj)}(h**BPF_PROG_TYPE_CGROUP_SKB**h]hBPF_PROG_TYPE_CGROUP_SKB}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh, }hj3sbj)}(h**BPF_PROG_TYPE_CGROUP_SOCK**h]hBPF_PROG_TYPE_CGROUP_SOCK}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh, }hj3sbj)}(h"**BPF_PROG_TYPE_CGROUP_SOCK_ADDR**h]hBPF_PROG_TYPE_CGROUP_SOCK_ADDR}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh, }hj3sbj)}(h **BPF_PROG_TYPE_CGROUP_SOCKOPT**h]hBPF_PROG_TYPE_CGROUP_SOCKOPT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh, }hj3sbj)}(h**BPF_PROG_TYPE_CGROUP_SYSCTL**h]hBPF_PROG_TYPE_CGROUP_SYSCTL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh, }hj3sbj)}(h**BPF_PROG_TYPE_SOCK_OPS**h]hBPF_PROG_TYPE_SOCK_OPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubj)}(h|Control Group v2 hierarchy with the eBPF controller enabled. Requires the kernel to be compiled with **CONFIG_CGROUP_BPF**. h]h)}(h{Control Group v2 hierarchy with the eBPF controller enabled. Requires the kernel to be compiled with **CONFIG_CGROUP_BPF**.h](heControl Group v2 hierarchy with the eBPF controller enabled. Requires the kernel to be compiled with }(hjhhhNhNubj)}(h**CONFIG_CGROUP_BPF**h]hCONFIG_CGROUP_BPF}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjhMhjubh)}(h **BPF_PROG_TYPE_FLOW_DISSECTOR**h]j)}(hjh]hBPF_PROG_TYPE_FLOW_DISSECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubj)}(h*Network namespace (eg /proc/self/ns/net). h]h)}(h)Network namespace (eg /proc/self/ns/net).h]h)Network namespace (eg /proc/self/ns/net).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubah}(h]h ]h"]h$]h&]uh1jhj hMhjubh)}(h**BPF_PROG_TYPE_LIRC_MODE2**h]j)}(hjh]hBPF_PROG_TYPE_LIRC_MODE2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubj)}(heLIRC device path (eg /dev/lircN). Requires the kernel to be compiled with **CONFIG_BPF_LIRC_MODE2**. h]h)}(hdLIRC device path (eg /dev/lircN). Requires the kernel to be compiled with **CONFIG_BPF_LIRC_MODE2**.h](hJLIRC device path (eg /dev/lircN). Requires the kernel to be compiled with }(hj0hhhNhNubj)}(h**CONFIG_BPF_LIRC_MODE2**h]hCONFIG_BPF_LIRC_MODE2}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj,ubah}(h]h ]h"]h$]h&]uh1jhjPhMhjubh)}(hX>**BPF_PROG_QUERY** always fetches the number of programs attached and the *attach_flags* which were used to attach those programs. Additionally, if *prog_ids* is nonzero and the number of attached programs is less than *prog_cnt*, populates *prog_ids* with the eBPF program ids of the programs attached at *target_fd*.h](j)}(h**BPF_PROG_QUERY**h]hBPF_PROG_QUERY}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh8 always fetches the number of programs attached and the }(hjWhhhNhNubj)}(h*attach_flags*h]h attach_flags}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh< which were used to attach those programs. Additionally, if }(hjWhhhNhNubj)}(h *prog_ids*h]hprog_ids}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh= is nonzero and the number of attached programs is less than }(hjWhhhNhNubj)}(h *prog_cnt*h]hprog_cnt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh , populates }(hjWhhhNhNubj)}(h *prog_ids*h]hprog_ids}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh7 with the eBPF program ids of the programs attached at }(hjWhhhNhNubj)}(h *target_fd*h]h target_fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh.}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubh)}(h)The following flags may alter the result:h]h)The following flags may alter the result:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubjI)}(hhh]jN)}(h**BPF_F_QUERY_EFFECTIVE** Only return information regarding programs which are currently effective at the specified *target_fd*. h](jT)}(h**BPF_F_QUERY_EFFECTIVE**h]j)}(hjh]hBPF_F_QUERY_EFFECTIVE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jShjhMhjubje)}(hhh]h)}(hfOnly return information regarding programs which are currently effective at the specified *target_fd*.h](hZOnly return information regarding programs which are currently effective at the specified }(hjhhhNhNubj)}(h *target_fd*h]h target_fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubah}(h]h ]h"]h$]h&]uh1jHhjubeh}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jShjhMhj=ubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hjRhhhNhNubj)}(h*errno*h]herrno}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubh is set appropriately.}(hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjOubah}(h]h ]h"]h$]h&]uh1jdhj=ubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubeh}(h]h ]h"]h$]h&]uh1jHhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjJubjN)}(hXBPF_RAW_TRACEPOINT_OPEN Description Attach an eBPF program to a tracepoint *name* to access kernel internal arguments of the tracepoint in their raw form. The *prog_fd* must be a valid file descriptor associated with a loaded eBPF program of type **BPF_PROG_TYPE_RAW_TRACEPOINT**. No ABI guarantees are made about the content of tracepoint arguments exposed to the corresponding eBPF program. Applying **close**\ (2) to the file descriptor returned by **BPF_RAW_TRACEPOINT_OPEN** will delete the map (but see NOTES). Return A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hBPF_RAW_TRACEPOINT_OPENh]hBPF_RAW_TRACEPOINT_OPEN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh]jI)}(hhh](jN)}(hXDescription Attach an eBPF program to a tracepoint *name* to access kernel internal arguments of the tracepoint in their raw form. The *prog_fd* must be a valid file descriptor associated with a loaded eBPF program of type **BPF_PROG_TYPE_RAW_TRACEPOINT**. No ABI guarantees are made about the content of tracepoint arguments exposed to the corresponding eBPF program. Applying **close**\ (2) to the file descriptor returned by **BPF_RAW_TRACEPOINT_OPEN** will delete the map (but see NOTES). h](jT)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh](h)}(hvAttach an eBPF program to a tracepoint *name* to access kernel internal arguments of the tracepoint in their raw form.h](h'Attach an eBPF program to a tracepoint }(hjhhhNhNubj)}(h*name*h]hname}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhI to access kernel internal arguments of the tracepoint in their raw form.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubh)}(h}The *prog_fd* must be a valid file descriptor associated with a loaded eBPF program of type **BPF_PROG_TYPE_RAW_TRACEPOINT**.h](hThe }(hjhhhNhNubj)}(h *prog_fd*h]hprog_fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhO must be a valid file descriptor associated with a loaded eBPF program of type }(hjhhhNhNubj)}(h **BPF_PROG_TYPE_RAW_TRACEPOINT**h]hBPF_PROG_TYPE_RAW_TRACEPOINT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubh)}(hoNo ABI guarantees are made about the content of tracepoint arguments exposed to the corresponding eBPF program.h]hoNo ABI guarantees are made about the content of tracepoint arguments exposed to the corresponding eBPF program.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubh)}(h{Applying **close**\ (2) to the file descriptor returned by **BPF_RAW_TRACEPOINT_OPEN** will delete the map (but see NOTES).h](h Applying }(hj#hhhNhNubj)}(h **close**h]hclose}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh) (2) to the file descriptor returned by }(hj#hhhNhNubj)}(h**BPF_RAW_TRACEPOINT_OPEN**h]hBPF_RAW_TRACEPOINT_OPEN}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh% will delete the map (but see NOTES).}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubeh}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubjN)}(hReturn A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hReturnh]hReturn}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jShjhMhjbubje)}(hhh]h)}(hxA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately).h](hZA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, }(hjwhhhNhNubj)}(h*errno*h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubh is set appropriately).}(hjwhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjtubah}(h]h ]h"]h$]h&]uh1jdhjbubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubeh}(h]h ]h"]h$]h&]uh1jHhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjJubjN)}(hXBPF_BTF_LOAD Description Verify and load BPF Type Format (BTF) metadata into the kernel, returning a new file descriptor associated with the metadata. BTF is described in more detail at https://www.kernel.org/doc/html/latest/bpf/btf.html. The *btf* parameter must point to valid memory providing *btf_size* bytes of BTF binary metadata. The returned file descriptor can be passed to other **bpf**\ () subcommands such as **BPF_PROG_LOAD** or **BPF_MAP_CREATE** to associate the BTF with those objects. Similar to **BPF_PROG_LOAD**, **BPF_BTF_LOAD** has optional parameters to specify a *btf_log_buf*, *btf_log_size* and *btf_log_level* which allow the kernel to return freeform log output regarding the BTF verification process. Return A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(h BPF_BTF_LOADh]h BPF_BTF_LOAD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh]jI)}(hhh](jN)}(hXDescription Verify and load BPF Type Format (BTF) metadata into the kernel, returning a new file descriptor associated with the metadata. BTF is described in more detail at https://www.kernel.org/doc/html/latest/bpf/btf.html. The *btf* parameter must point to valid memory providing *btf_size* bytes of BTF binary metadata. The returned file descriptor can be passed to other **bpf**\ () subcommands such as **BPF_PROG_LOAD** or **BPF_MAP_CREATE** to associate the BTF with those objects. Similar to **BPF_PROG_LOAD**, **BPF_BTF_LOAD** has optional parameters to specify a *btf_log_buf*, *btf_log_size* and *btf_log_level* which allow the kernel to return freeform log output regarding the BTF verification process. h](jT)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubje)}(hhh](h)}(hVerify and load BPF Type Format (BTF) metadata into the kernel, returning a new file descriptor associated with the metadata. BTF is described in more detail at https://www.kernel.org/doc/html/latest/bpf/btf.html.h](hVerify and load BPF Type Format (BTF) metadata into the kernel, returning a new file descriptor associated with the metadata. BTF is described in more detail at }(hjhhhNhNubh)}(h3https://www.kernel.org/doc/html/latest/bpf/btf.htmlh]h3https://www.kernel.org/doc/html/latest/bpf/btf.html}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM hjubh)}(haThe *btf* parameter must point to valid memory providing *btf_size* bytes of BTF binary metadata.h](hThe }(hjhhhNhNubj)}(h*btf*h]hbtf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh0 parameter must point to valid memory providing }(hjhhhNhNubj)}(h *btf_size*h]hbtf_size}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh bytes of BTF binary metadata.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubh)}(hThe returned file descriptor can be passed to other **bpf**\ () subcommands such as **BPF_PROG_LOAD** or **BPF_MAP_CREATE** to associate the BTF with those objects.h](h4The returned file descriptor can be passed to other }(hj:hhhNhNubj)}(h**bpf**h]hbpf}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh () subcommands such as }(hj:hhhNhNubj)}(h**BPF_PROG_LOAD**h]h BPF_PROG_LOAD}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh or }(hj:hhhNhNubj)}(h**BPF_MAP_CREATE**h]hBPF_MAP_CREATE}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh) to associate the BTF with those objects.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubh)}(hSimilar to **BPF_PROG_LOAD**, **BPF_BTF_LOAD** has optional parameters to specify a *btf_log_buf*, *btf_log_size* and *btf_log_level* which allow the kernel to return freeform log output regarding the BTF verification process.h](h Similar to }(hjhhhNhNubj)}(h**BPF_PROG_LOAD**h]h BPF_PROG_LOAD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h**BPF_BTF_LOAD**h]h BPF_BTF_LOAD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh& has optional parameters to specify a }(hjhhhNhNubj)}(h *btf_log_buf*h]h btf_log_buf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h*btf_log_size*h]h btf_log_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h*btf_log_level*h]h btf_log_level}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh] which allow the kernel to return freeform log output regarding the BTF verification process.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubeh}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubjN)}(hReturn A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hReturnh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShjhMhjubje)}(hhh]h)}(hxA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately).h](hZA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, }(hj hhhNhNubj)}(h*errno*h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh is set appropriately).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjubeh}(h]h ]h"]h$]h&]uh1jHhjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjhMhjJubjN)}(hXBPF_BTF_GET_FD_BY_ID Description Open a file descriptor for the BPF Type Format (BTF) corresponding to *btf_id*. Return A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hBPF_BTF_GET_FD_BY_IDh]hBPF_BTF_GET_FD_BY_ID}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM&hjHubje)}(hhh]jI)}(hhh](jN)}(h\Description Open a file descriptor for the BPF Type Format (BTF) corresponding to *btf_id*. h](jT)}(h Descriptionh]h Description}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM"hjaubje)}(hhh]h)}(hOOpen a file descriptor for the BPF Type Format (BTF) corresponding to *btf_id*.h](hFOpen a file descriptor for the BPF Type Format (BTF) corresponding to }(hjwhhhNhNubj)}(h*btf_id*h]hbtf_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubh.}(hjwhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM!hjtubah}(h]h ]h"]h$]h&]uh1jdhjaubeh}(h]h ]h"]h$]h&]uh1jMhjshM"hj^ubjN)}(hReturn A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hReturnh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShjZhM&hjubje)}(hhh]h)}(hxA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately).h](hZA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, }(hjhhhNhNubj)}(h*errno*h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is set appropriately).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM%hjubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhjZhM&hj^ubeh}(h]h ]h"]h$]h&]uh1jHhj[ubah}(h]h ]h"]h$]h&]uh1jdhjHubeh}(h]h ]h"]h$]h&]uh1jMhjZhM&hjJubjN)}(hXBPF_TASK_FD_QUERY Description Obtain information about eBPF programs associated with the target process identified by *pid* and *fd*. If the *pid* and *fd* are associated with a tracepoint, kprobe or uprobe perf event, then the *prog_id* and *fd_type* will be populated with the eBPF program id and file descriptor type of type **bpf_task_fd_type**. If associated with a kprobe or uprobe, the *probe_offset* and *probe_addr* will also be populated. Optionally, if *buf* is provided, then up to *buf_len* bytes of *buf* will be populated with the name of the tracepoint, kprobe or uprobe. The resulting *prog_id* may be introspected in deeper detail using **BPF_PROG_GET_FD_BY_ID** and **BPF_OBJ_GET_INFO_BY_FD**. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_TASK_FD_QUERYh]hBPF_TASK_FD_QUERY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM;hjubje)}(hhh]jI)}(hhh](jN)}(hXDescription Obtain information about eBPF programs associated with the target process identified by *pid* and *fd*. If the *pid* and *fd* are associated with a tracepoint, kprobe or uprobe perf event, then the *prog_id* and *fd_type* will be populated with the eBPF program id and file descriptor type of type **bpf_task_fd_type**. If associated with a kprobe or uprobe, the *probe_offset* and *probe_addr* will also be populated. Optionally, if *buf* is provided, then up to *buf_len* bytes of *buf* will be populated with the name of the tracepoint, kprobe or uprobe. The resulting *prog_id* may be introspected in deeper detail using **BPF_PROG_GET_FD_BY_ID** and **BPF_OBJ_GET_INFO_BY_FD**. h](jT)}(h Descriptionh]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM7hj ubje)}(hhh](h)}(hgObtain information about eBPF programs associated with the target process identified by *pid* and *fd*.h](hXObtain information about eBPF programs associated with the target process identified by }(hj' hhhNhNubj)}(h*pid*h]hpid}(hj/ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj' ubh and }(hj' hhhNhNubj)}(h*fd*h]hfd}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj' ubh.}(hj' hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM*hj$ ubh)}(hXIf the *pid* and *fd* are associated with a tracepoint, kprobe or uprobe perf event, then the *prog_id* and *fd_type* will be populated with the eBPF program id and file descriptor type of type **bpf_task_fd_type**. If associated with a kprobe or uprobe, the *probe_offset* and *probe_addr* will also be populated. Optionally, if *buf* is provided, then up to *buf_len* bytes of *buf* will be populated with the name of the tracepoint, kprobe or uprobe.h](hIf the }(hjZ hhhNhNubj)}(h*pid*h]hpid}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubh and }(hjZ hhhNhNubj)}(h*fd*h]hfd}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubhI are associated with a tracepoint, kprobe or uprobe perf event, then the }(hjZ hhhNhNubj)}(h *prog_id*h]hprog_id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubh and }hjZ sbj)}(h *fd_type*h]hfd_type}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubhM will be populated with the eBPF program id and file descriptor type of type }(hjZ hhhNhNubj)}(h**bpf_task_fd_type**h]hbpf_task_fd_type}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubh.. If associated with a kprobe or uprobe, the }(hjZ hhhNhNubj)}(h*probe_offset*h]h probe_offset}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubh and }hjZ sbj)}(h *probe_addr*h]h probe_addr}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubh( will also be populated. Optionally, if }(hjZ hhhNhNubj)}(h*buf*h]hbuf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubh is provided, then up to }(hjZ hhhNhNubj)}(h *buf_len*h]hbuf_len}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubh bytes of }(hjZ hhhNhNubj)}(h*buf*h]hbuf}(hj!hhhNhNubah}(h]h ]h"]h$ ]h&]uh1jhjZ ubhE will be populated with the name of the tracepoint, kprobe or uprobe.}(hjZ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM-hj$ ubh)}(h|The resulting *prog_id* may be introspected in deeper detail using **BPF_PROG_GET_FD_BY_ID** and **BPF_OBJ_GET_INFO_BY_FD**.h](hThe resulting }(hj!hhhNhNubj)}(h *prog_id*h]hprog_id}(hj%!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh, may be introspected in deeper detail using }(hj!hhhNhNubj)}(h**BPF_PROG_GET_FD_BY_ID**h]hBPF_PROG_GET_FD_BY_ID}(hj7!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh and }(hj!hhhNhNubj)}(h**BPF_OBJ_GET_INFO_BY_FD**h]hBPF_OBJ_GET_INFO_BY_FD}(hjI!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM6hj$ ubeh}(h]h ]h"]h$]h&]uh1jdhj ubeh}(h]h ]h"]h$]h&]uh1jMhj# hM7hj ubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hjr!hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj hM;hjn!ubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hj!hhhNhNubj)}(h*errno*h]herrno}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh is set appropriately.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM:hj!ubah}(h]h ]h"]h$]h&]uh1jdhjn!ubeh}(h]h ]h"]h$]h&]uh1jMhj hM;hj ubeh}(h]h ]h"]h$]h&]uh1jHhj ubah}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1jMhj hM;hjJubjN)}(hXBPF_MAP_LOOKUP_AND_DELETE_ELEM Description Look up an element with the given *key* in the map referred to by the file descriptor *fd*, and if found, delete the element. For **BPF_MAP_TYPE_QUEUE** and **BPF_MAP_TYPE_STACK** map types, the *flags* argument needs to be set to 0, but for other map types, it may be specified as: **BPF_F_LOCK** Look up and delete the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock. The **BPF_MAP_TYPE_QUEUE** and **BPF_MAP_TYPE_STACK** map types implement this command as a "pop" operation, deleting the top element rather than one corresponding to *key*. The *key* and *key_len* parameters should be zeroed when issuing this operation for these map types. This command is only valid for the following map types: * **BPF_MAP_TYPE_QUEUE** * **BPF_MAP_TYPE_STACK** * **BPF_MAP_TYPE_HASH** * **BPF_MAP_TYPE_PERCPU_HASH** * **BPF_MAP_TYPE_LRU_HASH** * **BPF_MAP_TYPE_LRU_PERCPU_HASH** Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_MAP_LOOKUP_AND_DELETE_ELEMh]hBPF_MAP_LOOKUP_AND_DELETE_ELEM}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM[hj!ubje)}(hhh]jI)}(hhh](jN)}(hXDescription Look up an element with the given *key* in the map referred to by the file descriptor *fd*, and if found, delete the element. For **BPF_MAP_TYPE_QUEUE** and **BPF_MAP_TYPE_STACK** map types, the *flags* argument needs to be set to 0, but for other map types, it may be specified as: **BPF_F_LOCK** Look up and delete the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock. The **BPF_MAP_TYPE_QUEUE** and **BPF_MAP_TYPE_STACK** map types implement this command as a "pop" operation, deleting the top element rather than one corresponding to *key*. The *key* and *key_len* parameters should be zeroed when issuing this operation for these map types. This command is only valid for the following map types: * **BPF_MAP_TYPE_QUEUE** * **BPF_MAP_TYPE_STACK** * **BPF_MAP_TYPE_HASH** * **BPF_MAP_TYPE_PERCPU_HASH** * **BPF_MAP_TYPE_LRU_HASH** * **BPF_MAP_TYPE_LRU_PERCPU_HASH** h](jT)}(h Descriptionh]h Description}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMWhj!ubje)}(hhh](h)}(h}Look up an element with the given *key* in the map referred to by the file descriptor *fd*, and if found, delete the element.h](h"Look up an element with the given }(hj!hhhNhNubj)}(h*key*h]hkey}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh/ in the map referred to by the file descriptor }(hj!hhhNhNubj)}(h*fd*h]hfd}(hj "hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh#, and if found, delete the element.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM?hj!ubh)}(hFor **BPF_MAP_TYPE_QUEUE** and **BPF_MAP_TYPE_STACK** map types, the *flags* argument needs to be set to 0, but for other map types, it may be specified as:h](hFor }(hj$"hhhNhNubj)}(h**BPF_MAP_TYPE_QUEUE**h]hBPF_MAP_TYPE_QUEUE}(hj,"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$"ubh and }(hj$"hhhNhNubj)}(h**BPF_MAP_TYPE_STACK**h]hBPF_MAP_TYPE_STACK}(hj>"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$"ubh map types, the }(hj$"hhhNhNubj)}(h*flags*h]hflags}(hjP"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$"ubhP argument needs to be set to 0, but for other map types, it may be specified as:}(hj$"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMBhj!ubjI)}(hhh]jN)}(h**BPF_F_LOCK** Look up and delete the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock. h](jT)}(h**BPF_F_LOCK**h]j)}(hjr"h]h BPF_F_LOCK}(hjt"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp"ubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMIhjl"ubje)}(hhh]h)}(hLook up and delete the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock.h]hLook up and delete the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMGhj"ubah}(h]h ]h"]h$]h&]uh1jdhjl"ubeh}(h]h ]h"]h$]h&]uh1jMhj"hMIhji"ubah}(h]h ]h"]h$]h&]uh1jHhj!ubh)}(hXThe **BPF_MAP_TYPE_QUEUE** and **BPF_MAP_TYPE_STACK** map types implement this command as a "pop" operation, deleting the top element rather than one corresponding to *key*. The *key* and *key_len* parameters should be zeroed when issuing this operation for these map types.h](hThe }(hj"hhhNhNubj)}(h**BPF_MAP_TYPE_QUEUE**h]hBPF_MAP_TYPE_QUEUE}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh and }(hj"hhhNhNubj)}(h**BPF_MAP_TYPE_STACK**h]hBPF_MAP_TYPE_STACK}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubhv map types implement this command as a “pop” operation, deleting the top element rather than one corresponding to }(hj"hhhNhNubj)}(h*key*h]hkey}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh. The }(hj"hhhNhNubj)}(h*key*h]hkey}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh and }hj"sbj)}(h *key_len*h]hkey_len}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubhM parameters should be zeroed when issuing this operation for these map types.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMKhj!ubh)}(hThis command is only valid for the following map types: * **BPF_MAP_TYPE_QUEUE** * **BPF_MAP_TYPE_STACK** * **BPF_MAP_TYPE_HASH** * **BPF_MAP_TYPE_PERCPU_HASH** * **BPF_MAP_TYPE_LRU_HASH** * **BPF_MAP_TYPE_LRU_PERCPU_HASH**h](h:This command is only valid for the following map types: * }(hj#hhhNhNubj)}(h**BPF_MAP_TYPE_QUEUE**h]hBPF_MAP_TYPE_QUEUE}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh * }(hj#hhhNhNubj)}(h**BPF_MAP_TYPE_STACK**h]hBPF_MAP_TYPE_STACK}(hj/#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh * }hj#sbj)}(h**BPF_MAP_TYPE_HASH**h]hBPF_MAP_TYPE_HASH}(hjA#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh * }hj#sbj)}(h**BPF_MAP_TYPE_PERCPU_HASH**h]hBPF_MAP_TYPE_PERCPU_HASH}(hjS#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh * }hj#sbj)}(h**BPF_MAP_TYPE_LRU_HASH**h]hBPF_MAP_TYPE_LRU_HASH}(hje#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh * }hj#sbj)}(h **BPF_MAP_TYPE_LRU_PERCPU_HASH**h]hBPF_MAP_TYPE_LRU_PERCPU_HASH}(hjw#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMQhj!ubeh}(h]h ]h"]h$]h&]uh1jdhj!ubeh}(h]h ]h"]h$]h&]uh1jMhj!hMWhj!ubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj!hM[hj#ubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hj#hhhNhNubj)}(h*errno*h]herrno}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh is set appropriately.}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMZhj#ubah}(h]h ]h"]h$]h&]uh1jdhj#ubeh}(h]h ]h"]h$]h&]uh1jMhj!hM[hj!ubeh}(h]h ]h"]h$]h&]uh1jHhj!ubah}(h]h ]h"]h$]h&]uh1jdhj!ubeh}(h]h ]h"]h$]h&]uh1jMhj!hM[hjJubjN)}(hXBPF_MAP_FREEZE Description Freeze the permissions of the specified map. Write permissions may be frozen by passing zero *flags*. Upon success, no future syscall invocations may alter the map state of *map_fd*. Write operations from eBPF programs are still possible for a frozen map. Not supported for maps of type **BPF_MAP_TYPE_STRUCT_OPS**. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_MAP_FREEZEh]hBPF_MAP_FREEZE}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMjhj#ubje)}(hhh]jI)}(hhh](jN)}(hXJDescription Freeze the permissions of the specified map. Write permissions may be frozen by passing zero *flags*. Upon success, no future syscall invocations may alter the map state of *map_fd*. Write operations from eBPF programs are still possible for a frozen map. Not supported for maps of type **BPF_MAP_TYPE_STRUCT_OPS**. h](jT)}(h Descriptionh]h Description}(hj $hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMfhj$ubje)}(hhh](h)}(h,Freeze the permissions of the specified map.h]h,Freeze the permissions of the specified map.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM_hj$ubh)}(hWrite permissions may be frozen by passing zero *flags*. Upon success, no future syscall invocations may alter the map state of *map_fd*. Write operations from eBPF programs are still possible for a frozen map.h](h0Write permissions may be frozen by passing zero }(hj*$hhhNhNubj)}(h*flags*h]hflags}(hj2$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*$ubhI. Upon success, no future syscall invocations may alter the map state of }(hj*$hhhNhNubj)}(h*map_fd*h]hmap_fd}(hjD$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*$ubhJ. Write operations from eBPF programs are still possible for a frozen map.}(hj*$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMahj$ubh)}(h;Not supported for maps of type **BPF_MAP_TYPE_STRUCT_OPS**.h](hNot supported for maps of type }(hj]$hhhNhNubj)}(h**BPF_MAP_TYPE_STRUCT_OPS**h]hBPF_MAP_TYPE_STRUCT_OPS}(hje$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]$ubh.}(hj]$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj$hMfhj$ubeh}(h]h ]h"]h$]h&]uh1jdhj$ubeh}(h]h ]h"]h$]h&]uh1jMhj$hMfhj$ubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj#hMjhj$ubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hj$hhhNhNubj)}(h*errno*h]herrno}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh is set appropriately.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMihj$ubah}(h]h ]h"]h$]h&]uh1jdhj$ubeh}(h]h ]h"]h$]h&]uh1jMhj#hMjhj$ubeh}(h]h ]h"]h$]h&]uh1jHhj#ubah}(h]h ]h"]h$]h&]uh1jdhj#ubeh}(h]h ]h"]h$]h&]uh1jMhj#hMjhjJubjN)}(hXBPF_BTF_GET_NEXT_ID Description Fetch the next BPF Type Format (BTF) object currently loaded into the kernel. Looks for the BTF object with an id greater than *start_id* and updates *next_id* on success. If no other BTF objects remain with ids higher than *start_id*, returns -1 and sets *errno* to **ENOENT**. Return Returns zero on success. On error, or when no id remains, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_BTF_GET_NEXT_IDh]hBPF_BTF_GET_NEXT_ID}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMxhj$ubje)}(hhh]jI)}(hhh](jN)}(hX$Description Fetch the next BPF Type Format (BTF) object currently loaded into the kernel. Looks for the BTF object with an id greater than *start_id* and updates *next_id* on success. If no other BTF objects remain with ids higher than *start_id*, returns -1 and sets *errno* to **ENOENT**. h](jT)}(h Descriptionh]h Description}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMthj$ubje)}(hhh](h)}(hMFetch the next BPF Type Format (BTF) object currently loaded into the kernel.h]hMFetch the next BPF Type Format (BTF) object currently loaded into the kernel.}(hj %hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMnhj %ubh)}(hLooks for the BTF object with an id greater than *start_id* and updates *next_id* on success. If no other BTF objects remain with ids higher than *start_id*, returns -1 and sets *errno* to **ENOENT**.h](h1Looks for the BTF object with an id greater than }(hj%hhhNhNubj)}(h *start_id*h]hstart_id}(hj#%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh and updates }(hj%hhhNhNubj)}(h *next_id*h]hnext_id}(hj5%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubhA on success. If no other BTF objects remain with ids higher than }(hj%hhhNhNubj)}(h *start_id*h]hstart_id}(hjG%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh, returns -1 and sets }(hj%hhhNhNubj)}(h*errno*h]herrno}(hjY%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh to }(hj%hhhNhNubj)}(h **ENOENT**h]hENOENT}(hjk%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMqhj %ubeh}(h]h ]h"]h$]h&]uh1jdhj$ubeh}(h]h ]h"]h$]h&]uh1jMhj%hMthj$ubjN)}(hrReturn Returns zero on success. On error, or when no id remains, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj$hMxhj%ubje)}(hhh]h)}(hjReturns zero on success. On error, or when no id remains, -1 is returned and *errno* is set appropriately.h](hMReturns zero on success. On error, or when no id remains, -1 is returned and }(hj%hhhNhNubj)}(h*errno*h]herrno}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh is set appropriately.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMwhj%ubah}(h]h ]h"]h$]h&]uh1jdhj%ubeh}(h]h ]h"]h$]h&]uh1jMhj$hMxhj$ubeh}(h]h ]h"]h$]h&]uh1jHhj$ubah}(h]h ]h"]h$]h&]uh1jdhj$ubeh}(h]h ]h"]h$]h&]uh1jMhj$hMxhjJubjN)}(hXBPF_MAP_LOOKUP_BATCH Description Iterate and fetch multiple elements in a map. Two opaque values are used to manage batch operations, *in_batch* and *out_batch*. Initially, *in_batch* must be set to NULL to begin the batched operation. After each subsequent **BPF_MAP_LOOKUP_BATCH**, the caller should pass the resultant *out_batch* as the *in_batch* for the next operation to continue iteration from the current point. Both *in_batch* and *out_batch* must point to memory large enough to hold a key, except for maps of type **BPF_MAP_TYPE_{HASH, PERCPU_HASH, LRU_HASH, LRU_PERCPU_HASH}**, for which batch parameters must be at least 4 bytes wide regardless of key size. The *keys* and *values* are output parameters which must point to memory large enough to hold *count* items based on the key and value size of the map *map_fd*. The *keys* buffer must be of *key_size* * *count*. The *values* buffer must be of *value_size* * *count*. The *elem_flags* argument may be specified as one of the following: **BPF_F_LOCK** Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock. On success, *count* elements from the map are copied into the user buffer, with the keys copied into *keys* and the values copied into the corresponding indices in *values*. If an error is returned and *errno* is not **EFAULT**, *count* is set to the number of successfully processed elements. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. May set *errno* to **ENOSPC** to indicate that *keys* or *values* is too small to dump an entire bucket during iteration of a hash-based map type. h](jT)}(hBPF_MAP_LOOKUP_BATCHh]hBPF_MAP_LOOKUP_BATCH}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj%ubje)}(hhh]jI)}(hhh](jN)}(hXDescription Iterate and fetch multiple elements in a map. Two opaque values are used to manage batch operations, *in_batch* and *out_batch*. Initially, *in_batch* must be set to NULL to begin the batched operation. After each subsequent **BPF_MAP_LOOKUP_BATCH**, the caller should pass the resultant *out_batch* as the *in_batch* for the next operation to continue iteration from the current point. Both *in_batch* and *out_batch* must point to memory large enough to hold a key, except for maps of type **BPF_MAP_TYPE_{HASH, PERCPU_HASH, LRU_HASH, LRU_PERCPU_HASH}**, for which batch parameters must be at least 4 bytes wide regardless of key size. The *keys* and *values* are output parameters which must point to memory large enough to hold *count* items based on the key and value size of the map *map_fd*. The *keys* buffer must be of *key_size* * *count*. The *values* buffer must be of *value_size* * *count*. The *elem_flags* argument may be specified as one of the following: **BPF_F_LOCK** Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock. On success, *count* elements from the map are copied into the user buffer, with the keys copied into *keys* and the values copied into the corresponding indices in *values*. If an error is returned and *errno* is not **EFAULT**, *count* is set to the number of successfully processed elements. h](jT)}(h Descriptionh]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj%ubje)}(hhh](h)}(h-Iterate and fetch multiple elements in a map.h]h-Iterate and fetch multiple elements in a map.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM|hj&ubh)}(hXOTwo opaque values are used to manage batch operations, *in_batch* and *out_batch*. Initially, *in_batch* must be set to NULL to begin the batched operation. After each subsequent **BPF_MAP_LOOKUP_BATCH**, the caller should pass the resultant *out_batch* as the *in_batch* for the next operation to continue iteration from the current point. Both *in_batch* and *out_batch* must point to memory large enough to hold a key, except for maps of type **BPF_MAP_TYPE_{HASH, PERCPU_HASH, LRU_HASH, LRU_PERCPU_HASH}**, for which batch parameters must be at least 4 bytes wide regardless of key size.h](h7Two opaque values are used to manage batch operations, }(hj"&hhhNhNubj)}(h *in_batch*h]hin_batch}(hj*&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"&ubh and }(hj"&hhhNhNubj)}(h *out_batch*h]h out_batch}(hj<&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"&ubh . Initially, }(hj"&hhhNhNubj)}(h *in_batch*h]hin_batch}(hjN&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"&ubhK must be set to NULL to begin the batched operation. After each subsequent }(hj"&hhhNhNubj)}(h**BPF_MAP_LOOKUP_BATCH**h]hBPF_MAP_LOOKUP_BATCH}(hj`&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"&ubh', the caller should pass the resultant }(hj"&hhhNhNubj)}(h *out_batch*h]h out_batch}(hjr&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"&ubh as the }(hj"&hhhNhNubj)}(h *in_batch*h]hin_batch}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"&ubhK for the next operation to continue iteration from the current point. Both }(hj"&hhhNhNubj)}(h *in_batch*h]hin_batch}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"&ubh and }(hj"&hhhNhNubj)}(h *out_batch*h]h out_batch}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"&ubhJ must point to memory large enough to hold a key, except for maps of type }(hj"&hhhNhNubj)}(h?**BPF_MAP_TYPE_{HASH, PERCPU_HASH, LRU_HASH, LRU_PERCPU_HASH}**h]h;BPF_MAP_TYPE_{HASH, PERCPU_HASH, LRU_HASH, LRU_PERCPU_HASH}}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"&ubhR, for which batch parameters must be at least 4 bytes wide regardless of key size.}(hj"&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM~hj&ubh)}(hX The *keys* and *values* are output parameters which must point to memory large enough to hold *count* items based on the key and value size of the map *map_fd*. The *keys* buffer must be of *key_size* * *count*. The *values* buffer must be of *value_size* * *count*.h](hThe }(hj&hhhNhNubj)}(h*keys*h]hkeys}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh and }(hj&hhhNhNubj)}(h*values*h]hvalues}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubhG are output parameters which must point to memory large enough to hold }(hj&hhhNhNubj)}(h*count*h]hcount}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh2 items based on the key and value size of the map }(hj&hhhNhNubj)}(h*map_fd*h]hmap_fd}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh. The }(hj&hhhNhNubj)}(h*keys*h]hkeys}(hj#'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh buffer must be of }(hj&hhhNhNubj)}(h *key_size*h]hkey_size}(hj5'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh * }(hj&hhhNhNubj)}(h*count*h]hcount}(hjG'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh. The }hj&sbj)}(h*values*h]hvalues}(hjY'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh buffer must be of }(hj&hhhNhNubj)}(h *value_size*h]h value_size}(hjk'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh * }hj&sbj)}(h*count*h]hcount}(hj}'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj&ubh)}(hCThe *elem_flags* argument may be specified as one of the following:h](hThe }(hj'hhhNhNubj)}(h *elem_flags*h]h elem_flags}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh3 argument may be specified as one of the following:}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj&ubjI)}(hhh]jN)}(h**BPF_F_LOCK** Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock. h](jT)}(h**BPF_F_LOCK**h]j)}(hj'h]h BPF_F_LOCK}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj'ubje)}(hhh]h)}(h}Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock.h]h}Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj'ubah}(h]h ]h"]h$]h&]uh1jdhj'ubeh}(h]h ]h"]h$]h&]uh1jMhj'hMhj'ubah}(h]h ]h"]h$]h&]uh1jHhj&ubh)}(hOn success, *count* elements from the map are copied into the user buffer, with the keys copied into *keys* and the values copied into the corresponding indices in *values*.h](h On success, }(hj'hhhNhNubj)}(h*count*h]hcount}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubhR elements from the map are copied into the user buffer, with the keys copied into }(hj'hhhNhNubj)}(h*keys*h]hkeys}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh9 and the values copied into the corresponding indices in }(hj'hhhNhNubj)}(h*values*h]hvalues}(hj&(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj&ubh)}(hwIf an error is returned and *errno* is not **EFAULT**, *count* is set to the number of successfully processed elements.h](hIf an error is returned and }(hj?(hhhNhNubj)}(h*errno*h]herrno}(hjG(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?(ubh is not }(hj?(hhhNhNubj)}(h **EFAULT**h]hEFAULT}(hjY(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?(ubh, }(hj?(hhhNhNubj)}(h*count*h]hcount}(hjk(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?(ubh9 is set to the number of successfully processed elements.}(hj?(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj&ubeh}(h]h ]h"]h$]h&]uh1jdhj%ubeh}(h]h ]h"]h$]h&]uh1jMhj&hMhj%ubjN)}(hReturn Returns zero on success. On error, -1 is returned and *errno* is set appropriately. May set *errno* to **ENOSPC** to indicate that *keys* or *values* is too small to dump an entire bucket during iteration of a hash-based map type. h](jT)}(hReturnh]hReturn}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj%hMhj(ubje)}(hhh](h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hj(hhhNhNubj)}(h*errno*h]herrno}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh is set appropriately.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj(ubh)}(hMay set *errno* to **ENOSPC** to indicate that *keys* or *values* is too small to dump an entire bucket during iteration of a hash-based map type.h](hMay set }(hj(hhhNhNubj)}(h*errno*h]herrno}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh to }(hj(hhhNhNubj)}(h **ENOSPC**h]hENOSPC}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh to indicate that }(hj(hhhNhNubj)}(h*keys*h]hkeys}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh or }(hj(hhhNhNubj)}(h*values*h]hvalues}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubhQ is too small to dump an entire bucket during iteration of a hash-based map type.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj(ubeh}(h]h ]h"]h$]h&]uh1jdhj(ubeh}(h]h ]h"]h$]h&]uh1jMhj%hMhj%ubeh}(h]h ]h"]h$]h&]uh1jHhj%ubah}(h]h ]h"]h$]h&]uh1jdhj%ubeh}(h]h ]h"]h$]h&]uh1jMhj%hMhjJubjN)}(hXBPF_MAP_LOOKUP_AND_DELETE_BATCH Description Iterate and delete all elements in a map. This operation has the same behavior as **BPF_MAP_LOOKUP_BATCH** with two exceptions: * Every element that is successfully returned is also deleted from the map. This is at least *count* elements. Note that *count* is both an input and an output parameter. * Upon returning with *errno* set to **EFAULT**, up to *count* elements may be deleted without returning the keys and values of the deleted elements. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_MAP_LOOKUP_AND_DELETE_BATCHh]hBPF_MAP_LOOKUP_AND_DELETE_BATCH}(hj?)hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj;)ubje)}(hhh]jI)}(hhh](jN)}(hXDescription Iterate and delete all elements in a map. This operation has the same behavior as **BPF_MAP_LOOKUP_BATCH** with two exceptions: * Every element that is successfully returned is also deleted from the map. This is at least *count* elements. Note that *count* is both an input and an output parameter. * Upon returning with *errno* set to **EFAULT**, up to *count* elements may be deleted without returning the keys and values of the deleted elements. h](jT)}(h Descriptionh]h Description}(hjX)hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjT)ubje)}(hhh](h)}(h)Iterate and delete all elements in a map.h]h)Iterate and delete all elements in a map.}(hjj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjg)ubh)}(hUThis operation has the same behavior as **BPF_MAP_LOOKUP_BATCH** with two exceptions:h](h(This operation has the same behavior as }(hjy)hhhNhNubj)}(h**BPF_MAP_LOOKUP_BATCH**h]hBPF_MAP_LOOKUP_BATCH}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjy)ubh with two exceptions:}(hjy)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjg)ubh)}(hhh](h)}(hEvery element that is successfully returned is also deleted from the map. This is at least *count* elements. Note that *count* is both an input and an output parameter.h]h)}(hEvery element that is successfully returned is also deleted from the map. This is at least *count* elements. Note that *count* is both an input and an output parameter.h](h[Every element that is successfully returned is also deleted from the map. This is at least }(hj)hhhNhNubj)}(h*count*h]hcount}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh elements. Note that }(hj)hhhNhNubj)}(h*count*h]hcount}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh* is both an input and an output parameter.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj)ubah}(h]h ]h"]h$]h&]uh1hhj)ubh)}(hUpon returning with *errno* set to **EFAULT**, up to *count* elements may be deleted without returning the keys and values of the deleted elements. h]h)}(hUpon returning with *errno* set to **EFAULT**, up to *count* elements may be deleted without returning the keys and values of the deleted elements.h](hUpon returning with }(hj)hhhNhNubj)}(h*errno*h]herrno}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh set to }(hj)hhhNhNubj)}(h **EFAULT**h]hEFAULT}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh, up to }(hj)hhhNhNubj)}(h*count*h]hcount}(hj *hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubhW elements may be deleted without returning the keys and values of the deleted elements.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj)ubah}(h]h ]h"]h$]h&]uh1hhj)ubeh}(h]h ]h"]h$]h&]j|j uh1hhj)hMhjg)ubeh}(h]h ]h"]h$]h&]uh1jdhjT)ubeh}(h]h ]h"]h$]h&]uh1jMhjf)hMhjQ)ubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hj?*hhhNhNubah}(h]h ]h"]h$]h&]uh1jShjM)hMhj;*ubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hjP*hhhNhNubj)}(h*errno*h]herrno}(hjX*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjP*ubh is set appropriately.}(hjP*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjM*ubah}(h]h ]h"]h$]h&]uh1jdhj;*ubeh}(h]h ]h"]h$]h&]uh1jMhjM)hMhjQ)ubeh}(h]h ]h"]h$]h&]uh1jHhjN)ubah}(h]h ]h"]h$]h&]uh1jdhj;)ubeh}(h]h ]h"]h$]h&]uh1jMhjM)hMhjJubjN)}(hXBPF_MAP_UPDATE_BATCH Description Update multiple elements in a map by *key*. The *keys* and *values* are input parameters which must point to memory large enough to hold *count* items based on the key and value size of the map *map_fd*. The *keys* buffer must be of *key_size* * *count*. The *values* buffer must be of *value_size* * *count*. Each element specified in *keys* is sequentially updated to the value in the corresponding index in *values*. The *in_batch* and *out_batch* parameters are ignored and should be zeroed. The *elem_flags* argument should be specified as one of the following: **BPF_ANY** Create new elements or update a existing elements. **BPF_NOEXIST** Create new elements only if they do not exist. **BPF_EXIST** Update existing elements. **BPF_F_LOCK** Update spin_lock-ed map elements. This must be specified if the map value contains a spinlock. On success, *count* elements from the map are updated. If an error is returned and *errno* is not **EFAULT**, *count* is set to the number of successfully processed elements. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. May set *errno* to **EINVAL**, **EPERM**, **ENOMEM**, or **E2BIG**. **E2BIG** indicates that the number of elements in the map reached the *max_entries* limit specified at map creation time. May set *errno* to one of the following error codes under specific circumstances: **EEXIST** If *flags* specifies **BPF_NOEXIST** and the element with *key* already exists in the map. **ENOENT** If *flags* specifies **BPF_EXIST** and the element with *key* does not exist in the map. h](jT)}(hBPF_MAP_UPDATE_BATCHh]hBPF_MAP_UPDATE_BATCH}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj*ubje)}(hhh]jI)}(hhh](jN)}(hX4Description Update multiple elements in a map by *key*. The *keys* and *values* are input parameters which must point to memory large enough to hold *count* items based on the key and value size of the map *map_fd*. The *keys* buffer must be of *key_size* * *count*. The *values* buffer must be of *value_size* * *count*. Each element specified in *keys* is sequentially updated to the value in the corresponding index in *values*. The *in_batch* and *out_batch* parameters are ignored and should be zeroed. The *elem_flags* argument should be specified as one of the following: **BPF_ANY** Create new elements or update a existing elements. **BPF_NOEXIST** Create new elements only if they do not exist. **BPF_EXIST** Update existing elements. **BPF_F_LOCK** Update spin_lock-ed map elements. This must be specified if the map value contains a spinlock. On success, *count* elements from the map are updated. If an error is returned and *errno* is not **EFAULT**, *count* is set to the number of successfully processed elements. h](jT)}(h Descriptionh]h Description}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj*ubje)}(hhh](h)}(h+Update multiple elements in a map by *key*.h](h%Update multiple elements in a map by }(hj*hhhNhNubj)}(h*key*h]hkey}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh.}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj*ubh)}(hX The *keys* and *values* are input parameters which must point to memory large enough to hold *count* items based on the key and value size of the map *map_fd*. The *keys* buffer must be of *key_size* * *count*. The *values* buffer must be of *value_size* * *count*.h](hThe }(hj*hhhNhNubj)}(h*keys*h]hkeys}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh and }(hj*hhhNhNubj)}(h*values*h]hvalues}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubhF are input parameters which must point to memory large enough to hold }(hj*hhhNhNubj)}(h*count*h]hcount}(hj +hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh2 items based on the key and value size of the map }(hj*hhhNhNubj)}(h*map_fd*h]hmap_fd}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh. The }(hj*hhhNhNubj)}(h*keys*h]hkeys}(hj/+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh buffer must be of }(hj*hhhNhNubj)}(h *key_size*h]hkey_size}(hjA+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh * }(hj*hhhNhNubj)}(h*count*h]hcount}(hjS+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh. The }hj*sbj)}(h*values*h]hvalues}(hje+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh buffer must be of }(hj*hhhNhNubj)}(h *value_size*h]h value_size}(hjw+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh * }hj*sbj)}(h*count*h]hcount}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh.}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj*ubh)}(hEach element specified in *keys* is sequentially updated to the value in the corresponding index in *values*. The *in_batch* and *out_batch* parameters are ignored and should be zeroed.h](hEach element specified in }(hj+hhhNhNubj)}(h*keys*h]hkeys}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubhD is sequentially updated to the value in the corresponding index in }(hj+hhhNhNubj)}(h*values*h]hvalues}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh. The }(hj+hhhNhNubj)}(h *in_batch*h]hin_batch}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh and }(hj+hhhNhNubj)}(h *out_batch*h]h out_batch}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh- parameters are ignored and should be zeroed.}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj*ubh)}(hFThe *elem_flags* argument should be specified as one of the following:h](hThe }(hj+hhhNhNubj)}(h *elem_flags*h]h elem_flags}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh6 argument should be specified as one of the following:}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj*ubjI)}(hhh](jN)}(h>**BPF_ANY** Create new elements or update a existing elements.h](jT)}(h **BPF_ANY**h]j)}(hj#,h]hBPF_ANY}(hj%,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!,ubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj,ubje)}(hhh]h)}(h2Create new elements or update a existing elements.h]h2Create new elements or update a existing elements.}(hj<,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj9,ubah}(h]h ]h"]h$]h&]uh1jdhj,ubeh}(h]h ]h"]h$]h&]uh1jMhj8,hMhj,ubjN)}(h>**BPF_NOEXIST** Create new elements only if they do not exist.h](jT)}(h**BPF_NOEXIST**h]j)}(hj],h]h BPF_NOEXIST}(hj_,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[,ubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjW,ubje)}(hhh]h)}(h.Create new elements only if they do not exist.h]h.Create new elements only if they do not exist.}(hjv,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjs,ubah}(h]h ]h"]h$]h&]uh1jdhjW,ubeh}(h]h ]h"]h$]h&]uh1jMhjr,hMhj,ubjN)}(h'**BPF_EXIST** Update existing elements.h](jT)}(h **BPF_EXIST**h]j)}(hj,h]h BPF_EXIST}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj,ubje)}(hhh]h)}(hUpdate existing elements.h]hUpdate existing elements.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj,ubah}(h]h ]h"]h$]h&]uh1jdhj,ubeh}(h]h ]h"]h$]h&]uh1jMhj,hMhj,ubjN)}(hn**BPF_F_LOCK** Update spin_lock-ed map elements. This must be specified if the map value contains a spinlock. h](jT)}(h**BPF_F_LOCK**h]j)}(hj,h]h BPF_F_LOCK}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj,ubje)}(hhh]h)}(h^Update spin_lock-ed map elements. This must be specified if the map value contains a spinlock.h]h^Update spin_lock-ed map elements. This must be specified if the map value contains a spinlock.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj,ubah}(h]h ]h"]h$]h&]uh1jdhj,ubeh}(h]h ]h"]h$]h&]uh1jMhj,hMhj,ubeh}(h]h ]h"]h$]h&]uh1jHhj*ubh)}(h6On success, *count* elements from the map are updated.h](h On success, }(hj -hhhNhNubj)}(h*count*h]hcount}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj -ubh# elements from the map are updated.}(hj -hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj*ubh)}(hwIf an error is returned and *errno* is not **EFAULT**, *count* is set to the number of successfully processed elements.h](hIf an error is returned and }(hj,-hhhNhNubj)}(h*errno*h]herrno}(hj4-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,-ubh is not }(hj,-hhhNhNubj)}(h **EFAULT**h]hEFAULT}(hjF-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,-ubh, }(hj,-hhhNhNubj)}(h*count*h]hcount}(hjX-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,-ubh9 is set to the number of successfully processed elements.}(hj,-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj*ubeh}(h]h ]h"]h$]h&]uh1jdhj*ubeh}(h]h ]h"]h$]h&]uh1jMhj*hMhj*ubjN)}(hXYReturn Returns zero on success. On error, -1 is returned and *errno* is set appropriately. May set *errno* to **EINVAL**, **EPERM**, **ENOMEM**, or **E2BIG**. **E2BIG** indicates that the number of elements in the map reached the *max_entries* limit specified at map creation time. May set *errno* to one of the following error codes under specific circumstances: **EEXIST** If *flags* specifies **BPF_NOEXIST** and the element with *key* already exists in the map. **ENOENT** If *flags* specifies **BPF_EXIST** and the element with *key* does not exist in the map. h](jT)}(hReturnh]hReturn}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj*hMhj}-ubje)}(hhh](h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hj-hhhNhNubj)}(h*errno*h]herrno}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh is set appropriately.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj-ubh)}(hMay set *errno* to **EINVAL**, **EPERM**, **ENOMEM**, or **E2BIG**. **E2BIG** indicates that the number of elements in the map reached the *max_entries* limit specified at map creation time.h](hMay set }(hj-hhhNhNubj)}(h*errno*h]herrno}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh to }(hj-hhhNhNubj)}(h **EINVAL**h]hEINVAL}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh, }(hj-hhhNhNubj)}(h **EPERM**h]hEPERM}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh, }hj-sbj)}(h **ENOMEM**h]hENOMEM}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh, or }(hj-hhhNhNubj)}(h **E2BIG**h]hE2BIG}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh. }(hj-hhhNhNubj)}(h **E2BIG**h]hE2BIG}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh> indicates that the number of elements in the map reached the }(hj-hhhNhNubj)}(h *max_entries*h]h max_entries}(hj'.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh& limit specified at map creation time.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj-ubh)}(hQMay set *errno* to one of the following error codes under specific circumstances:h](hMay set }(hj@.hhhNhNubj)}(h*errno*h]herrno}(hjH.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@.ubhB to one of the following error codes under specific circumstances:}(hj@.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj-ubjI)}(hhh](jN)}(he**EEXIST** If *flags* specifies **BPF_NOEXIST** and the element with *key* already exists in the map.h](jT)}(h **EEXIST**h]j)}(hjj.h]hEEXIST}(hjl.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh.ubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjd.ubje)}(hhh]h)}(hZIf *flags* specifies **BPF_NOEXIST** and the element with *key* already exists in the map.h](hIf }(hj.hhhNhNubj)}(h*flags*h]hflags}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh specifies }(hj.hhhNhNubj)}(h**BPF_NOEXIST**h]h BPF_NOEXIST}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh and the element with }(hj.hhhNhNubj)}(h*key*h]hkey}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh already exists in the map.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj.hMhj.ubah}(h]h ]h"]h$]h&]uh1jdhjd.ubeh}(h]h ]h"]h$]h&]uh1jMhj.hMhja.ubjN)}(hd**ENOENT** If *flags* specifies **BPF_EXIST** and the element with *key* does not exist in the map. h](jT)}(h **ENOENT**h]j)}(hj.h]hENOENT}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1jShj*hMhj.ubje)}(hhh]h)}(hXIf *flags* specifies **BPF_EXIST** and the element with *key* does not exist in the map.h](hIf }(hj.hhhNhNubj)}(h*flags*h]hflags}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh specifies }(hj.hhhNhNubj)}(h **BPF_EXIST**h]h BPF_EXIST}(hj /hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh and the element with }(hj.hhhNhNubj)}(h*key*h]hkey}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh does not exist in the map.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj.ubah}(h]h ]h"]h$]h&]uh1jdhj.ubeh}(h]h ]h"]h$]h&]uh1jMhj*hMhja.ubeh}(h]h ]h"]h$]h&]uh1jHhj-ubeh}(h]h ]h"]h$]h&]uh1jdhj}-ubeh}(h]h ]h"]h$]h&]uh1jMhj*hMhj*ubeh}(h]h ]h"]h$]h&]uh1jHhj*ubah}(h]h ]h"]h$]h&]uh1jdhj*ubeh}(h]h ]h"]h$]h&]uh1jMhj*hMhjJubjN)}(hXqBPF_MAP_DELETE_BATCH Description Delete multiple elements in a map by *key*. The *keys* parameter is an input parameter which must point to memory large enough to hold *count* items based on the key size of the map *map_fd*, that is, *key_size* * *count*. Each element specified in *keys* is sequentially deleted. The *in_batch*, *out_batch*, and *values* parameters are ignored and should be zeroed. The *elem_flags* argument may be specified as one of the following: **BPF_F_LOCK** Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock. On success, *count* elements from the map are updated. If an error is returned and *errno* is not **EFAULT**, *count* is set to the number of successfully processed elements. If *errno* is **EFAULT**, up to *count* elements may be been deleted. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_MAP_DELETE_BATCHh]hBPF_MAP_DELETE_BATCH}(hjj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjf/ubje)}(hhh]jI)}(hhh](jN)}(hX`Description Delete multiple elements in a map by *key*. The *keys* parameter is an input parameter which must point to memory large enough to hold *count* items based on the key size of the map *map_fd*, that is, *key_size* * *count*. Each element specified in *keys* is sequentially deleted. The *in_batch*, *out_batch*, and *values* parameters are ignored and should be zeroed. The *elem_flags* argument may be specified as one of the following: **BPF_F_LOCK** Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock. On success, *count* elements from the map are updated. If an error is returned and *errno* is not **EFAULT**, *count* is set to the number of successfully processed elements. If *errno* is **EFAULT**, up to *count* elements may be been deleted. h](jT)}(h Descriptionh]h Description}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj/ubje)}(hhh](h)}(h+Delete multiple elements in a map by *key*.h](h%Delete multiple elements in a map by }(hj/hhhNhNubj)}(h*key*h]hkey}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj/ubh)}(hThe *keys* parameter is an input parameter which must point to memory large enough to hold *count* items based on the key size of the map *map_fd*, that is, *key_size* * *count*.h](hThe }(hj/hhhNhNubj)}(h*keys*h]hkeys}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubhQ parameter is an input parameter which must point to memory large enough to hold }(hj/hhhNhNubj)}(h*count*h]hcount}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh( items based on the key size of the map }(hj/hhhNhNubj)}(h*map_fd*h]hmap_fd}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh , that is, }(hj/hhhNhNubj)}(h *key_size*h]hkey_size}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh * }(hj/hhhNhNubj)}(h*count*h]hcount}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj/ubh)}(hEach element specified in *keys* is sequentially deleted. The *in_batch*, *out_batch*, and *values* parameters are ignored and should be zeroed.h](hEach element specified in }(hj0hhhNhNubj)}(h*keys*h]hkeys}(hj'0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh is sequentially deleted. The }(hj0hhhNhNubj)}(h *in_batch*h]hin_batch}(hj90hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh, }(hj0hhhNhNubj)}(h *out_batch*h]h out_batch}(hjK0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh, and }(hj0hhhNhNubj)}(h*values*h]hvalues}(hj]0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh- parameters are ignored and should be zeroed.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj/ubh)}(hCThe *elem_flags* argument may be specified as one of the following:h](hThe }(hjv0hhhNhNubj)}(h *elem_flags*h]h elem_flags}(hj~0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjv0ubh3 argument may be specified as one of the following:}(hjv0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj/ubjI)}(hhh]jN)}(h**BPF_F_LOCK** Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock. h](jT)}(h**BPF_F_LOCK**h]j)}(hj0h]h BPF_F_LOCK}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj0ubje)}(hhh]h)}(h}Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock.h]h}Look up the value of a spin-locked map without returning the lock. This must be specified if the elements contain a spinlock.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj0ubah}(h]h ]h"]h$]h&]uh1jdhj0ubeh}(h]h ]h"]h$]h&]uh1jMhj0hMhj0ubah}(h]h ]h"]h$]h&]uh1jHhj/ubh)}(h6On success, *count* elements from the map are updated.h](h On success, }(hj0hhhNhNubj)}(h*count*h]hcount}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh# elements from the map are updated.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hYhMhj/ubh)}(hIf an error is returned and *errno* is not **EFAULT**, *count* is set to the number of successfully processed elements. If *errno* is **EFAULT**, up to *count* elements may be been deleted.h](hIf an error is returned and }(hj0hhhNhNubj)}(h*errno*h]herrno}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh is not }(hj0hhhNhNubj)}(h **EFAULT**h]hEFAULT}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh, }(hj0hhhNhNubj)}(h*count*h]hcount}(hj'1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh= is set to the number of successfully processed elements. If }(hj0hhhNhNubj)}(h*errno*h]herrno}(hj91hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh is }(hj0hhhNhNubj)}(h **EFAULT**h]hEFAULT}(hjK1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh, up to }(hj0hhhNhNubj)}(h*count*h]hcount}(hj]1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh elements may be been deleted.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj/ubeh}(h]h ]h"]h$]h&]uh1jdhj/ubeh}(h]h ]h"]h$]h&]uh1jMhj/hMhj|/ubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jShjx/hMhj1ubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hj1hhhNhNubj)}(h*errno*h]herrno}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh is set appropriately.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj1ubah}(h]h ]h"]h$]h&]uh1jdhj1ubeh}(h]h ]h"]h$]h&]uh1jMhjx/hMhj|/ubeh}(h]h ]h"]h$]h&]uh1jHhjy/ubah}(h]h ]h"]h$]h&]uh1jdhjf/ubeh}(h]h ]h"]h$]h&]uh1jMhjx/hMhjJubjN)}(hXLBPF_LINK_CREATE Description Attach an eBPF program to a *target_fd* at the specified *attach_type* hook and return a file descriptor handle for managing the link. Return A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hBPF_LINK_CREATEh]hBPF_LINK_CREATE}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj1ubje)}(hhh]jI)}(hhh](jN)}(hDescription Attach an eBPF program to a *target_fd* at the specified *attach_type* hook and return a file descriptor handle for managing the link. h](jT)}(h Descriptionh]h Description}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj1ubje)}(hhh]h)}(hAttach an eBPF program to a *target_fd* at the specified *attach_type* hook and return a file descriptor handle for managing the link.h](hAttach an eBPF program to a }(hj2hhhNhNubj)}(h *target_fd*h]h target_fd}(hj 2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh at the specified }(hj2hhhNhNubj)}(h *attach_type*h]h attach_type}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh@ hook and return a file descriptor handle for managing the link.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM hj2ubah}(h]h ]h"]h$]h&]uh1jdhj1ubeh}(h]h ]h"]h$]h&]uh1jMhj2hMhj1ubjN)}(hReturn A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hReturnh]hReturn}(hjH2hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj1hMhjD2ubje)}(hhh]h)}(hxA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately).h](hZA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, }(hjY2hhhNhNubj)}(h*errno*h]herrno}(hja2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjY2ubh is set appropriately).}(hjY2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjV2ubah}(h]h ]h"]h$]h&]uh1jdhjD2ubeh}(h]h ]h"]h$]h&]uh1jMhj1hMhj1ubeh}(h]h ]h"]h$]h&]uh1jHhj1ubah}(h]h ]h"]h$]h&]uh1jdhj1ubeh}(h]h ]h"]h$]h&]uh1jMhj1hMhjJubjN)}(hBPF_LINK_UPDATE Description Update the eBPF program in the specified *link_fd* to *new_prog_fd*. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_LINK_UPDATEh]hBPF_LINK_UPDATE}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj2ubje)}(hhh]jI)}(hhh](jN)}(hQDescription Update the eBPF program in the specified *link_fd* to *new_prog_fd*. h](jT)}(h Descriptionh]h Description}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj2ubje)}(hhh]h)}(hDUpdate the eBPF program in the specified *link_fd* to *new_prog_fd*.h](h)Update the eBPF program in the specified }(hj2hhhNhNubj)}(h *link_fd*h]hlink_fd}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh to }(hj2hhhNhNubj)}(h *new_prog_fd*h]h new_prog_fd}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj2ubah}(h]h ]h"]h$]h&]uh1jdhj2ubeh}(h]h ]h"]h$]h&]uh1jMhj2hMhj2ubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hj 3hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj2hMhj3ubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hj3hhhNhNubj)}(h*errno*h]herrno}(hj#3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh is set appropriately.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj3ubah}(h]h ]h"]h$]h&]uh1jdhj3ubeh}(h]h ]h"]h$]h&]uh1jMhj2hMhj2ubeh}(h]h ]h"]h$]h&]uh1jHhj2ubah}(h]h ]h"]h$]h&]uh1jdhj2ubeh}(h]h ]h"]h$]h&]uh1jMhj2hMhjJubjN)}(hXBPF_LINK_GET_FD_BY_ID Description Open a file descriptor for the eBPF Link corresponding to *link_id*. Return A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hBPF_LINK_GET_FD_BY_IDh]hBPF_LINK_GET_FD_BY_ID}(hj^3hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM$hjZ3ubje)}(hhh]jI)}(hhh](jN)}(hQDescription Open a file descriptor for the eBPF Link corresponding to *link_id*. h](jT)}(h Descriptionh]h Description}(hjw3hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM hjs3ubje)}(hhh]h)}(hDOpen a file descriptor for the eBPF Link corresponding to *link_id*.h](h:Open a file descriptor for the eBPF Link corresponding to }(hj3hhhNhNubj)}(h *link_id*h]hlink_id}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj3ubah}(h]h ]h"]h$]h&]uh1jdhjs3ubeh}(h]h ]h"]h$]h&]uh1jMhj3hM hjp3ubjN)}(hReturn A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hReturnh]hReturn}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jShjl3hM$hj3ubje)}(hhh]h)}(hxA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately).h](hZA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, }(hj3hhhNhNubj)}(h*errno*h]herrno}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh is set appropriately).}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM#hj3ubah}(h]h ]h"]h$]h&]uh1jdhj3ubeh}(h]h ]h"]h$]h&]uh1jMhjl3hM$hjp3ubeh}(h]h ]h"]h$]h&]uh1jHhjm3ubah}(h]h ]h"]h$]h&]uh1jdhjZ3ubeh}(h]h ]h"]h$]h&]uh1jMhjl3hM$hjJubjN)}(hXBPF_LINK_GET_NEXT_ID Description Fetch the next eBPF link currently loaded into the kernel. Looks for the eBPF link with an id greater than *start_id* and updates *next_id* on success. If no other eBPF links remain with ids higher than *start_id*, returns -1 and sets *errno* to **ENOENT**. Return Returns zero on success. On error, or when no id remains, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_LINK_GET_NEXT_IDh]hBPF_LINK_GET_NEXT_ID}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM1hj 4ubje)}(hhh]jI)}(hhh](jN)}(hXDescription Fetch the next eBPF link currently loaded into the kernel. Looks for the eBPF link with an id greater than *start_id* and updates *next_id* on success. If no other eBPF links remain with ids higher than *start_id*, returns -1 and sets *errno* to **ENOENT**. h](jT)}(h Descriptionh]h Description}(hj'4hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM-hj#4ubje)}(hhh](h)}(h:Fetch the next eBPF link currently loaded into the kernel.h]h:Fetch the next eBPF link currently loaded into the kernel.}(hj94hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM(hj64ubh)}(hLooks for the eBPF link with an id greater than *start_id* and updates *next_id* on success. If no other eBPF links remain with ids higher than *start_id*, returns -1 and sets *errno* to **ENOENT**.h](h0Looks for the eBPF link with an id greater than }(hjH4hhhNhNubj)}(h *start_id*h]hstart_id}(hjP4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH4ubh and updates }(hjH4hhhNhNubj)}(h *next_id*h]hnext_id}(hjb4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH4ubh@ on success. If no other eBPF links remain with ids higher than }(hjH4hhhNhNubj)}(h *start_id*h]hstart_id}(hjt4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH4ubh, returns -1 and sets }(hjH4hhhNhNubj)}(h*errno*h]herrno}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH4ubh to }(hjH4hhhNhNubj)}(h **ENOENT**h]hENOENT}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH4ubh.}(hjH4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM*hj64ubeh}(h]h ]h"]h$]h&]uh1jdhj#4ubeh}(h]h ]h"]h$]h&]uh1jMhj54hM-hj 4ubjN)}(hrReturn Returns zero on success. On error, or when no id remains, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj4hM1hj4ubje)}(hhh]h)}(hjReturns zero on success. On error, or when no id remains, -1 is returned and *errno* is set appropriately.h](hMReturns zero on success. On error, or when no id remains, -1 is returned and }(hj4hhhNhNubj)}(h*errno*h]herrno}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh is set appropriately.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM0hj4ubah}(h]h ]h"]h$]h&]uh1jdhj4ubeh}(h]h ]h"]h$]h&]uh1jMhj4hM1hj 4ubeh}(h]h ]h"]h$]h&]uh1jHhj4ubah}(h]h ]h"]h$]h&]uh1jdhj 4ubeh}(h]h ]h"]h$]h&]uh1jMhj4hM1hjJubjN)}(hX6BPF_ENABLE_STATS Description Enable eBPF runtime statistics gathering. Runtime statistics gathering for the eBPF runtime is disabled by default to minimize the corresponding performance overhead. This command enables statistics globally. Multiple programs may independently enable statistics. After gathering the desired statistics, eBPF runtime statistics may be disabled again by calling **close**\ (2) for the file descriptor returned by this function. Statistics will only be disabled system-wide when all outstanding file descriptors returned by prior calls for this subcommand are closed. Return A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hBPF_ENABLE_STATSh]hBPF_ENABLE_STATS}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMDhj5ubje)}(hhh]jI)}(hhh](jN)}(hXDDescription Enable eBPF runtime statistics gathering. Runtime statistics gathering for the eBPF runtime is disabled by default to minimize the corresponding performance overhead. This command enables statistics globally. Multiple programs may independently enable statistics. After gathering the desired statistics, eBPF runtime statistics may be disabled again by calling **close**\ (2) for the file descriptor returned by this function. Statistics will only be disabled system-wide when all outstanding file descriptors returned by prior calls for this subcommand are closed. h](jT)}(h Descriptionh]h Description}(hj.5hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM@hj*5ubje)}(hhh](h)}(h)Enable eBPF runtime statistics gathering.h]h)Enable eBPF runtime statistics gathering.}(hj@5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM5hj=5ubh)}(hRuntime statistics gathering for the eBPF runtime is disabled by default to minimize the corresponding performance overhead. This command enables statistics globally.h]hRuntime statistics gathering for the eBPF runtime is disabled by default to minimize the corresponding performance overhead. This command enables statistics globally.}(hjO5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM7hj=5ubh)}(hXdMultiple programs may independently enable statistics. After gathering the desired statistics, eBPF runtime statistics may be disabled again by calling **close**\ (2) for the file descriptor returned by this function. Statistics will only be disabled system-wide when all outstanding file descriptors returned by prior calls for this subcommand are closed.h](hMultiple programs may independently enable statistics. After gathering the desired statistics, eBPF runtime statistics may be disabled again by calling }(hj^5hhhNhNubj)}(h **close**h]hclose}(hjf5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^5ubh (2) for the file descriptor returned by this function. Statistics will only be disabled system-wide when all outstanding file descriptors returned by prior calls for this subcommand are closed.}(hj^5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM;hj=5ubeh}(h]h ]h"]h$]h&]uh1jdhj*5ubeh}(h]h ]h"]h$]h&]uh1jMhj<5hM@hj'5ubjN)}(hReturn A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hReturnh]hReturn}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj#5hMDhj5ubje)}(hhh]h)}(hxA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately).h](hZA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, }(hj5hhhNhNubj)}(h*errno*h]herrno}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh is set appropriately).}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMChj5ubah}(h]h ]h"]h$]h&]uh1jdhj5ubeh}(h]h ]h"]h$]h&]uh1jMhj#5hMDhj'5ubeh}(h]h ]h"]h$]h&]uh1jHhj$5ubah}(h]h ]h"]h$]h&]uh1jdhj5ubeh}(h]h ]h"]h$]h&]uh1jMhj#5hMDhjJubjN)}(hX|BPF_ITER_CREATE Description Create an iterator on top of the specified *link_fd* (as previously created using **BPF_LINK_CREATE**) and return a file descriptor that can be used to trigger the iteration. If the resulting file descriptor is pinned to the filesystem using **BPF_OBJ_PIN**, then subsequent **read**\ (2) syscalls for that path will trigger the iterator to read kernel state using the eBPF program attached to *link_fd*. Return A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hBPF_ITER_CREATEh]hBPF_ITER_CREATE}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMShj5ubje)}(hhh]jI)}(hhh](jN)}(hXDescription Create an iterator on top of the specified *link_fd* (as previously created using **BPF_LINK_CREATE**) and return a file descriptor that can be used to trigger the iteration. If the resulting file descriptor is pinned to the filesystem using **BPF_OBJ_PIN**, then subsequent **read**\ (2) syscalls for that path will trigger the iterator to read kernel state using the eBPF program attached to *link_fd*. h](jT)}(h Descriptionh]h Description}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMOhj5ubje)}(hhh](h)}(hCreate an iterator on top of the specified *link_fd* (as previously created using **BPF_LINK_CREATE**) and return a file descriptor that can be used to trigger the iteration.h](h+Create an iterator on top of the specified }(hj6hhhNhNubj)}(h *link_fd*h]hlink_fd}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh (as previously created using }(hj6hhhNhNubj)}(h**BPF_LINK_CREATE**h]hBPF_LINK_CREATE}(hj(6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubhI) and return a file descriptor that can be used to trigger the iteration.}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMHhj 6ubh)}(hIf the resulting file descriptor is pinned to the filesystem using **BPF_OBJ_PIN**, then subsequent **read**\ (2) syscalls for that path will trigger the iterator to read kernel state using the eBPF program attached to *link_fd*.h](hDIf the resulting file descriptor is pinned to the filesystem using }(hjA6hhhNhNubj)}(h**BPF_OBJ_PIN**h]h BPF_OBJ_PIN}(hjI6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjA6ubh, then subsequent }(hjA6hhhNhNubj)}(h**read**h]hread}(hj[6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjA6ubho (2) syscalls for that path will trigger the iterator to read kernel state using the eBPF program attached to }(hjA6hhhNhNubj)}(h *link_fd*h]hlink_fd}(hjm6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjA6ubh.}(hjA6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMLhj 6ubeh}(h]h ]h"]h$]h&]uh1jdhj5ubeh}(h]h ]h"]h$]h&]uh1jMhj 6hMOhj5ubjN)}(hReturn A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hReturnh]hReturn}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj5hMShj6ubje)}(hhh]h)}(hxA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately).h](hZA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, }(hj6hhhNhNubj)}(h*errno*h]herrno}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh is set appropriately).}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMRhj6ubah}(h]h ]h"]h$]h&]uh1jdhj6ubeh}(h]h ]h"]h$]h&]uh1jMhj5hMShj5ubeh}(h]h ]h"]h$]h&]uh1jHhj5ubah}(h]h ]h"]h$]h&]uh1jdhj5ubeh}(h]h ]h"]h$]h&]uh1jMhj5hMShjJubjN)}(hBPF_LINK_DETACH Description Forcefully detach the specified *link_fd* from its corresponding attachment point. Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_LINK_DETACHh]hBPF_LINK_DETACH}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM\hj6ubje)}(hhh]jI)}(hhh](jN)}(h_Description Forcefully detach the specified *link_fd* from its corresponding attachment point. h](jT)}(h Descriptionh]h Description}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMXhj6ubje)}(hhh]h)}(hRForcefully detach the specified *link_fd* from its corresponding attachment point.h](h Forcefully detach the specified }(hj7hhhNhNubj)}(h *link_fd*h]hlink_fd}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh) from its corresponding attachment point.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMWhj7ubah}(h]h ]h"]h$]h&]uh1jdhj6ubeh}(h]h ]h"]h$]h&]uh1jMhj7hMXhj6ubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hjF7hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj6hM\hjB7ubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hjW7hhhNhNubj)}(h*errno*h]herrno}(hj_7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjW7ubh is set appropriately.}(hjW7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM[hjT7ubah}(h]h ]h"]h$]h&]uh1jdhjB7ubeh}(h]h ]h"]h$]h&]uh1jMhj6hM\hj6ubeh}(h]h ]h"]h$]h&]uh1jHhj6ubah}(h]h ]h"]h$]h&]uh1jdhj6ubeh}(h]h ]h"]h$]h&]uh1jMhj6hM\hjJubjN)}(hX1BPF_PROG_BIND_MAP Description Bind a map to the lifetime of an eBPF program. The map identified by *map_fd* is bound to the program identified by *prog_fd* and only released when *prog_fd* is released. This may be used in cases where metadata should be associated with a program which otherwise does not contain any references to the map (for example, embedded in the eBPF program instructions). Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hBPF_PROG_BIND_MAPh]hBPF_PROG_BIND_MAP}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMkhj7ubje)}(hhh]jI)}(hhh](jN)}(hX{Description Bind a map to the lifetime of an eBPF program. The map identified by *map_fd* is bound to the program identified by *prog_fd* and only released when *prog_fd* is released. This may be used in cases where metadata should be associated with a program which otherwise does not contain any references to the map (for example, embedded in the eBPF program instructions). h](jT)}(h Descriptionh]h Description}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMghj7ubje)}(hhh](h)}(h.Bind a map to the lifetime of an eBPF program.h]h.Bind a map to the lifetime of an eBPF program.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM`hj7ubh)}(hX>The map identified by *map_fd* is bound to the program identified by *prog_fd* and only released when *prog_fd* is released. This may be used in cases where metadata should be associated with a program which otherwise does not contain any references to the map (for example, embedded in the eBPF program instructions).h](hThe map identified by }(hj7hhhNhNubj)}(h*map_fd*h]hmap_fd}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh' is bound to the program identified by }(hj7hhhNhNubj)}(h *prog_fd*h]hprog_fd}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh and only released when }(hj7hhhNhNubj)}(h *prog_fd*h]hprog_fd}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh is released. This may be used in cases where metadata should be associated with a program which otherwise does not contain any references to the map (for example, embedded in the eBPF program instructions).}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMbhj7ubeh}(h]h ]h"]h$]h&]uh1jdhj7ubeh}(h]h ]h"]h$]h&]uh1jMhj7hMghj7ubjN)}(h[Return Returns zero on success. On error, -1 is returned and *errno* is set appropriately. h](jT)}(hReturnh]hReturn}(hj)8hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj7hMkhj%8ubje)}(hhh]h)}(hSReturns zero on success. On error, -1 is returned and *errno* is set appropriately.h](h6Returns zero on success. On error, -1 is returned and }(hj:8hhhNhNubj)}(h*errno*h]herrno}(hjB8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:8ubh is set appropriately.}(hj:8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMjhj78ubah}(h]h ]h"]h$]h&]uh1jdhj%8ubeh}(h]h ]h"]h$]h&]uh1jMhj7hMkhj7ubeh}(h]h ]h"]h$]h&]uh1jHhj7ubah}(h]h ]h"]h$]h&]uh1jdhj7ubeh}(h]h ]h"]h$]h&]uh1jMhj7hMkhjJubjN)}(hXBPF_TOKEN_CREATE Description Create BPF token with embedded information about what BPF-related functionality it allows: - a set of allowed bpf() syscall commands; - a set of allowed BPF map types to be created with BPF_MAP_CREATE command, if BPF_MAP_CREATE itself is allowed; - a set of allowed BPF program types and BPF program attach types to be loaded with BPF_PROG_LOAD command, if BPF_PROG_LOAD itself is allowed. BPF token is created (derived) from an instance of BPF FS, assuming it has necessary delegation mount options specified. This BPF token can be passed as an extra parameter to various bpf() syscall commands to grant BPF subsystem functionality to unprivileged processes. When created, BPF token is "associated" with the owning user namespace of BPF FS instance (super block) that it was derived from, and subsequent BPF operations performed with BPF token would be performing capabilities checks (i.e., CAP_BPF, CAP_PERFMON, CAP_NET_ADMIN, CAP_SYS_ADMIN) within that user namespace. Without BPF token, such capabilities have to be granted in init user namespace, making bpf() syscall incompatible with user namespace, for the most part. Return A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hBPF_TOKEN_CREATEh]hBPF_TOKEN_CREATE}(hj}8hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjy8ubje)}(hhh]jI)}(hhh](jN)}(hXtDescription Create BPF token with embedded information about what BPF-related functionality it allows: - a set of allowed bpf() syscall commands; - a set of allowed BPF map types to be created with BPF_MAP_CREATE command, if BPF_MAP_CREATE itself is allowed; - a set of allowed BPF program types and BPF program attach types to be loaded with BPF_PROG_LOAD command, if BPF_PROG_LOAD itself is allowed. BPF token is created (derived) from an instance of BPF FS, assuming it has necessary delegation mount options specified. This BPF token can be passed as an extra parameter to various bpf() syscall commands to grant BPF subsystem functionality to unprivileged processes. When created, BPF token is "associated" with the owning user namespace of BPF FS instance (super block) that it was derived from, and subsequent BPF operations performed with BPF token would be performing capabilities checks (i.e., CAP_BPF, CAP_PERFMON, CAP_NET_ADMIN, CAP_SYS_ADMIN) within that user namespace. Without BPF token, such capabilities have to be granted in init user namespace, making bpf() syscall incompatible with user namespace, for the most part. h](jT)}(h Descriptionh]h Description}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj8ubje)}(hhh](h)}(hXCreate BPF token with embedded information about what BPF-related functionality it allows: - a set of allowed bpf() syscall commands; - a set of allowed BPF map types to be created with BPF_MAP_CREATE command, if BPF_MAP_CREATE itself is allowed; - a set of allowed BPF program types and BPF program attach types to be loaded with BPF_PROG_LOAD command, if BPF_PROG_LOAD itself is allowed.h]hXCreate BPF token with embedded information about what BPF-related functionality it allows: - a set of allowed bpf() syscall commands; - a set of allowed BPF map types to be created with BPF_MAP_CREATE command, if BPF_MAP_CREATE itself is allowed; - a set of allowed BPF program types and BPF program attach types to be loaded with BPF_PROG_LOAD command, if BPF_PROG_LOAD itself is allowed.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMohj8ubh)}(hX BPF token is created (derived) from an instance of BPF FS, assuming it has necessary delegation mount options specified. This BPF token can be passed as an extra parameter to various bpf() syscall commands to grant BPF subsystem functionality to unprivileged processes.h]hX BPF token is created (derived) from an instance of BPF FS, assuming it has necessary delegation mount options specified. This BPF token can be passed as an extra parameter to various bpf() syscall commands to grant BPF subsystem functionality to unprivileged processes.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMxhj8ubh)}(hXWhen created, BPF token is "associated" with the owning user namespace of BPF FS instance (super block) that it was derived from, and subsequent BPF operations performed with BPF token would be performing capabilities checks (i.e., CAP_BPF, CAP_PERFMON, CAP_NET_ADMIN, CAP_SYS_ADMIN) within that user namespace. Without BPF token, such capabilities have to be granted in init user namespace, making bpf() syscall incompatible with user namespace, for the most part.h]hXWhen created, BPF token is “associated” with the owning user namespace of BPF FS instance (super block) that it was derived from, and subsequent BPF operations performed with BPF token would be performing capabilities checks (i.e., CAP_BPF, CAP_PERFMON, CAP_NET_ADMIN, CAP_SYS_ADMIN) within that user namespace. Without BPF token, such capabilities have to be granted in init user namespace, making bpf() syscall incompatible with user namespace, for the most part.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhM~hj8ubeh}(h]h ]h"]h$]h&]uh1jdhj8ubeh}(h]h ]h"]h$]h&]uh1jMhj8hMhj8ubjN)}(hReturn A new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately). h](jT)}(hReturnh]hReturn}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jShj8hMhj8ubje)}(hhh]h)}(hxA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, *errno* is set appropriately).h](hZA new file descriptor (a nonnegative integer), or -1 if an error occurred (in which case, }(hj8hhhNhNubj)}(h*errno*h]herrno}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh is set appropriately).}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj8ubah}(h]h ]h"]h$]h&]uh1jdhj8ubeh}(h]h ]h"]h$]h&]uh1jMhj8hMhj8ubeh}(h]h ]h"]h$]h&]uh1jHhj8ubah}(h]h ]h"]h$]h&]uh1jdhjy8ubeh}(h]h ]h"]h$]h&]uh1jMhj8hMhjJubjN)}(hXNOTES eBPF objects (maps and programs) can be shared between processes. * After **fork**\ (2), the child inherits file descriptors referring to the same eBPF objects. * File descriptors referring to eBPF objects can be transferred over **unix**\ (7) domain sockets. * File descriptors referring to eBPF objects can be duplicated in the usual way, using **dup**\ (2) and similar calls. * File descriptors referring to eBPF objects can be pinned to the filesystem using the **BPF_OBJ_PIN** command of **bpf**\ (2). An eBPF object is deallocated only after all file descriptors referring to the object have been closed and no references remain pinned to the filesystem or attached (for example, bound to a program or device). h](jT)}(hNOTESh]hNOTES}(hj99hhhNhNubah}(h]h ]h"]h$]h&]uh1jShc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj59ubje)}(hhh](h)}(hAeBPF objects (maps and programs) can be shared between processes.h]hAeBPF objects (maps and programs) can be shared between processes.}(hjK9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjH9ubh)}(hhh](h)}(h\After **fork**\ (2), the child inherits file descriptors referring to the same eBPF objects.h]h)}(h\After **fork**\ (2), the child inherits file descriptors referring to the same eBPF objects.h](hAfter }(hja9hhhNhNubj)}(h**fork**h]hfork}(hji9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhja9ubhN (2), the child inherits file descriptors referring to the same eBPF objects.}(hja9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj]9ubah}(h]h ]h"]h$]h&]uh1hhjZ9ubh)}(h`File descriptors referring to eBPF objects can be transferred over **unix**\ (7) domain sockets.h]h)}(h`File descriptors referring to eBPF objects can be transferred over **unix**\ (7) domain sockets.h](hCFile descriptors referring to eBPF objects can be transferred over }(hj9hhhNhNubj)}(h**unix**h]hunix}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh (7) domain sockets.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj9ubah}(h]h ]h"]h$]h&]uh1hhjZ9ubh)}(htFile descriptors referring to eBPF objects can be duplicated in the usual way, using **dup**\ (2) and similar calls.h]h)}(htFile descriptors referring to eBPF objects can be duplicated in the usual way, using **dup**\ (2) and similar calls.h](hUFile descriptors referring to eBPF objects can be duplicated in the usual way, using }(hj9hhhNhNubj)}(h**dup**h]hdup}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh (2) and similar calls.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj9ubah}(h]h ]h"]h$]h&]uh1hhjZ9ubh)}(h~File descriptors referring to eBPF objects can be pinned to the filesystem using the **BPF_OBJ_PIN** command of **bpf**\ (2). h]h)}(h}File descriptors referring to eBPF objects can be pinned to the filesystem using the **BPF_OBJ_PIN** command of **bpf**\ (2).h](hUFile descriptors referring to eBPF objects can be pinned to the filesystem using the }(hj9hhhNhNubj)}(h**BPF_OBJ_PIN**h]h BPF_OBJ_PIN}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh command of }(hj9hhhNhNubj)}(h**bpf**h]hbpf}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh (2).}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhj9ubah}(h]h ]h"]h$]h&]uh1hhjZ9ubeh}(h]h ]h"]h$]h&]j|j uh1hhj9hMhjH9ubh)}(hAn eBPF object is deallocated only after all file descriptors referring to the object have been closed and no references remain pinned to the filesystem or attached (for example, bound to a program or device).h]hAn eBPF object is deallocated only after all file descriptors referring to the object have been closed and no references remain pinned to the filesystem or attached (for example, bound to a program or device).}(hj!:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/ebpf/syscall:19: ./include/uapi/linux/bpf.hhMhjH9ubeh}(h]h ]h"]h$]h&]uh1jdhj59ubeh}(h]h ]h"]h$]h&]uh1jMhjG9hMhjJubeh}(h]h ]h"]h$]h&]uh1jHhjhhhNhNubh)}(hLinks:h]hLinks:}hjB:sbah}(h]h ]h"]h$]h&]hhuh1hhjhhhhhKubhtarget)}(h4.. _man-pages: https://www.kernel.org/doc/man-pages/h]h}(h] man-pagesah ]h"] man-pagesah$]h&]jjuh1jP:hKhjhhhh referencedKubjQ:)}(h<.. _bpf(2): https://man7.org/linux/man-pages/man2/bpf.2.htmlh]h}(h]bpf-2ah ]h"]bpf(2)ah$]h&]jjuh1jP:hKhjhhhhj^:Kubeh}(h]bpf-subcommand-referenceah ]h"]bpf() subcommand referenceah$]h&]uh1hhhhhhhhKubeh}(h] ebpf-syscallah ]h"] ebpf syscallah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj:error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}( man-pages]jabpf(2)]jaurefids}nameids}(jx:ju:jp:jm:j[:jX:jh:je:u nametypes}(jx:jp:j[:jh:uh}(ju:hjm:jjX:jR:je:j_:u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.