Home
last modified time | relevance | path

Searched refs:array_fd (Results 1 – 2 of 2) sorted by relevance

/linux-6.3-rc2/samples/bpf/
A Dtest_cgrp2_array_pin.c30 int array_fd = -1; in main() local
67 array_fd = bpf_map_create(BPF_MAP_TYPE_CGROUP_ARRAY, NULL, in main()
70 if (array_fd < 0) { in main()
77 array_fd = bpf_obj_get(pinned_file); in main()
78 if (array_fd < 0) { in main()
85 ret = bpf_map_update_elem(array_fd, &array_key, &cg2_fd, 0); in main()
92 ret = bpf_obj_pin(array_fd, pinned_file); in main()
101 if (array_fd != -1) in main()
102 close(array_fd); in main()
A Dtc_l2_redirect_user.c28 int array_fd = -1; in main() local
52 array_fd = bpf_obj_get(pinned_file); in main()
53 if (array_fd < 0) { in main()
60 ret = bpf_map_update_elem(array_fd, &array_key, &ifindex, 0); in main()
67 if (array_fd != -1) in main()
68 close(array_fd); in main()

Completed in 3 milliseconds