Home
last modified time | relevance | path

Searched refs:idx (Results 1 – 12 of 12) sorted by relevance

/samples/bpf/
Dxdp_fwd_user.c32 static int do_attach(int idx, int prog_fd, int map_fd, const char *name) in do_attach() argument
36 err = bpf_set_link_xdp_fd(idx, prog_fd, xdp_flags); in do_attach()
43 err = bpf_map_update_elem(map_fd, &idx, &idx, 0); in do_attach()
50 static int do_detach(int idx, const char *name) in do_detach() argument
54 err = bpf_set_link_xdp_fd(idx, -1, xdp_flags); in do_detach()
86 int opt, i, idx, err; in main() local
152 idx = if_nametoindex(argv[i]); in main()
153 if (!idx) in main()
154 idx = strtoul(argv[i], NULL, 0); in main()
156 if (!idx) { in main()
[all …]
Dxdp_sample.bpf.c71 u32 idx; in xdp_redirect_collect_stat() local
78 idx = key * nr_cpus + cpu; in xdp_redirect_collect_stat()
79 rec = bpf_map_lookup_elem(&redir_err_cnt, &idx); in xdp_redirect_collect_stat()
133 u32 idx; in BPF_PROG() local
138 idx = to_cpu * nr_cpus + cpu; in BPF_PROG()
139 rec = bpf_map_lookup_elem(&cpumap_enqueue_cnt, &idx); in BPF_PROG()
186 u32 key = act, idx; in BPF_PROG() local
196 idx = key * nr_cpus + cpu; in BPF_PROG()
197 rec = bpf_map_lookup_elem(&exception_cnt, &idx); in BPF_PROG()
243 u64 idx; in BPF_PROG() local
[all …]
Dtest_cgrp2_sock.c30 static int prog_load(__u32 idx, __u32 mark, __u32 prio) in prog_load() argument
43 BPF_MOV64_IMM(BPF_REG_3, idx), in prog_load()
80 if (idx) in prog_load()
98 if (idx) { in prog_load()
206 __u32 idx = 0, mark = 0, prio = 0; in main() local
219 idx = if_nametoindex(optarg); in main()
220 if (!idx) { in main()
221 idx = strtoumax(optarg, NULL, 0); in main()
222 if (!idx) { in main()
251 if (do_attach && !idx && !mark && !prio) { in main()
[all …]
Dtest_current_task_under_cgroup_user.c19 int cg2, idx = 0, rc = 1; in main() local
65 if (bpf_map_update_elem(map_fd[0], &idx, &cg2, BPF_ANY)) { in main()
79 bpf_map_lookup_elem(map_fd[1], &idx, &remote_pid); in main()
93 bpf_map_update_elem(map_fd[1], &idx, &remote_pid, BPF_ANY); in main()
96 bpf_map_lookup_elem(map_fd[1], &idx, &remote_pid); in main()
Dtest_current_task_under_cgroup_kern.c34 int idx = 0; in SYSCALL() local
39 bpf_map_update_elem(&perf_map, &idx, &pid, BPF_ANY); in SYSCALL()
Dxdp_sample_pkts_user.c27 static int do_attach(int idx, int fd, const char *name) in do_attach() argument
33 err = bpf_set_link_xdp_fd(idx, fd, xdp_flags); in do_attach()
49 static int do_detach(int idx, const char *name) in do_detach() argument
54 err = bpf_get_link_xdp_id(idx, &curr_prog_id, xdp_flags); in do_detach()
60 err = bpf_set_link_xdp_fd(idx, -1, xdp_flags); in do_detach()
Dxdpsock_user.c838 u32 idx; in xsk_populate_fill_ring() local
841 XSK_RING_PROD__DEFAULT_NUM_DESCS * 2, &idx); in xsk_populate_fill_ring()
845 *xsk_ring_prod__fill_addr(&umem->fq, idx++) = in xsk_populate_fill_ring()
1180 u32 idx; in complete_tx_only() local
1190 rcvd = xsk_ring_cons__peek(&xsk->umem->cq, batch_size, &idx); in complete_tx_only()
1269 u32 idx; in tx_only() local
1272 while (xsk_ring_prod__reserve(&xsk->tx, batch_size, &idx) < in tx_only()
1281 idx + i); in tx_only()
/samples/seccomp/
Dbpf-helper.h66 #define LO_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) argument
68 #define LO_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) + sizeof(__u32) argument
90 #define HI_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) + sizeof(__u32) argument
93 #define HI_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) argument
139 #define ARG_32(idx) \ argument
140 BPF_STMT(BPF_LD+BPF_W+BPF_ABS, LO_ARG(idx))
143 #define ARG_64(idx) \ argument
144 BPF_STMT(BPF_LD+BPF_W+BPF_ABS, LO_ARG(idx)), \
146 BPF_STMT(BPF_LD+BPF_W+BPF_ABS, HI_ARG(idx)), \
/samples/connector/
Dcn_test.c28 __func__, jiffies, msg->id.idx, msg->id.val, in cn_test_callback()
69 msg->id.idx = -1;
87 req->first = cn_test_id.idx;
162 cn_test_id.idx, cn_test_id.val); in cn_test_init()
Ducon.c66 __func__, msg->id.idx, msg->id.val, msg->len, msg->seq, msg->ack); in netlink_send()
170 data->id.idx = CN_TEST_IDX; in main()
181 ulog("%d messages have been sent to %08x.%08x.\n", i, data->id.idx, data->id.val); in main()
226 ctime(&tm), data->id.idx, data->id.val, data->seq, data->ack); in main()
/samples/pktgen/
Dfunctions.sh291 idx=$[ octet*i ]
/samples/vfio-mdev/
Dmtty.c56 #define CIRCULAR_BUF_INC_IDX(idx) (idx = (idx + 1) & (MAX_FIFO_SIZE - 1)) argument