mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-17 23:09:09 +08:00
Compare commits
8 Commits
v0.5.0
...
v0.4.0_net
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aea40f7179 | ||
|
|
54a7bc87d5 | ||
|
|
9979463ccf | ||
|
|
b91ca01922 | ||
|
|
8ded7c6db0 | ||
|
|
7df4ea0f0d | ||
|
|
02333ba360 | ||
|
|
6921017d25 |
@@ -1 +1 @@
|
||||
47bb27a20d6ea22cd092c1fc2bb4fcecac374838
|
||||
d20b41115ad53293201cc07ee429a38740cb056b
|
||||
|
||||
@@ -84,7 +84,7 @@ struct bpf_lpm_trie_key {
|
||||
|
||||
struct bpf_cgroup_storage_key {
|
||||
__u64 cgroup_inode_id; /* cgroup inode id */
|
||||
__u32 attach_type; /* program attach type (enum bpf_attach_type) */
|
||||
__u32 attach_type; /* program attach type */
|
||||
};
|
||||
|
||||
union bpf_iter_link_info {
|
||||
@@ -4871,12 +4871,6 @@ union bpf_attr {
|
||||
* Return
|
||||
* Value specified by user at BPF link creation/attachment time
|
||||
* or 0, if it was not specified.
|
||||
*
|
||||
* long bpf_task_pt_regs(struct task_struct *task)
|
||||
* Description
|
||||
* Get the struct pt_regs associated with **task**.
|
||||
* Return
|
||||
* A pointer to struct pt_regs.
|
||||
*/
|
||||
#define __BPF_FUNC_MAPPER(FN) \
|
||||
FN(unspec), \
|
||||
@@ -5054,7 +5048,6 @@ union bpf_attr {
|
||||
FN(timer_cancel), \
|
||||
FN(get_func_ip), \
|
||||
FN(get_attach_cookie), \
|
||||
FN(task_pt_regs), \
|
||||
/* */
|
||||
|
||||
/* integer value in 'imm' field of BPF_CALL instruction selects which helper
|
||||
|
||||
@@ -4033,14 +4033,4 @@ static __u64 (*bpf_get_func_ip)(void *ctx) = (void *) 173;
|
||||
*/
|
||||
static __u64 (*bpf_get_attach_cookie)(void *ctx) = (void *) 174;
|
||||
|
||||
/*
|
||||
* bpf_task_pt_regs
|
||||
*
|
||||
* Get the struct pt_regs associated with **task**.
|
||||
*
|
||||
* Returns
|
||||
* A pointer to struct pt_regs.
|
||||
*/
|
||||
static long (*bpf_task_pt_regs)(struct task_struct *task) = (void *) 175;
|
||||
|
||||
|
||||
|
||||
@@ -2993,12 +2993,6 @@ static int bpf_object__elf_collect(struct bpf_object *obj)
|
||||
}
|
||||
}
|
||||
|
||||
if (!obj->efile.symbols) {
|
||||
pr_warn("elf: couldn't find symbol table in %s, stripped object file?\n",
|
||||
obj->path);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
scn = NULL;
|
||||
while ((scn = elf_nextscn(elf, scn)) != NULL) {
|
||||
idx++;
|
||||
|
||||
@@ -854,7 +854,7 @@ struct bpf_object_skeleton {
|
||||
size_t sz; /* size of this struct, for forward/backward compatibility */
|
||||
|
||||
const char *name;
|
||||
const void *data;
|
||||
void *data;
|
||||
size_t data_sz;
|
||||
|
||||
struct bpf_object **obj;
|
||||
|
||||
@@ -90,30 +90,17 @@
|
||||
/* Symbol versioning is different between static and shared library.
|
||||
* Properly versioned symbols are needed for shared library, but
|
||||
* only the symbol of the new version is needed for static library.
|
||||
* Starting with GNU C 10, use symver attribute instead of .symver assembler
|
||||
* directive, which works better with GCC LTO builds.
|
||||
*/
|
||||
#if defined(SHARED) && defined(__GNUC__) && __GNUC__ >= 10
|
||||
|
||||
#define DEFAULT_VERSION(internal_name, api_name, version) \
|
||||
__attribute__((symver(#api_name "@@" #version)))
|
||||
#define COMPAT_VERSION(internal_name, api_name, version) \
|
||||
__attribute__((symver(#api_name "@" #version)))
|
||||
|
||||
#elif defined(SHARED)
|
||||
|
||||
#define COMPAT_VERSION(internal_name, api_name, version) \
|
||||
#ifdef SHARED
|
||||
# define COMPAT_VERSION(internal_name, api_name, version) \
|
||||
asm(".symver " #internal_name "," #api_name "@" #version);
|
||||
#define DEFAULT_VERSION(internal_name, api_name, version) \
|
||||
# define DEFAULT_VERSION(internal_name, api_name, version) \
|
||||
asm(".symver " #internal_name "," #api_name "@@" #version);
|
||||
|
||||
#else /* !SHARED */
|
||||
|
||||
#define COMPAT_VERSION(internal_name, api_name, version)
|
||||
#define DEFAULT_VERSION(internal_name, api_name, version) \
|
||||
#else
|
||||
# define COMPAT_VERSION(internal_name, api_name, version)
|
||||
# define DEFAULT_VERSION(internal_name, api_name, version) \
|
||||
extern typeof(internal_name) api_name \
|
||||
__attribute__((alias(#internal_name)));
|
||||
|
||||
#endif
|
||||
|
||||
extern void libbpf_print(enum libbpf_print_level level,
|
||||
|
||||
@@ -281,7 +281,6 @@ out_mmap:
|
||||
return err;
|
||||
}
|
||||
|
||||
DEFAULT_VERSION(xsk_umem__create_v0_0_4, xsk_umem__create, LIBBPF_0.0.4)
|
||||
int xsk_umem__create_v0_0_4(struct xsk_umem **umem_ptr, void *umem_area,
|
||||
__u64 size, struct xsk_ring_prod *fill,
|
||||
struct xsk_ring_cons *comp,
|
||||
@@ -346,7 +345,6 @@ struct xsk_umem_config_v1 {
|
||||
__u32 frame_headroom;
|
||||
};
|
||||
|
||||
COMPAT_VERSION(xsk_umem__create_v0_0_2, xsk_umem__create, LIBBPF_0.0.2)
|
||||
int xsk_umem__create_v0_0_2(struct xsk_umem **umem_ptr, void *umem_area,
|
||||
__u64 size, struct xsk_ring_prod *fill,
|
||||
struct xsk_ring_cons *comp,
|
||||
@@ -360,6 +358,8 @@ int xsk_umem__create_v0_0_2(struct xsk_umem **umem_ptr, void *umem_area,
|
||||
return xsk_umem__create_v0_0_4(umem_ptr, umem_area, size, fill, comp,
|
||||
&config);
|
||||
}
|
||||
COMPAT_VERSION(xsk_umem__create_v0_0_2, xsk_umem__create, LIBBPF_0.0.2)
|
||||
DEFAULT_VERSION(xsk_umem__create_v0_0_4, xsk_umem__create, LIBBPF_0.0.4)
|
||||
|
||||
static enum xsk_prog get_xsk_prog(void)
|
||||
{
|
||||
|
||||
@@ -45,7 +45,6 @@ mmap # 5.5 kernel is too permissive with re-mmaping
|
||||
modify_return # fmod_ret support is missing
|
||||
module_attach # module BTF support missing (v5.11+)
|
||||
netcnt
|
||||
netns_cookie # v5.15+
|
||||
ns_current_pid_tgid # bpf_get_ns_current_pid_tgid() helper is missing
|
||||
pe_preserve_elems # v5.10+
|
||||
perf_branches # bpf_read_branch_records() helper is missing
|
||||
@@ -75,12 +74,10 @@ socket_cookie # v5.12+
|
||||
sockmap_basic # uses new socket fields, 5.8+
|
||||
sockmap_listen # no listen socket supportin SOCKMAP
|
||||
sockopt_sk
|
||||
sockopt_qos_to_cc # v5.15+
|
||||
stacktrace_build_id # v5.9+
|
||||
stack_var_off # v5.12+
|
||||
syscall # v5.14+
|
||||
task_local_storage # v5.12+
|
||||
task_pt_regs # v5.15+
|
||||
tcp_hdr_options # v5.10+, new TCP header options feature in BPF
|
||||
tcpbpf_user # LINK_CREATE is missing
|
||||
tc_redirect # v5.14+
|
||||
|
||||
@@ -459,10 +459,10 @@ if kvm-ok ; then
|
||||
else
|
||||
accel="-cpu qemu64 -machine accel=tcg"
|
||||
fi
|
||||
qemu-system-x86_64 -nodefaults -display none -serial mon:stdio -no-reboot \
|
||||
qemu-system-x86_64 -nodefaults -display none -serial mon:stdio \
|
||||
${accel} -smp "$(nproc)" -m 4G \
|
||||
-drive file="$IMG",format=raw,index=1,media=disk,if=virtio,cache=none \
|
||||
-kernel "$vmlinuz" -append "root=/dev/vda rw console=ttyS0,115200 kernel.panic=-1 $APPEND"
|
||||
-kernel "$vmlinuz" -append "root=/dev/vda rw console=ttyS0,115200$APPEND"
|
||||
sudo mount -o loop "$IMG" "$mnt"
|
||||
if exitstatus="$(cat "$mnt/exitstatus" 2>/dev/null)"; then
|
||||
printf '\nTests exit status: %s\n' "$exitstatus" >&2
|
||||
|
||||
Reference in New Issue
Block a user