manager@libreqos:~/LibreQoS/v1.0$ sudo python3 ./LibreQoS.py tc filter delete dev enp3s0 tc filter delete dev enp3s0 root Error: Specified class doesn't exist. We have an error talking to the kernel tc qdisc delete dev enp3s0 root Error: Cannot delete qdisc with handle of zero. tc qdisc delete dev enp3s0 Error: Failed to find qdisc with specified handle. tc filter delete dev enp4s0 tc filter delete dev enp4s0 root Error: Specified class doesn't exist. We have an error talking to the kernel tc qdisc delete dev enp4s0 root Error: Cannot delete qdisc with handle of zero. tc qdisc delete dev enp4s0 Error: Failed to find qdisc with specified handle. ./xdp-cpumap-tc/bin/xps_setup.sh -d enp3s0 --default --disable ./xdp-cpumap-tc/bin/xps_setup.sh: line 103: echo: write error: No such file or directory ./xdp-cpumap-tc/bin/xps_setup.sh -d enp4s0 --default --disable ./xdp-cpumap-tc/bin/xps_setup.sh: line 103: echo: write error: No such file or directory ./xdp-cpumap-tc/src/xdp_iphash_to_cpu --dev enp3s0 --lan libbpf: Error loading BTF: Invalid argument(22) libbpf: magic: 0xeb9f version: 1 flags: 0x0 hdr_len: 24 type_off: 0 type_len: 504 str_off: 504 str_len: 1733 btf_total_size: 2261 [1] PTR (anon) type_id=2 [2] STRUCT xdp_md size=24 vlen=6 data type_id=3 bits_offset=0 data_end type_id=3 bits_offset=32 data_meta type_id=3 bits_offset=64 ingress_ifindex type_id=3 bits_offset=96 rx_queue_index type_id=3 bits_offset=128 egress_ifindex type_id=3 bits_offset=160 [3] TYPEDEF __u32 type_id=4 [4] INT unsigned int size=4 bits_offset=0 nr_bits=32 encoding=(none) [5] FUNC_PROTO (anon) return=6 args=(1 ctx) [6] INT int size=4 bits_offset=0 nr_bits=32 encoding=SIGNED [7] FUNC xdp_program type_id=5 [8] STRUCT bpf_map_def size=24 vlen=6 type type_id=4 bits_offset=0 key_size type_id=4 bits_offset=32 value_size type_id=4 bits_offset=64 max_entries type_id=4 bits_offset=96 map_flags type_id=4 bits_offset=128 inner_map_idx type_id=4 bits_offset=160 [9] VAR map_ip_hash type_id=8 linkage=1 [10] VAR map_txq_config type_id=8 linkage=1 [11] VAR map_ifindex_type type_id=8 linkage=1 [12] VAR cpu_map type_id=8 linkage=1 [13] VAR cpus_available type_id=8 linkage=1 [14] INT char size=1 bits_offset=0 nr_bits=8 encoding=SIGNED [15] ARRAY (anon) type_id=14 index_type_id=16 nr_elems=4 [16] INT __ARRAY_SIZE_TYPE__ size=4 bits_offset=0 nr_bits=32 encoding=(none) [17] VAR _license type_id=15 linkage=1 [18] DATASEC license size=0 vlen=1 size == 0 libbpf: Error loading ELF section .BTF: -22. Ignored and continue. TC workaround for mapname: map_ifindex_type map_fd:7 Added CPU:0 queue_size:2048 Added CPU:1 queue_size:2048 Added CPU:2 queue_size:2048 Added CPU:3 queue_size:2048 Documentation: XDP: Lookup IPv4 and redirect to CPU hash This program loads the XDP eBPF program into the kernel. Use the cmdline tool for add/removing dest IPs to the hash - Attached to device:enp3s0 (ifindex:2) prog_id:170 ./xdp-cpumap-tc/src/xdp_iphash_to_cpu --dev enp4s0 --wan libbpf: Error loading BTF: Invalid argument(22) libbpf: magic: 0xeb9f version: 1 flags: 0x0 hdr_len: 24 type_off: 0 type_len: 504 str_off: 504 str_len: 1733 btf_total_size: 2261 [1] PTR (anon) type_id=2 [2] STRUCT xdp_md size=24 vlen=6 data type_id=3 bits_offset=0 data_end type_id=3 bits_offset=32 data_meta type_id=3 bits_offset=64 ingress_ifindex type_id=3 bits_offset=96 rx_queue_index type_id=3 bits_offset=128 egress_ifindex type_id=3 bits_offset=160 [3] TYPEDEF __u32 type_id=4 [4] INT unsigned int size=4 bits_offset=0 nr_bits=32 encoding=(none) [5] FUNC_PROTO (anon) return=6 args=(1 ctx) [6] INT int size=4 bits_offset=0 nr_bits=32 encoding=SIGNED [7] FUNC xdp_program type_id=5 [8] STRUCT bpf_map_def size=24 vlen=6 type type_id=4 bits_offset=0 key_size type_id=4 bits_offset=32 value_size type_id=4 bits_offset=64 max_entries type_id=4 bits_offset=96 map_flags type_id=4 bits_offset=128 inner_map_idx type_id=4 bits_offset=160 [9] VAR map_ip_hash type_id=8 linkage=1 [10] VAR map_txq_config type_id=8 linkage=1 [11] VAR map_ifindex_type type_id=8 linkage=1 [12] VAR cpu_map type_id=8 linkage=1 [13] VAR cpus_available type_id=8 linkage=1 [14] INT char size=1 bits_offset=0 nr_bits=8 encoding=SIGNED [15] ARRAY (anon) type_id=14 index_type_id=16 nr_elems=4 [16] INT __ARRAY_SIZE_TYPE__ size=4 bits_offset=0 nr_bits=32 encoding=(none) [17] VAR _license type_id=15 linkage=1 [18] DATASEC license size=0 vlen=1 size == 0 libbpf: Error loading ELF section .BTF: -22. Ignored and continue. TC workaround for mapname: map_ifindex_type map_fd:7 Added CPU:0 queue_size:2048 Added CPU:1 queue_size:2048 Added CPU:2 queue_size:2048 Added CPU:3 queue_size:2048 Documentation: XDP: Lookup IPv4 and redirect to CPU hash This program loads the XDP eBPF program into the kernel. Use the cmdline tool for add/removing dest IPs to the hash - Attached to device:enp4s0 (ifindex:4) prog_id:173 ./xdp-cpumap-tc/src/xdp_iphash_to_cpu_cmdline --clear iphash_modify() IP:100.126.0.82 key:0x52007E64 TC-handle:0x0 iphash_modify() IP:100.126.0.77 key:0x4D007E64 TC-handle:0x0 iphash_modify() IP:100.126.0.81 key:0x51007E64 TC-handle:0x0 iphash_modify() IP:100.126.0.80 key:0x50007E64 TC-handle:0x0 iphash_modify() IP:100.126.0.79 key:0x4F007E64 TC-handle:0x0 key: 0x52007E64 key: 0x4D007E64 key: 0x51007E64 key: 0x50007E64 key: 0x4F007E64 ./xdp-cpumap-tc/src/tc_classify --dev-egress enp3s0 TC: Control program for tc_classify_kern.o - When using --dev, loads TC-egress filter calling BPF program - Config of map_txq_config, that control CPU to queue_mapping - List current queue_mapping (txq) config via --list Map filename: /sys/fs/bpf/tc/globals/map_txq_config Dev:enp3s0 -- Loading: TC-clsact egress - Run: tc qdisc del dev enp3s0 clsact 2> /dev/null - Run: tc qdisc add dev enp3s0 clsact - Run: tc filter add dev enp3s0 egress prio 1 handle 1 bpf da obj ./xdp-cpumap-tc/src/tc_classify_kern.o sec tc_classify ./xdp-cpumap-tc/src/tc_classify --dev-egress enp4s0 TC: Control program for tc_classify_kern.o - When using --dev, loads TC-egress filter calling BPF program - Config of map_txq_config, that control CPU to queue_mapping - List current queue_mapping (txq) config via --list Map filename: /sys/fs/bpf/tc/globals/map_txq_config Dev:enp4s0 -- Loading: TC-clsact egress - Run: tc qdisc del dev enp4s0 clsact 2> /dev/null - Run: tc qdisc add dev enp4s0 clsact - Run: tc filter add dev enp4s0 egress prio 1 handle 1 bpf da obj ./xdp-cpumap-tc/src/tc_classify_kern.o sec tc_classify ['tx-0', 'rx-0'] tc qdisc replace dev enp3s0 root handle 7FFF: mq RTNETLINK answers: Operation not supported tc qdisc add dev enp3s0 parent 7FFF:1 handle 1: htb default 2 Error: Failed to find specified qdisc. tc class add dev enp3s0 parent 1: classid 1:1 htb rate 100mbit ceil 100mbit RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:1 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp3s0 parent 1:1 classid 1:2 htb rate 0.25mbit ceil 1mbit prio 5 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:2 cake diffserv4 Error: Failed to find specified qdisc. tc qdisc replace dev enp4s0 root handle 7FFF: mq RTNETLINK answers: Operation not supported tc qdisc add dev enp4s0 parent 7FFF:1 handle 1: htb default 2 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1: classid 1:1 htb rate 100mbit ceil 100mbit RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:1 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:1 classid 1:2 htb rate 0.25mbit ceil 1mbit prio 5 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:2 cake diffserv4 Error: Failed to find specified qdisc. Adding site Site1 tc class add dev enp3s0 parent 1:1 classid 3 htb rate 25mbit ceil 100mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:3 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:1 classid 3 htb rate 25mbit ceil 100mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:3 cake diffserv4 Error: Failed to find specified qdisc. Adding AP AP1 tc class add dev enp3s0 parent 1:3 classid 4 htb rate 8mbit ceil 33mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:4 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:3 classid 4 htb rate 8mbit ceil 33mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:4 cake diffserv4 Error: Failed to find specified qdisc. Adding device CPE-Customer1 tc class add dev enp3s0 parent 1:4 classid 5 htb rate 5mbit ceil 11mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:5 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:4 classid 5 htb rate 2mbit ceil 4mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:5 cake diffserv4 Error: Failed to find specified qdisc. ./xdp-cpumap-tc/src/xdp_iphash_to_cpu_cmdline --add --ip 100.126.0.77 --cpu 0 --classid 1:5 iphash_modify() IP:100.126.0.77 key:0x4D007E64 TC-handle:0x10005 key: 0x4D007E64 Adding AP AP5 tc class add dev enp3s0 parent 1:3 classid 6 htb rate 68mbit ceil 272mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:6 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:3 classid 6 htb rate 16mbit ceil 65mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:6 cake diffserv4 Error: Failed to find specified qdisc. Adding device CPE-Customer5 tc class add dev enp3s0 parent 1:6 classid 7 htb rate 27mbit ceil 125mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:7 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:6 classid 7 htb rate 9mbit ceil 20mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:7 cake diffserv4 Error: Failed to find specified qdisc. ./xdp-cpumap-tc/src/xdp_iphash_to_cpu_cmdline --add --ip 100.126.0.81 --cpu 0 --classid 1:7 iphash_modify() IP:100.126.0.81 key:0x51007E64 TC-handle:0x10007 key: 0x51007E64 Adding site Site2 tc class add dev enp3s0 parent 1:1 classid 8 htb rate 230mbit ceil 920mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:8 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:1 classid 8 htb rate 230mbit ceil 920mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:8 cake diffserv4 Error: Failed to find specified qdisc. Adding AP AP2 tc class add dev enp3s0 parent 1:8 classid 9 htb rate 68mbit ceil 272mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:9 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:8 classid 9 htb rate 16mbit ceil 65mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:9 cake diffserv4 Error: Failed to find specified qdisc. Adding device CPE-Customer2 tc class add dev enp3s0 parent 1:9 classid 10 htb rate 27mbit ceil 125mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:10 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:9 classid 10 htb rate 9mbit ceil 20mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:10 cake diffserv4 Error: Failed to find specified qdisc. ./xdp-cpumap-tc/src/xdp_iphash_to_cpu_cmdline --add --ip 100.126.0.82 --cpu 0 --classid 1:10 iphash_modify() IP:100.126.0.82 key:0x52007E64 TC-handle:0x10010 key: 0x52007E64 Adding AP AP6 tc class add dev enp3s0 parent 1:8 classid 11 htb rate 68mbit ceil 272mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:11 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:8 classid 11 htb rate 16mbit ceil 65mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:11 cake diffserv4 Error: Failed to find specified qdisc. Adding site Site3 tc class add dev enp3s0 parent 1:1 classid 12 htb rate 50mbit ceil 200mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:12 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:1 classid 12 htb rate 8mbit ceil 30mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:12 cake diffserv4 Error: Failed to find specified qdisc. Adding AP AP3 tc class add dev enp3s0 parent 1:12 classid 13 htb rate 68mbit ceil 272mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:13 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:12 classid 13 htb rate 16mbit ceil 65mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:13 cake diffserv4 Error: Failed to find specified qdisc. Adding device CPE-Customer3 tc class add dev enp3s0 parent 1:13 classid 14 htb rate 27mbit ceil 125mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:14 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:13 classid 14 htb rate 9mbit ceil 20mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:14 cake diffserv4 Error: Failed to find specified qdisc. ./xdp-cpumap-tc/src/xdp_iphash_to_cpu_cmdline --add --ip 100.126.0.79 --cpu 0 --classid 1:14 iphash_modify() IP:100.126.0.79 key:0x4F007E64 TC-handle:0x10014 key: 0x4F007E64 Adding AP AP7 tc class add dev enp3s0 parent 1:12 classid 15 htb rate 68mbit ceil 272mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:15 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:12 classid 15 htb rate 16mbit ceil 65mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:15 cake diffserv4 Error: Failed to find specified qdisc. Adding site Site4 tc class add dev enp3s0 parent 1:1 classid 16 htb rate 25mbit ceil 100mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:16 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:1 classid 16 htb rate 4mbit ceil 15mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:16 cake diffserv4 Error: Failed to find specified qdisc. Adding AP AP4 tc class add dev enp3s0 parent 1:16 classid 17 htb rate 68mbit ceil 272mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:17 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:16 classid 17 htb rate 16mbit ceil 65mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:17 cake diffserv4 Error: Failed to find specified qdisc. Adding device CPE-Customer4 tc class add dev enp3s0 parent 1:17 classid 18 htb rate 27mbit ceil 125mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:18 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:17 classid 18 htb rate 9mbit ceil 20mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:18 cake diffserv4 Error: Failed to find specified qdisc. ./xdp-cpumap-tc/src/xdp_iphash_to_cpu_cmdline --add --ip 100.126.0.80 --cpu 0 --classid 1:18 iphash_modify() IP:100.126.0.80 key:0x50007E64 TC-handle:0x10018 key: 0x50007E64 Adding AP AP8 tc class add dev enp3s0 parent 1:16 classid 19 htb rate 68mbit ceil 272mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp3s0 parent 1:19 cake diffserv4 Error: Failed to find specified qdisc. tc class add dev enp4s0 parent 1:16 classid 19 htb rate 16mbit ceil 65mbit prio 3 RTNETLINK answers: No such file or directory tc qdisc add dev enp4s0 parent 1:19 cake diffserv4 Error: Failed to find specified qdisc. Successful run completed on 04/03/2022 19:26:50 Program complete manager@libreqos:~/LibreQoS/v1.0$