Lines Matching +full:fn +full:- +full:keymap

1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 /* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
21 #define BPF_DW 0x18 /* double word (64-bit) */
22 #define BPF_ATOMIC 0xc0 /* atomic memory ops - op type in immediate */
23 #define BPF_XADD 0xc0 /* exclusive add - legacy name */
31 #define BPF_TO_LE 0x00 /* convert to little-endian */
32 #define BPF_TO_BE 0x08 /* convert to big-endian */
50 #define BPF_CMPXCHG (0xf0 | BPF_FETCH) /* atomic compare-and-write */
68 /* BPF has 10 general purpose 64-bit registers and stack frame. */
96 /* BPF syscall commands, see bpf(2) man-page for more details. */
111 * map. The close-on-exec file descriptor flag (see **fcntl**\ (2))
118 * A new file descriptor (a nonnegative integer), or -1 if an
130 * Look up the value of a spin-locked map without
135 * Returns zero on success. On error, -1 is returned and *errno*
152 * Update a spin_lock-ed map element.
155 * Returns zero on success. On error, -1 is returned and *errno*
176 * Returns zero on success. On error, -1 is returned and *errno*
186 * Returns zero on success. On error, -1 is returned and *errno*
196 * * If *key* is the last element, returns -1 and *errno* is set
210 * The close-on-exec file descriptor flag (see **fcntl**\ (2)) is
214 * A new file descriptor (a nonnegative integer), or -1 if an
239 * Returns zero on success. On error, -1 is returned and *errno*
248 * A new file descriptor (a nonnegative integer), or -1 if an
294 * Returns zero on success. On error, -1 is returned and *errno*
304 * Returns zero on success. On error, -1 is returned and *errno*
334 * Returns zero on success. On error, -1 is returned and *errno*
349 * remain with ids higher than *start_id*, returns -1 and sets
353 * Returns zero on success. On error, or when no id remains, -1
362 * remain with ids higher than *start_id*, returns -1 and sets
366 * Returns zero on success. On error, or when no id remains, -1
375 * A new file descriptor (a nonnegative integer), or -1 if an
384 * A new file descriptor (a nonnegative integer), or -1 if an
402 * Returns zero on success. On error, -1 is returned and *errno*
448 * Returns zero on success. On error, -1 is returned and *errno*
466 * A new file descriptor (a nonnegative integer), or -1 if an
489 * A new file descriptor (a nonnegative integer), or -1 if an
498 * A new file descriptor (a nonnegative integer), or -1 if an
519 * Returns zero on success. On error, -1 is returned and *errno*
532 * Look up and delete the value of a spin-locked map
551 * Returns zero on success. On error, -1 is returned and *errno*
566 * Returns zero on success. On error, -1 is returned and *errno*
576 * remain with ids higher than *start_id*, returns -1 and sets
580 * Returns zero on success. On error, or when no id remains, -1
604 * Look up the value of a spin-locked map without
616 * Returns zero on success. On error, -1 is returned and *errno*
621 * iteration of a hash-based map type.
638 * Returns zero on success. On error, -1 is returned and *errno*
665 * Update spin_lock-ed map elements. This must be
674 * Returns zero on success. On error, -1 is returned and *errno*
708 * Look up the value of a spin-locked map without
720 * Returns zero on success. On error, -1 is returned and *errno*
730 * A new file descriptor (a nonnegative integer), or -1 if an
739 * Returns zero on success. On error, -1 is returned and *errno*
748 * A new file descriptor (a nonnegative integer), or -1 if an
757 * remain with ids higher than *start_id*, returns -1 and sets
761 * Returns zero on success. On error, or when no id remains, -1
776 * disabled system-wide when all outstanding file descriptors
780 * A new file descriptor (a nonnegative integer), or -1 if an
795 * A new file descriptor (a nonnegative integer), or -1 if an
804 * Returns zero on success. On error, -1 is returned and *errno*
819 * Returns zero on success. On error, -1 is returned and *errno*
1015 /* cgroup-bpf attach flags used in BPF_PROG_ATTACH command
1019 * BPF_F_ALLOW_OVERRIDE: If a sub-cgroup installs some bpf program,
1020 * the program in this cgroup yields to sub-cgroup program.
1022 * BPF_F_ALLOW_MULTI: If a sub-cgroup installs some bpf program,
1033 * The programs of sub-cgroup are executed first, then programs of
1043 * A cgroup with MULTI or OVERRIDE flag allows any attach flags in sub-cgroups.
1044 * A cgroup with NONE doesn't allow any programs in sub-cgroups.
1046 * cgrp1 (MULTI progs A, B) ->
1047 * cgrp2 (OVERRIDE prog C) ->
1048 * cgrp3 (MULTI prog D) ->
1049 * cgrp4 (OVERRIDE prog E) ->
1085 * Verifier does sub-register def/use analysis and identifies instructions whose
1086 * def only matters for low 32-bit, high 32-bit is never referenced later
1087 * through implicit zero extension. Therefore verifier notifies JIT back-ends
1088 * that it is safe to ignore clearing high 32-bit for these instructions. This
1089 * saves some back-ends a lot of code-gen. However such optimization is not
1090 * necessary on some arches, for example x86_64, arm64 etc, whose JIT back-ends
1096 * 32-bit for those instructions who has been identified as safe to ignore them.
1158 /* when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative
1162 /* when bpf_call->src_reg == BPF_PSEUDO_KFUNC_CALL,
1163 * bpf_call->imm == btf_id of a BTF_KIND_FUNC in the running kernel
1172 BPF_F_LOCK = 4, /* spin_lock-ed map_lookup/map_update */
1195 /* Zero-initialize hash function seed. This should only be used for testing. */
1205 /* Enable memory-mapping BPF map */
1273 __u32 btf_vmlinux_value_type_id;/* BTF type_id of a kernel-
1330 __u32 attach_btf_id; /* in-kernel BTF type id to attach to */
1452 /* black box user-provided value passed through
1498 * --filename include/uapi/linux/bpf.h > /tmp/bpf-helpers.rst
1499 * $ rst2man /tmp/bpf-helpers.rst > /tmp/bpf-helpers.7
1500 * $ man /tmp/bpf-helpers.7
1560 * This helper is a "printk()-like" facility for debugging. It
1578 * telnet-470 [001] .N.. 419421.045894: 0x00000001: <formatted msg>
1603 * helper will return **-EINVAL** (but print nothing) if it
1619 * Get a pseudo-random number.
1622 * pseudo-random internal state, and cannot be used to infer the
1627 * A random 32-bit unsigned value.
1644 * **BPF_F_INVALIDATE_HASH** (set *skb*\ **->hash**, *skb*\
1645 * **->swhash** and *skb*\ **->l4hash** to 0).
1668 * which does not update the checksum in-place, but offers more
1697 * the checksum is to be computed against a pseudo-header.
1700 * which does not update the checksum in-place, but offers more
1769 * A 64-bit integer containing the current tgid and pid, and
1771 * *current_task*\ **->tgid << 32 \|**
1772 * *current_task*\ **->pid**.
1776 * A 64-bit integer containing the current GID and UID, and
1785 * helper makes sure that the *buf* is NUL-terminated. On failure,
1798 * based on a user-provided identifier for all traffic coming from
1801 * *Documentation/admin-guide/cgroup-v1/net_cls.rst*.
1807 * run on cgroups, which is a cgroup-v2-only feature (a socket can
1859 * in *key*\ **->remote_ipv4** or *key*\ **->remote_ipv6**. Also,
1860 * this struct exposes the *key*\ **->tunnel_id**, which is
1988 * identifier retrieved is a user-provided tag, similar to the
1994 * (see also **tc-bpf(8)**), or alternatively on conventional
2062 * manipulated with *skb*\ **->data** and *skb*\ **->data_end**
2093 * generating a variety of graphs (such as flame graphs or off-cpu
2151 * and retrieving arbitrary TLVs (Type-Length-Value headers) from
2197 * comes down to setting *skb*\ **->pkt_type** to *type*, except
2199 * **->pkt_type** beside this helper. Using a helper here allows
2234 * Retrieve the hash of the packet, *skb*\ **->hash**. If it is
2237 * directly with *skb*\ **->hash**.
2246 * The 32-bit hash.
2259 * security mechanism because of TOC-TOU attacks, but rather to
2260 * debug, divert, and manipulate execution of semi-cooperative
2309 * Pull in non-linear data in case the *skb* is non-linear and not
2318 * are within packet boundaries (test on *skb*\ **->data_end**) is
2320 * data is in non-linear parts of the *skb*. On failure the
2321 * program can just bail out, or in the case of a non-linear
2325 * to pull in once the non-linear parts, then retesting and
2345 * Add the checksum *csum* into *skb*\ **->csum** in case the
2357 * Invalidate the current *skb*\ **->hash**. It can be used after
2397 * Adjust (move) *xdp_md*\ **->data** by *delta* bytes. Note that
2433 * A 8-byte long unique number on success, or 0 if the socket
2441 * A 8-byte long unique number.
2448 * A 8-byte long unique number.
2456 * A 8-byte long unique number or 0 if *sk* is NULL.
2462 * time-wait or a request socket instead), **overflowuid** value
2468 * Set the full hash for *skb* (set the field *skb*\ **->hash**)
2611 * Adjust the address pointed by *xdp_md*\ **->data_meta** by
2613 * operation modifies the address stored in *xdp_md*\ **->data**,
2617 * The use of *xdp_md*\ **->data_meta** is optional and programs
2623 * this up for further post-processing. Since TC works with socket
2657 * **->enabled** and *buf*\ **->running**, respectively) are
2777 * **bpf_sock->bpf_sock_ops_cb_flags & ~BPF_SOCK_OPS_RTO_CB_FLAG)**
2788 * Code **-EINVAL** if the socket is not a full TCP socket;
2828 * *bytes* will be sent and the eBPF program will be re-run with
2836 * a non-zero value, this is not a problem because data is not
2851 * 1-byte long message segments. Obviously, this is bad for
2861 * For socket policies, pull in non-linear data from user space
2862 * for *msg* and set pointers *msg*\ **->data** and *msg*\
2863 * **->data_end** to *start* and *end* bytes offsets into *msg*,
2899 * domain (*addr*\ **->sa_family**) must be **AF_INET** (or
2901 * or **sin6_port**) which triggers IP_BIND_ADDRESS_NO_PORT-like
2903 * port as long as 4-tuple is unique. Passing non-zero port might
2910 * Adjust (move) *xdp_md*\ **->data_end** by *delta* bytes. It is
2925 * **ip-xfrm(8)**) at *index* in XFRM "security path" for *skb*.
2968 * A non-negative value equal to or less than *size* on success,
2987 * in socket filters where *skb*\ **->data** does not always point
3025 * was exceeded and output params->mtu_result contains the MTU.
3150 * End.X action: Endpoint with Layer-3 cross-connect.
3195 * translated to a keycode using the rc keymap, and reported as
3224 * to the same 64-bit id.
3234 * A 64-bit integer containing the current cgroup id based
3286 * and if non-**NULL**, released via **bpf_sk_release**\ ().
3294 * **sizeof**\ (*tuple*\ **->ipv4**)
3296 * **sizeof**\ (*tuple*\ **->ipv6**)
3299 * If the *netns* is a negative signed 32-bit integer, then the
3303 * If *netns* is any other signed 32-bit value greater than or
3306 * range of 32-bit integers are reserved for future use.
3316 * result is from *reuse*\ **->socks**\ [] using the hash of the
3323 * and if non-**NULL**, released via **bpf_sk_release**\ ().
3331 * **sizeof**\ (*tuple*\ **->ipv4**)
3333 * **sizeof**\ (*tuple*\ **->ipv6**)
3336 * If the *netns* is a negative signed 32-bit integer, then the
3340 * If *netns* is any other signed 32-bit value greater than or
3343 * range of 32-bit integers are reserved for future use.
3353 * result is from *reuse*\ **->socks**\ [] using the hash of the
3359 * non-**NULL** pointer that was returned from
3449 * allowed inside a spinlock-ed region.
3472 * * **bpf_spin_lock** is not allowed in inner maps of map-in-map.
3521 * and if non-**NULL**, released via **bpf_sk_release**\ ().
3533 * result is from *reuse*\ **->socks**\ [] using the hash of the
3556 * The buffer is always NUL terminated, unless it's zero-sized.
3564 * **-E2BIG** if the buffer wasn't big enough (*buf* will contain
3576 * The buffer is always NUL terminated, unless it's zero-sized.
3580 * **-E2BIG** if the buffer wasn't big enough (*buf* will contain
3583 * **-EINVAL** if current value was unavailable, e.g. because
3584 * sysctl is uninitialized and read returns -EIO for it.
3594 * The buffer is always NUL terminated, unless it's zero-sized.
3598 * **-E2BIG** if the buffer wasn't big enough (*buf* will contain
3601 * **-EINVAL** if sysctl is being read.
3616 * **-E2BIG** if the *buf_len* is too big.
3618 * **-EINVAL** if sysctl is being read.
3628 * optional '**-**' sign.
3639 * **-EINVAL** if no valid digits were found or unsupported base
3642 * **-ERANGE** if resulting value was out of range.
3662 * **-EINVAL** if no valid digits were found or unsupported base
3665 * **-ERANGE** if resulting value was out of range.
3669 * Get a bpf-local-storage from a *sk*.
3679 * the *map*. The *map* is used as the bpf-local-storage
3680 * "type". The bpf-local-storage "type" (i.e. the *map*) is
3681 * searched against all bpf-local-storages residing at *sk*.
3687 * used such that a new bpf-local-storage will be
3690 * the initial value of a bpf-local-storage. If *value* is
3691 * **NULL**, the new bpf-local-storage will be zero initialized.
3693 * A bpf-local-storage pointer is returned on success.
3696 * a new bpf-local-storage.
3700 * Delete a bpf-local-storage from a *sk*.
3704 * **-ENOENT** if the bpf-local-storage cannot be found.
3705 * **-EINVAL** if sk is not a fullsock (e.g. a request_sock).
3714 * **-EBUSY** if work queue under nmi is full.
3716 * **-EINVAL** if *sig* is invalid.
3718 * **-EPERM** if no permission to send the *sig*.
3720 * **-EAGAIN** if bpf program can try again.
3740 * **-EINVAL** SYN cookie cannot be issued due to error
3742 * **-ENOENT** SYN cookie should not be issued (no SYN flood)
3744 * **-EOPNOTSUPP** kernel configuration does not enable SYN cookies
3746 * **-EPROTONOSUPPORT** IP packet version is not 4 or 6
3765 * *ctx* is a pointer to in-kernel struct sk_buff.
3792 * string length is larger than *size*, just *size*-1 bytes are
3807 * ctx->di);
3822 * *current*\ **->mm->arg_start** and *current*\
3823 * **->mm->env_start**: using this helper and the return value,
3840 * Send out a tcp-ack. *tp* is the in-kernel struct **tcp_sock**.
3851 * **-EBUSY** if work queue under nmi is full.
3853 * **-EINVAL** if *sig* is invalid.
3855 * **-EPERM** if no permission to send the *sig*.
3857 * **-EAGAIN** if bpf program can try again.
3879 * **-EINVAL** if arguments invalid or **size** not a multiple
3882 * **-ENOENT** if architecture does not support branch records.
3891 * **-EINVAL** if dev and inum supplied don't match dev_t and inode number
3894 * **-ENOENT** if pidns does not exists for the current task.
3913 * *ctx* is a pointer to in-kernel struct xdp_buff.
3931 * A 8-byte long opaque number.
3970 * **-EINVAL** if specified *flags* are not supported.
3972 * **-ENOENT** if the socket is unavailable for assignment.
3974 * **-ENETUNREACH** if the socket is unreachable (wrong netns).
3976 * **-EOPNOTSUPP** if the operation is not supported, for example
3979 * **-ESOCKTNOSUPPORT** if the socket type is not supported
3995 * that are not v6-only can be selected for IPv4 packets.
4008 * load-balancing within reuseport group for the socket
4011 * On success *ctx->sk* will point to the selected socket.
4016 * * **-EAFNOSUPPORT** if socket family (*sk->family*) is
4017 * not compatible with packet family (*ctx->family*).
4019 * * **-EEXIST** if socket has been already selected,
4023 * * **-EINVAL** if unsupported flags were specified.
4025 * * **-EPROTOTYPE** if socket L4 protocol
4026 * (*sk->protocol*) doesn't match packet protocol
4027 * (*ctx->protocol*).
4029 * * **-ESOCKTNOSUPPORT** if socket is not in allowed
4060 * **-EBUSY** if per-CPU memory copy buffer is busy, can try again
4063 * **-EINVAL** if arguments are invalid, or if *fmt* is invalid/unsupported.
4065 * **-E2BIG** if *fmt* contains too many format specifiers.
4067 * **-EOVERFLOW** if an overflow happened: The same object will be tried again.
4077 * **-EOVERFLOW** if an overflow happened: The same object will be tried again.
4083 * *sk* must be a non-**NULL** pointer to a socket, e.g. one
4121 * An adaptive notification is a notification sent whenever the user-space
4122 * process has caught up and consumed all available payloads. In case the user-space
4199 * * **BPF_CSUM_LEVEL_INC**: Increases skb->csum_level for skbs
4201 * * **BPF_CSUM_LEVEL_DEC**: Decreases skb->csum_level for skbs
4203 * * **BPF_CSUM_LEVEL_RESET**: Resets skb->csum_level to 0 and
4205 * * **BPF_CSUM_LEVEL_QUERY**: No-op, returns the current
4206 * skb->csum_level.
4209 * case of **BPF_CSUM_LEVEL_QUERY**, the current skb->csum_level
4210 * is returned or the error code -EACCES in case the skb is not
4272 * A non-negative value equal to or less than *size* on success,
4281 * *skops*\ **->skb_data**. The comment in **struct bpf_sock_ops**
4283 * *skops*\ **->op**.
4293 * the 2nd byte which is "kind-length" of a TCP
4294 * header option and the "kind-length" also
4295 * includes the first 2 bytes "kind" and "kind-length"
4304 * Note, kind-length must be 0 for regular option.
4306 * Searching for No-Op (0) and End-of-Option-List (1) are
4315 * saved_syn packet or the just-received syn packet.
4322 * **-EINVAL** if a parameter is invalid.
4324 * **-ENOMSG** if the option is not found.
4326 * **-ENOENT** if no syn packet is available when
4329 * **-ENOSPC** if there is not enough space. Only *len* number of
4332 * **-EFAULT** on failure to parse the header options in the
4335 * **-EPERM** if the helper cannot be used under the current
4336 * *skops*\ **->op**.
4344 * includes the kind, kind-length, and the actual
4345 * option data. The *len* must be at least kind-length
4346 * long. The kind-length does not have to be 4 byte
4348 * and setting the 4 bytes aligned value to th->doff.
4359 * **-EINVAL** If param is invalid.
4361 * **-ENOSPC** if there is not enough space in the header.
4364 * **-EEXIST** if the option already exists.
4366 * **-EFAULT** on failrue to parse the existing header options.
4368 * **-EPERM** if the helper cannot be used under the current
4369 * *skops*\ **->op**.
4386 * **-EINVAL** if a parameter is invalid.
4388 * **-ENOSPC** if there is not enough space in the header.
4390 * **-EPERM** if the helper cannot be used under the current
4391 * *skops*\ **->op**.
4405 * the *map*. The *map* is used as the bpf-local-storage
4406 * "type". The bpf-local-storage "type" (i.e. the *map*) is
4427 * **-ENOENT** if the bpf_local_storage cannot be found.
4450 * Use BTF to store a string representation of *ptr*->ptr in *str*,
4451 * using *ptr*->type_id. This value should specify the type
4452 * that *ptr*->ptr points to. LLVM __builtin_btf_type_id(type, 1)
4455 * stored in the first *str_size* - 1 bytes of *str*. Safe copy of
4476 * show zero-valued struct/union members; they
4487 * *ptr*->ptr, using *ptr*->type_id as per bpf_snprintf_btf().
4579 * the *map*. The *map* is used as the bpf-local-storage
4580 * "type". The bpf-local-storage "type" (i.e. the *map*) is
4601 * **-ENOENT** if the bpf_local_storage cannot be found.
4619 * **-EINVAL** if invalid *flags* are passed, zero otherwise.
4623 * Return a coarse-grained version of the time elapsed since
4638 * **-EOPNOTSUP** if IMA is disabled or **-EINVAL** if
4660 * failure. Other BPF-helpers are needed for performing the
4673 * this value is L3 as this correlate to MTU and IP-header tot_len
4692 * possible for the skb packet to get re-segmented
4702 * MTU value in your BPF-code.
4719 * **map**, **callback_ctx** and other map-specific parameters.
4742 * The number of traversed map elements for success, **-EINVAL** for
4748 * based on a format string stored in a read-only map pointed by
4768 * be zero-terminated except when **str_size** is 0.
4770 * Or **-EBUSY** if the per-CPU memory copy buffer is busy.
4800 * **-EBUSY** if *timer* is already initialized.
4801 * **-EINVAL** if invalid *flags* are passed.
4802 * **-EPERM** if *timer* is in a map that doesn't have any user references.
4812 * **-EINVAL** if *timer* was not initialized with bpf_timer_init() earlier.
4813 * **-EPERM** if *timer* is in a map that doesn't have any user references.
4829 * decremented. This is done to make sure that Ctrl-C of a user
4831 * bpffs the callback_fn can re-arm itself indefinitely.
4834 * The map can contain timers that invoke callback_fn-s from different
4841 * **-EINVAL** if *timer* was not initialized with bpf_timer_init() earlier
4850 * **-EINVAL** if *timer* was not initialized with bpf_timer_init() earlier.
4851 * **-EDEADLK** if callback_fn tried to call bpf_timer_cancel() on its
4868 * - kprobe/uprobe;
4869 * - tracepoint;
4870 * - perf_event.
4881 #define __BPF_FUNC_MAPPER(FN) \ argument
4882 FN(unspec), \
4883 FN(map_lookup_elem), \
4884 FN(map_update_elem), \
4885 FN(map_delete_elem), \
4886 FN(probe_read), \
4887 FN(ktime_get_ns), \
4888 FN(trace_printk), \
4889 FN(get_prandom_u32), \
4890 FN(get_smp_processor_id), \
4891 FN(skb_store_bytes), \
4892 FN(l3_csum_replace), \
4893 FN(l4_csum_replace), \
4894 FN(tail_call), \
4895 FN(clone_redirect), \
4896 FN(get_current_pid_tgid), \
4897 FN(get_current_uid_gid), \
4898 FN(get_current_comm), \
4899 FN(get_cgroup_classid), \
4900 FN(skb_vlan_push), \
4901 FN(skb_vlan_pop), \
4902 FN(skb_get_tunnel_key), \
4903 FN(skb_set_tunnel_key), \
4904 FN(perf_event_read), \
4905 FN(redirect), \
4906 FN(get_route_realm), \
4907 FN(perf_event_output), \
4908 FN(skb_load_bytes), \
4909 FN(get_stackid), \
4910 FN(csum_diff), \
4911 FN(skb_get_tunnel_opt), \
4912 FN(skb_set_tunnel_opt), \
4913 FN(skb_change_proto), \
4914 FN(skb_change_type), \
4915 FN(skb_under_cgroup), \
4916 FN(get_hash_recalc), \
4917 FN(get_current_task), \
4918 FN(probe_write_user), \
4919 FN(current_task_under_cgroup), \
4920 FN(skb_change_tail), \
4921 FN(skb_pull_data), \
4922 FN(csum_update), \
4923 FN(set_hash_invalid), \
4924 FN(get_numa_node_id), \
4925 FN(skb_change_head), \
4926 FN(xdp_adjust_head), \
4927 FN(probe_read_str), \
4928 FN(get_socket_cookie), \
4929 FN(get_socket_uid), \
4930 FN(set_hash), \
4931 FN(setsockopt), \
4932 FN(skb_adjust_room), \
4933 FN(redirect_map), \
4934 FN(sk_redirect_map), \
4935 FN(sock_map_update), \
4936 FN(xdp_adjust_meta), \
4937 FN(perf_event_read_value), \
4938 FN(perf_prog_read_value), \
4939 FN(getsockopt), \
4940 FN(override_return), \
4941 FN(sock_ops_cb_flags_set), \
4942 FN(msg_redirect_map), \
4943 FN(msg_apply_bytes), \
4944 FN(msg_cork_bytes), \
4945 FN(msg_pull_data), \
4946 FN(bind), \
4947 FN(xdp_adjust_tail), \
4948 FN(skb_get_xfrm_state), \
4949 FN(get_stack), \
4950 FN(skb_load_bytes_relative), \
4951 FN(fib_lookup), \
4952 FN(sock_hash_update), \
4953 FN(msg_redirect_hash), \
4954 FN(sk_redirect_hash), \
4955 FN(lwt_push_encap), \
4956 FN(lwt_seg6_store_bytes), \
4957 FN(lwt_seg6_adjust_srh), \
4958 FN(lwt_seg6_action), \
4959 FN(rc_repeat), \
4960 FN(rc_keydown), \
4961 FN(skb_cgroup_id), \
4962 FN(get_current_cgroup_id), \
4963 FN(get_local_storage), \
4964 FN(sk_select_reuseport), \
4965 FN(skb_ancestor_cgroup_id), \
4966 FN(sk_lookup_tcp), \
4967 FN(sk_lookup_udp), \
4968 FN(sk_release), \
4969 FN(map_push_elem), \
4970 FN(map_pop_elem), \
4971 FN(map_peek_elem), \
4972 FN(msg_push_data), \
4973 FN(msg_pop_data), \
4974 FN(rc_pointer_rel), \
4975 FN(spin_lock), \
4976 FN(spin_unlock), \
4977 FN(sk_fullsock), \
4978 FN(tcp_sock), \
4979 FN(skb_ecn_set_ce), \
4980 FN(get_listener_sock), \
4981 FN(skc_lookup_tcp), \
4982 FN(tcp_check_syncookie), \
4983 FN(sysctl_get_name), \
4984 FN(sysctl_get_current_value), \
4985 FN(sysctl_get_new_value), \
4986 FN(sysctl_set_new_value), \
4987 FN(strtol), \
4988 FN(strtoul), \
4989 FN(sk_storage_get), \
4990 FN(sk_storage_delete), \
4991 FN(send_signal), \
4992 FN(tcp_gen_syncookie), \
4993 FN(skb_output), \
4994 FN(probe_read_user), \
4995 FN(probe_read_kernel), \
4996 FN(probe_read_user_str), \
4997 FN(probe_read_kernel_str), \
4998 FN(tcp_send_ack), \
4999 FN(send_signal_thread), \
5000 FN(jiffies64), \
5001 FN(read_branch_records), \
5002 FN(get_ns_current_pid_tgid), \
5003 FN(xdp_output), \
5004 FN(get_netns_cookie), \
5005 FN(get_current_ancestor_cgroup_id), \
5006 FN(sk_assign), \
5007 FN(ktime_get_boot_ns), \
5008 FN(seq_printf), \
5009 FN(seq_write), \
5010 FN(sk_cgroup_id), \
5011 FN(sk_ancestor_cgroup_id), \
5012 FN(ringbuf_output), \
5013 FN(ringbuf_reserve), \
5014 FN(ringbuf_submit), \
5015 FN(ringbuf_discard), \
5016 FN(ringbuf_query), \
5017 FN(csum_level), \
5018 FN(skc_to_tcp6_sock), \
5019 FN(skc_to_tcp_sock), \
5020 FN(skc_to_tcp_timewait_sock), \
5021 FN(skc_to_tcp_request_sock), \
5022 FN(skc_to_udp6_sock), \
5023 FN(get_task_stack), \
5024 FN(load_hdr_opt), \
5025 FN(store_hdr_opt), \
5026 FN(reserve_hdr_opt), \
5027 FN(inode_storage_get), \
5028 FN(inode_storage_delete), \
5029 FN(d_path), \
5030 FN(copy_from_user), \
5031 FN(snprintf_btf), \
5032 FN(seq_printf_btf), \
5033 FN(skb_cgroup_classid), \
5034 FN(redirect_neigh), \
5035 FN(per_cpu_ptr), \
5036 FN(this_cpu_ptr), \
5037 FN(redirect_peer), \
5038 FN(task_storage_get), \
5039 FN(task_storage_delete), \
5040 FN(get_current_task_btf), \
5041 FN(bprm_opts_set), \
5042 FN(ktime_get_coarse_ns), \
5043 FN(ima_inode_hash), \
5044 FN(sock_from_file), \
5045 FN(check_mtu), \
5046 FN(for_each_map_elem), \
5047 FN(snprintf), \
5048 FN(sys_bpf), \
5049 FN(btf_find_by_name_kind), \
5050 FN(sys_close), \
5051 FN(timer_init), \
5052 FN(timer_set_callback), \
5053 FN(timer_start), \
5054 FN(timer_cancel), \
5055 FN(get_func_ip), \
5056 FN(get_attach_cookie), \
5057 FN(task_pt_regs), \
5132 BPF_F_CURRENT_NETNS = (-1L),
5247 /* user accessible mirror of in-kernel sk_buff.
5301 /* user accessible mirror of in-kernel xfrm_state.
5316 * The values are binary compatible with their TC_ACT_* counter-part to
5326 /* 3-6 reserved */
5446 __u32 ingress_ifindex; /* rxq->dev->ifindex */
5447 __u32 rx_queue_index; /* rxq->queue_index */
5449 __u32 egress_ifindex; /* txq->dev->ifindex */
5452 /* DEVMAP map-value layout
5454 * The struct data-layout of map-value is a configuration interface.
5465 /* CPUMAP map-value layout
5467 * The struct data-layout of map-value is a configuration interface.
5512 * Note that the directly accessible bytes (data_end - data)
5525 /* When reuse->migrating_sk is NULL, it is selecting a sk for the
5527 * the received SYN in the TCP case). reuse->sk is one of the sk
5528 * in the reuseport group. The bpf prog can use reuse->sk to learn
5531 * When reuse->migrating_sk is not NULL, reuse->sk is closed and
5532 * reuse->migrating_sk is the socket that needs to be migrated
5534 * sk that is fully established or a reqsk that is in-the-middle
5535 * of 3-way handshake.
5650 __u32 user_family; /* Allows 4-byte read, but no write. */
5651 __u32 user_ip4; /* Allows 1,2,4-byte read and 4-byte write.
5654 __u32 user_ip6[4]; /* Allows 1,2,4,8-byte read and 4,8-byte write.
5657 __u32 user_port; /* Allows 1,2,4-byte read and 4-byte write.
5660 __u32 family; /* Allows 4-byte read, but no write */
5661 __u32 type; /* Allows 4-byte read, but no write */
5662 __u32 protocol; /* Allows 4-byte read, but no write */
5663 __u32 msg_src_ip4; /* Allows 1,2,4-byte read and 4-byte write.
5666 __u32 msg_src_ip6[4]; /* Allows 1,2,4,8-byte read and 4,8-byte write.
5761 * called under sock_ops->op == BPF_SOCK_OPS_PARSE_HDR_OPT_CB
5769 * mode and required the active side to resend the bpf-written
5770 * options. The active side can keep writing the bpf-options until
5781 * sock_ops->op == BPF_SOCK_OPS_PARSE_HDR_OPT_CB.
5791 * sock_ops->op == BPF_SOCK_OPS_HDR_OPT_LEN_CB. Then
5793 * under sock_ops->op == BPF_SOCK_OPS_WRITE_HDR_OPT_CB.
5812 BPF_SOCK_OPS_TIMEOUT_INIT, /* Should return SYN-RTO value to use or
5813 * -1 if default value should be used
5816 * window (in packets) or -1 if default
5866 * sock_ops->skb_data:
5880 * sock_ops->skb_data:
5884 * sock_ops->skb_tcp_flags:
5895 * sock_ops->skb_data:
5900 * earlier bpf-progs.
5902 * sock_ops->skb_tcp_flags:
5915 * earlier bpf-progs.
5953 * 1. the just-received SYN packet (only available when writing the
5967 * If the bpf-prog does not need the IP[46] header, the
5968 * bpf-prog can avoid parsing the IP header by using
5969 * TCP_BPF_SYN. Otherwise, the bpf-prog can get both
5973 * -ENOSPC: Not enough space in optval. Only optlen number of
5975 * -ENOENT: The SYN skb is not available now and the earlier SYN pkt
6057 /* set if lookup is to consider L4 data - e.g., FIB rules */
6064 __u16 tot_len; /* L3 length from network hdr (iph->tot_len) */
6122 BPF_MTU_CHK_RET_SEGS_TOOBIG, /* GSO re-segmentation needed to fwd */
6191 * Allows 1,2,4-byte read, but no write.
6194 * Allows 1,2,4-byte read an 4-byte write.
6218 __u64 cookie; /* Non-zero if socket was selected in PROG_TEST_RUN */
6234 * via the bpf_snprintf_btf() helper described above. A flags field -
6236 * (rather than its mode of display) - is included for future use.
6237 * Display flags - BTF_F_* - are passed to bpf_snprintf_btf separately.
6247 * - BTF_F_COMPACT: no formatting around type information
6248 * - BTF_F_NONAME: no struct/union member names/types
6249 * - BTF_F_PTR_RAW: show raw (unobfuscated) pointer values;
6251 * - BTF_F_ZERO: show zero-valued struct/union members; they