Skip to content

Commit

Permalink
bpf: Sync with latest libbpf repo
Browse files Browse the repository at this point in the history
The sync'ed top libbpf commit:
  c5f22aca0f3a  ci: remove llvm-17 variant of the workflow

Signed-off-by: Yonghong Song <[email protected]>
  • Loading branch information
Yonghong Song committed Nov 23, 2024
1 parent 9713b91 commit 44488b2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
48 changes: 30 additions & 18 deletions src/cc/compat/linux/virtual_bpf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1117,11 +1117,15 @@ enum bpf_attach_type {
BPF_NETKIT_PRIMARY,
BPF_NETKIT_PEER,
BPF_TRACE_KPROBE_SESSION,
BPF_TRACE_UPROBE_SESSION,
__MAX_BPF_ATTACH_TYPE
};

#define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE

/* Add BPF_LINK_TYPE(type, name) in bpf_types.h to keep bpf_link_type_strs[]
* in sync with the definitions below.
*/
enum bpf_link_type {
BPF_LINK_TYPE_UNSPEC = 0,
BPF_LINK_TYPE_RAW_TRACEPOINT = 1,
Expand Down Expand Up @@ -1426,6 +1430,8 @@ enum {
#define BPF_F_TEST_RUN_ON_CPU (1U << 0)
/* If set, XDP frames will be transmitted after processing */
#define BPF_F_TEST_XDP_LIVE_FRAMES (1U << 1)
/* If set, apply CHECKSUM_COMPLETE to skb and validate the checksum */
#define BPF_F_TEST_SKB_CHECKSUM_COMPLETE (1U << 2)

/* type for BPF_ENABLE_STATS */
enum bpf_stats_type {
Expand Down Expand Up @@ -1969,6 +1975,8 @@ union bpf_attr {
* program.
* Return
* The SMP id of the processor running the program.
* Attributes
* __bpf_fastcall
*
* long bpf_skb_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len, u64 flags)
* Description
Expand Down Expand Up @@ -2850,7 +2858,7 @@ union bpf_attr {
* **TCP_SYNCNT**, **TCP_USER_TIMEOUT**, **TCP_NOTSENT_LOWAT**,
* **TCP_NODELAY**, **TCP_MAXSEG**, **TCP_WINDOW_CLAMP**,
* **TCP_THIN_LINEAR_TIMEOUTS**, **TCP_BPF_DELACK_MAX**,
* **TCP_BPF_RTO_MIN**.
* **TCP_BPF_RTO_MIN**, **TCP_BPF_SOCK_OPS_CB_FLAGS**.
* * **IPPROTO_IP**, which supports *optname* **IP_TOS**.
* * **IPPROTO_IPV6**, which supports the following *optname*\ s:
* **IPV6_TCLASS**, **IPV6_AUTOFLOWLABEL**.
Expand Down Expand Up @@ -3100,10 +3108,6 @@ union bpf_attr {
* with the **CONFIG_BPF_KPROBE_OVERRIDE** configuration
* option, and in this case it only works on functions tagged with
* **ALLOW_ERROR_INJECTION** in the kernel code.
*
* Also, the helper is only available for the architectures having
* the CONFIG_FUNCTION_ERROR_INJECTION option. As of this writing,
* x86 architecture is the only one to support this feature.
* Return
* 0
*
Expand Down Expand Up @@ -5368,7 +5372,7 @@ union bpf_attr {
* Currently, the **flags** must be 0. Currently, nr_loops is
* limited to 1 << 23 (~8 million) loops.
*
* long (\*callback_fn)(u32 index, void \*ctx);
* long (\*callback_fn)(u64 index, void \*ctx);
*
* where **index** is the current index in the loop. The index
* is zero-indexed.
Expand Down Expand Up @@ -5518,11 +5522,12 @@ union bpf_attr {
* **-EOPNOTSUPP** if the hash calculation failed or **-EINVAL** if
* invalid arguments are passed.
*
* void *bpf_kptr_xchg(void *map_value, void *ptr)
* void *bpf_kptr_xchg(void *dst, void *ptr)
* Description
* Exchange kptr at pointer *map_value* with *ptr*, and return the
* old value. *ptr* can be NULL, otherwise it must be a referenced
* pointer which will be released when this helper is called.
* Exchange kptr at pointer *dst* with *ptr*, and return the old value.
* *dst* can be map value or local kptr. *ptr* can be NULL, otherwise
* it must be a referenced pointer which will be released when this helper
* is called.
* Return
* The old value of kptr (which can be NULL). The returned pointer
* if not NULL, is a reference which must be released using its
Expand Down Expand Up @@ -6045,11 +6050,6 @@ enum {
BPF_F_MARK_ENFORCE = (1ULL << 6),
};

/* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */
enum {
BPF_F_INGRESS = (1ULL << 0),
};

/* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */
enum {
BPF_F_TUNINFO_IPV6 = (1ULL << 0),
Expand Down Expand Up @@ -6196,10 +6196,12 @@ enum {
BPF_F_BPRM_SECUREEXEC = (1ULL << 0),
};

/* Flags for bpf_redirect_map helper */
/* Flags for bpf_redirect and bpf_redirect_map helpers */
enum {
BPF_F_BROADCAST = (1ULL << 3),
BPF_F_EXCLUDE_INGRESS = (1ULL << 4),
BPF_F_INGRESS = (1ULL << 0), /* used for skb path */
BPF_F_BROADCAST = (1ULL << 3), /* used for XDP path */
BPF_F_EXCLUDE_INGRESS = (1ULL << 4), /* used for XDP path */
#define BPF_F_REDIRECT_FLAGS (BPF_F_INGRESS | BPF_F_BROADCAST | BPF_F_EXCLUDE_INGRESS)
};

#define __bpf_md_ptr(type, name) \
Expand Down Expand Up @@ -7079,6 +7081,7 @@ enum {
TCP_BPF_SYN = 1005, /* Copy the TCP header */
TCP_BPF_SYN_IP = 1006, /* Copy the IP[46] and TCP header */
TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */
TCP_BPF_SOCK_OPS_CB_FLAGS = 1008, /* Get or Set TCP sock ops flags */
};

enum {
Expand Down Expand Up @@ -7511,5 +7514,14 @@ struct bpf_iter_num {
__u64 __opaque[1];
} __attribute__((aligned(8)));

/*
* Flags to control BPF kfunc behaviour.
* - BPF_F_PAD_ZEROS: Pad destination buffer with zeros. (See the respective
* helper documentation for details.)
*/
enum bpf_kfunc_flags {
BPF_F_PAD_ZEROS = (1ULL << 0),
};

#endif /* _UAPI__LINUX_BPF_H__ */
)********"
2 changes: 1 addition & 1 deletion src/cc/libbpf
Submodule libbpf updated 60 files
+0 −31 .github/actions/build-selftests/action.yml
+0 −60 .github/actions/build-selftests/build_selftests.sh
+0 −38 .github/actions/build-selftests/helpers.sh
+0 −5 .github/actions/build-selftests/prepare_selftests-4.9.0.sh
+0 −5 .github/actions/build-selftests/prepare_selftests-5.5.0.sh
+12,051 −5,693 .github/actions/build-selftests/vmlinux.h
+0 −118 .github/actions/vmtest/action.yml
+1 −1 .github/workflows/build.yml
+1 −1 .github/workflows/cifuzz.yml
+18 −23 .github/workflows/ondemand.yml
+0 −20 .github/workflows/pahole.yml
+17 −23 .github/workflows/test.yml
+136 −0 .github/workflows/vmtest.yml
+4 −0 .mailmap
+1 −1 BPF-CHECKPOINT-COMMIT
+1 −1 CHECKPOINT-COMMIT
+0 −69 ci/diffs/0001-arch-Kconfig-Move-SPECULATION_MITIGATIONS-to-arch-Kc.patch
+0 −32 ci/diffs/0001-selftests-bpf-fix-inet_csk_accept-prototype-in-test_.patch
+85 −0 ci/diffs/0001-selftests-bpf-set-test-path-for-token-obj_priv_impli.patch
+0 −56 ci/diffs/0002-xdp-bonding-Fix-feature-flags-when-there-are-no-slav.patch
+1 −0 ci/vmtest/configs/DENYLIST
+12 −0 ci/vmtest/prepare-selftests-LATEST.sh
+47 −0 ci/vmtest/prepare-selftests-run.sh
+2 −0 ci/vmtest/run_selftests.sh
+26 −4 docs/program_types.rst
+30 −18 include/uapi/linux/bpf.h
+4 −0 include/uapi/linux/if_xdp.h
+13 −0 include/uapi/linux/netdev.h
+4 −2 include/uapi/linux/perf_event.h
+4 −4 src/Makefile
+1 −0 src/bpf.c
+2 −2 src/bpf.h
+1 −0 src/bpf_gen_internal.h
+16 −11 src/bpf_helper_defs.h
+2 −1 src/bpf_helpers.h
+16 −9 src/bpf_tracing.h
+729 −279 src/btf.c
+40 −1 src/btf.h
+10 −7 src/btf_dump.c
+177 −0 src/btf_iter.c
+519 −0 src/btf_relocate.c
+4 −3 src/elf.c
+6 −9 src/features.c
+137 −53 src/gen_loader.c
+10 −10 src/hashmap.h
+394 −326 src/libbpf.c
+34 −6 src/libbpf.h
+10 −0 src/libbpf.map
+68 −4 src/libbpf_internal.h
+2 −2 src/libbpf_legacy.h
+1 −1 src/libbpf_version.h
+127 −51 src/linker.c
+1 −1 src/relo_core.c
+18 −16 src/ringbuf.c
+3 −2 src/skel_internal.h
+71 −0 src/str_error.c
+7 −0 src/str_error.h
+1 −1 src/usdt.bpf.h
+17 −15 src/usdt.c
+1 −1 src/zip.c

0 comments on commit 44488b2

Please sign in to comment.