Home
last modified time | relevance | path

Searched refs:skel (Results 1 – 8 of 8) sorted by relevance

/samples/v4l/
Dv4l2-pci-skeleton.c133 struct skeleton *skel = dev_id; in skeleton_irq() local
140 spin_lock(&skel->qlock); in skeleton_irq()
142 spin_unlock(&skel->qlock); in skeleton_irq()
144 new_buf->vb.sequence = skel->sequence++; in skeleton_irq()
145 new_buf->vb.field = skel->field; in skeleton_irq()
146 if (skel->format.field == V4L2_FIELD_ALTERNATE) { in skeleton_irq()
147 if (skel->field == V4L2_FIELD_BOTTOM) in skeleton_irq()
148 skel->field = V4L2_FIELD_TOP; in skeleton_irq()
149 else if (skel->field == V4L2_FIELD_TOP) in skeleton_irq()
150 skel->field = V4L2_FIELD_BOTTOM; in skeleton_irq()
[all …]
/samples/bpf/
Dxdp_sample_user.h64 if (!bpf_program__is_tracing(skel->progs.name)) \
66 skel->links.name = bpf_program__attach(skel->progs.name); \
67 if (!skel->links.name) \
71 #define sample_init_pre_load(skel) \ argument
73 skel->rodata->nr_cpus = libbpf_num_possible_cpus(); \
75 skel->maps.rx_cnt, skel->maps.redir_err_cnt, \
76 skel->maps.cpumap_enqueue_cnt, \
77 skel->maps.cpumap_kthread_cnt, \
78 skel->maps.exception_cnt, skel->maps.devmap_xmit_cnt, \
79 skel->maps.devmap_xmit_cnt_multi }); \
[all …]
Dxdp_redirect_map_user.c47 struct xdp_redirect_map *skel; in main() local
113 skel = xdp_redirect_map__open(); in main()
114 if (!skel) { in main()
121 ret = sample_init_pre_load(skel); in main()
130 ret = get_mac_addr(ifindex_out, skel->rodata->tx_mac_addr); in main()
139 skel->rodata->from_match[0] = ifindex_in; in main()
140 skel->rodata->to_match[0] = ifindex_out; in main()
142 ret = xdp_redirect_map__load(skel); in main()
150 ret = sample_init(skel, mask); in main()
157 prog = skel->progs.xdp_redirect_map_native; in main()
[all …]
Dxdp_redirect_cpu_user.c176 static int set_cpumap_prog(struct xdp_redirect_cpu *skel, in set_cpumap_prog() argument
253 return *mprog_name == 'p' ? bpf_program__fd(skel->progs.xdp_redirect_cpu_pass) in set_cpumap_prog()
254 : bpf_program__fd(skel->progs.xdp_redirect_cpu_drop); in set_cpumap_prog()
283 if (get_mac_addr(ifindex_out, skel->bss->tx_mac_addr) < 0) { in set_cpumap_prog()
289 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_redirect_egress_prog); in set_cpumap_prog()
290 err = bpf_map_update_elem(bpf_map__fd(skel->maps.tx_port), &key, &val, 0); in set_cpumap_prog()
294 return bpf_program__fd(skel->progs.xdp_redirect_cpu_devmap); in set_cpumap_prog()
310 struct xdp_redirect_cpu *skel; in main() local
350 skel = xdp_redirect_cpu__open(); in main()
351 if (!skel) { in main()
[all …]
Dxdp_redirect_user.c51 struct xdp_redirect *skel; in main() local
103 skel = xdp_redirect__open(); in main()
104 if (!skel) { in main()
110 ret = sample_init_pre_load(skel); in main()
117 skel->rodata->from_match[0] = ifindex_in; in main()
118 skel->rodata->to_match[0] = ifindex_out; in main()
119 skel->rodata->ifindex_out = ifindex_out; in main()
121 ret = xdp_redirect__load(skel); in main()
128 ret = sample_init(skel, mask); in main()
136 if (sample_install_xdp(skel->progs.xdp_redirect_prog, ifindex_in, in main()
[all …]
Dxdp_redirect_map_multi_user.c81 struct xdp_redirect_map_multi *skel; in main() local
132 skel = xdp_redirect_map_multi__open(); in main()
133 if (!skel) { in main()
140 ret = sample_init_pre_load(skel); in main()
158 skel->rodata->from_match[i] = ifaces[i]; in main()
159 skel->rodata->to_match[i] = ifaces[i]; in main()
162 ret = xdp_redirect_map_multi__load(skel); in main()
172 if (update_mac_map(skel->maps.mac_map) < 0) { in main()
179 ret = sample_init(skel, mask); in main()
186 ingress_prog = skel->progs.xdp_redirect_map_native; in main()
[all …]
Dxdp_monitor_user.c49 struct xdp_monitor *skel; in main() local
76 skel = xdp_monitor__open(); in main()
77 if (!skel) { in main()
84 ret = sample_init_pre_load(skel); in main()
91 ret = xdp_monitor__load(skel); in main()
98 ret = sample_init(skel, mask); in main()
116 xdp_monitor__destroy(skel); in main()
DMakefile337 $(obj)/xdp_redirect_cpu_user.o: $(obj)/xdp_redirect_cpu.skel.h
338 $(obj)/xdp_redirect_map_multi_user.o: $(obj)/xdp_redirect_map_multi.skel.h
339 $(obj)/xdp_redirect_map_user.o: $(obj)/xdp_redirect_map.skel.h
340 $(obj)/xdp_redirect_user.o: $(obj)/xdp_redirect.skel.h
341 $(obj)/xdp_monitor_user.o: $(obj)/xdp_monitor.skel.h
407 LINKED_SKELS := xdp_redirect_cpu.skel.h xdp_redirect_map_multi.skel.h \
408 xdp_redirect_map.skel.h xdp_redirect.skel.h xdp_monitor.skel.h
411 xdp_redirect_cpu.skel.h-deps := xdp_redirect_cpu.bpf.o xdp_sample.bpf.o
412 xdp_redirect_map_multi.skel.h-deps := xdp_redirect_map_multi.bpf.o xdp_sample.bpf.o
413 xdp_redirect_map.skel.h-deps := xdp_redirect_map.bpf.o xdp_sample.bpf.o
[all …]