![Daniel T. Lee](/assets/img/avatar_default.png)
This commit refactors the existing cgroup programs with libbpf
bpf loader. Since bpf_program__attach doesn't support cgroup program
attachment, this explicitly attaches cgroup bpf program with
bpf_program__attach_cgroup(bpf_prog, cg1).
Also, to change attach_type of bpf program, this uses libbpf's
bpf_program__set_expected_attach_type helper to switch EGRESS to
INGRESS. To keep bpf program attached to the cgroup hierarchy even
after the exit, this commit uses the BPF_LINK_PINNING to pin the link
attachment even after it is closed.
Besides, this program was broken due to the typo of BPF MAP definition.
But this commit solves the problem by fixing this from 'queue_stats' map
struct hvm_queue_stats -> hbm_queue_stats.
Fixes: 36b5d47113
("selftests/bpf: samples/bpf: Split off legacy stuff from bpf_helpers.h")
Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20201124090310.24374-2-danieltimlee@gmail.com
58 lines
730 B
Plaintext
58 lines
730 B
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
cpustat
|
|
fds_example
|
|
hbm
|
|
ibumad
|
|
lathist
|
|
lwt_len_hist
|
|
map_perf_test
|
|
offwaketime
|
|
per_socket_stats_example
|
|
sampleip
|
|
sock_example
|
|
sockex1
|
|
sockex2
|
|
sockex3
|
|
spintest
|
|
syscall_nrs.h
|
|
syscall_tp
|
|
task_fd_query
|
|
tc_l2_redirect
|
|
test_cgrp2_array_pin
|
|
test_cgrp2_attach
|
|
test_cgrp2_attach2
|
|
test_cgrp2_sock
|
|
test_cgrp2_sock2
|
|
test_current_task_under_cgroup
|
|
test_lru_dist
|
|
test_map_in_map
|
|
test_overhead
|
|
test_probe_write_user
|
|
trace_event
|
|
trace_output
|
|
tracex1
|
|
tracex2
|
|
tracex3
|
|
tracex4
|
|
tracex5
|
|
tracex6
|
|
tracex7
|
|
xdp1
|
|
xdp2
|
|
xdp_adjust_tail
|
|
xdp_fwd
|
|
xdp_monitor
|
|
xdp_redirect
|
|
xdp_redirect_cpu
|
|
xdp_redirect_map
|
|
xdp_router_ipv4
|
|
xdp_rxq_info
|
|
xdp_sample_pkts
|
|
xdp_tx_iptunnel
|
|
xdpsock
|
|
xsk_fwd
|
|
testfile.img
|
|
hbm_out.log
|
|
iperf.*
|
|
*.out
|