File tree Expand file tree Collapse file tree 12 files changed +16
-114
lines changed
Expand file tree Collapse file tree 12 files changed +16
-114
lines changed Original file line number Diff line number Diff line change 11cpustat
22fds_example
33lathist
4- load_sock_ops
54lwt_len_hist
65map_perf_test
76offwaketime
Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ hostprogs-y += lwt_len_hist
4040hostprogs-y += xdp_tx_iptunnel
4141hostprogs-y += test_map_in_map
4242hostprogs-y += per_socket_stats_example
43- hostprogs-y += load_sock_ops
4443hostprogs-y += xdp_redirect
4544hostprogs-y += xdp_redirect_map
4645hostprogs-y += xdp_redirect_cpu
@@ -71,7 +70,6 @@ tracex4-objs := bpf_load.o tracex4_user.o
7170tracex5-objs := bpf_load.o tracex5_user.o
7271tracex6-objs := bpf_load.o tracex6_user.o
7372tracex7-objs := bpf_load.o tracex7_user.o
74- load_sock_ops-objs := bpf_load.o load_sock_ops.o
7573test_probe_write_user-objs := bpf_load.o test_probe_write_user_user.o
7674trace_output-objs := bpf_load.o trace_output_user.o $(TRACE_HELPERS )
7775lathist-objs := bpf_load.o lathist_user.o
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 77 * BPF program to set base_rtt to 80us when host is running TCP-NV and
88 * both hosts are in the same datacenter (as determined by IPv6 prefix).
99 *
10- * Use load_sock_ops to load this BPF program.
10+ * Use "bpftool cgroup attach $cg sock_ops $prog" to load this BPF program.
1111 */
1212
1313#include <uapi/linux/bpf.h>
Original file line number Diff line number Diff line change @@ -8,19 +8,21 @@ a cgroupv2 and attach a bash shell to the group.
88 bash
99 echo $$ >> /tmp/cgroupv2/foo/cgroup.procs
1010
11- Anything that runs under this shell belongs to the foo cgroupv2 To load
11+ Anything that runs under this shell belongs to the foo cgroupv2. To load
1212(attach) one of the tcp_*_kern.o programs:
1313
14- ./load_sock_ops -l /tmp/cgroupv2/foo tcp_basertt_kern.o
14+ bpftool prog load tcp_basertt_kern.o /sys/fs/bpf/tcp_prog
15+ bpftool cgroup attach /tmp/cgroupv2/foo sock_ops pinned /sys/fs/bpf/tcp_prog
16+ bpftool prog tracelog
1517
16- If the "-l" flag is used, the load_sock_ops program will continue to run
17- printing the BPF log buffer. The tcp_*_kern.o programs use special print
18- functions to print logging information (if enabled by the ifdef).
18+ "bpftool prog tracelog" will continue to run printing the BPF log buffer.
19+ The tcp_*_kern.o programs use special print functions to print logging
20+ information (if enabled by the ifdef).
1921
2022If using netperf/netserver to create traffic, you need to run them under the
2123cgroupv2 to which the BPF programs are attached (i.e. under bash shell
2224attached to the cgroupv2).
2325
2426To remove (unattach) a socket_ops BPF program from a cgroupv2:
2527
26- ./load_sock_ops -r /tmp/cgroupv2/foo
28+ bpftool cgroup attach /tmp/cgroupv2/foo sock_ops pinned /sys/fs/bpf/tcp_prog
Original file line number Diff line number Diff line change 99 * doing appropriate checks that indicate the hosts are far enough
1010 * away (i.e. large RTT).
1111 *
12- * Use load_sock_ops to load this BPF program.
12+ * Use "bpftool cgroup attach $cg sock_ops $prog" to load this BPF program.
1313 */
1414
1515#include <uapi/linux/bpf.h>
Original file line number Diff line number Diff line change 99 * the same datacenter. For his example, we assume they are within the same
1010 * datacenter when the first 5.5 bytes of their IPv6 addresses are the same.
1111 *
12- * Use load_sock_ops to load this BPF program.
12+ * Use "bpftool cgroup attach $cg sock_ops $prog" to load this BPF program.
1313 */
1414
1515#include <uapi/linux/bpf.h>
Original file line number Diff line number Diff line change 77 * BPF program to set congestion control to dctcp when both hosts are
88 * in the same datacenter (as deteremined by IPv6 prefix).
99 *
10- * Use load_sock_ops to load this BPF program.
10+ * Use "bpftool cgroup attach $cg sock_ops $prog" to load this BPF program.
1111 */
1212
1313#include <uapi/linux/bpf.h>
Original file line number Diff line number Diff line change 99 * would usually be done after doing appropriate checks that indicate
1010 * the hosts are far enough away (i.e. large RTT).
1111 *
12- * Use load_sock_ops to load this BPF program.
12+ * Use "bpftool cgroup attach $cg sock_ops $prog" to load this BPF program.
1313 */
1414
1515#include <uapi/linux/bpf.h>
Original file line number Diff line number Diff line change 88 * and the first 5.5 bytes of the IPv6 addresses are not the same (in this
99 * example that means both hosts are not the same datacenter).
1010 *
11- * Use load_sock_ops to load this BPF program.
11+ * Use "bpftool cgroup attach $cg sock_ops $prog" to load this BPF program.
1212 */
1313
1414#include <uapi/linux/bpf.h>
You can’t perform that action at this time.
0 commit comments