On Wed, Nov 6, 2019 at 3:12 PM Martin KaFai Lau <kafai@xxxxxx> wrote: > > This series adds array support to btf_struct_access(). > Please see individual patch for details. > > v2: > - Fix a divide-by-zero when there is empty array in > a struct (e.g. "__u8 __cloned_offset[0];" in skbuff) > - Add 'static' to a global var in prog_tests/kfree_skb.c still something wrong: sysctl net.core.bpf_jit_enable=0 ./test_progs -n 11 libbpf: failed to guess program type based on ELF section name 'test1' libbpf: supported section(type) names are: socket kprobe/ uprobe/ kretprobe/ uretprobe/ classifier action tracepoint/ tp/ raw_tracepoint/ raw_tp/ tp_btf/ xdp perf_event lwt_in lwt_out lwt_xmit lwt_seg6local cgroup_skb/ingress cgroup_skb/t test_kfree_skb:PASS:prog_load sched cls 0 nsec test_kfree_skb:PASS:prog_load raw tp 0 nsec test_kfree_skb:PASS:find_prog 0 nsec test_kfree_skb:PASS:attach_raw_tp 0 nsec test_kfree_skb:PASS:find_perf_buf_map 0 nsec test_kfree_skb:PASS:perf_buf__new 0 nsec test_kfree_skb:PASS:ipv6 5219 nsec on_sample:PASS:check_size 0 nsec on_sample:PASS:check_meta_ifindex 0 nsec on_sample:FAIL:check_cb8_0 cb8_0 0 != 84 test_kfree_skb:PASS:perf_buffer__poll 5219 nsec test_kfree_skb:FAIL:114 #11 kfree_skb:FAIL Summary: 0/0 PASSED, 0 SKIPPED, 1 FAILED Though it passes when JITed.