/samples/bpf/ |
D | xdp_fwd_user.c | 30 static int do_attach(int idx, int prog_fd, int map_fd, const char *name) in do_attach() argument 34 err = bpf_set_link_xdp_fd(idx, prog_fd, 0); in do_attach() 41 err = bpf_map_update_elem(map_fd, &idx, &idx, 0); in do_attach() 48 static int do_detach(int idx, const char *name) in do_detach() argument 52 err = bpf_set_link_xdp_fd(idx, -1, 0); in do_detach() 82 int opt, i, idx, err; in main() local 139 idx = if_nametoindex(argv[i]); in main() 140 if (!idx) in main() 141 idx = strtoul(argv[i], NULL, 0); in main() 143 if (!idx) { in main() [all …]
|
D | test_current_task_under_cgroup_user.c | 18 int cg2, idx = 0, rc = 0; in main() local 35 if (bpf_map_update_elem(map_fd[0], &idx, &cg2, BPF_ANY)) { in main() 49 bpf_map_lookup_elem(map_fd[1], &idx, &remote_pid); in main() 63 bpf_map_update_elem(map_fd[1], &idx, &remote_pid, BPF_ANY); in main() 66 bpf_map_lookup_elem(map_fd[1], &idx, &remote_pid); in main()
|
D | test_cgrp2_sock.c | 30 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 …]
|
D | test_current_task_under_cgroup_kern.c | 33 int idx = 0; in bpf_prog1() local 38 bpf_map_update_elem(&perf_map, &idx, &pid, BPF_ANY); in bpf_prog1()
|
D | xdp_sample_pkts_user.c | 28 static int do_attach(int idx, int fd, const char *name) in do_attach() argument 34 err = bpf_set_link_xdp_fd(idx, fd, xdp_flags); in do_attach() 50 static int do_detach(int idx, const char *name) in do_detach() argument 55 err = bpf_get_link_xdp_id(idx, &curr_prog_id, 0); in do_detach() 61 err = bpf_set_link_xdp_fd(idx, -1, 0); in do_detach()
|
D | bpf_load.h | 27 typedef void (*fixup_map_cb)(struct bpf_map_data *map, int idx);
|
D | xdpsock_user.c | 315 u32 idx; in xsk_configure_socket() local 339 &idx); in xsk_configure_socket() 343 *xsk_ring_prod__fill_addr(&xsk->umem->fq, idx++) = in xsk_configure_socket() 532 u32 idx; in complete_tx_only() local 540 rcvd = xsk_ring_cons__peek(&xsk->umem->cq, BATCH_SIZE, &idx); in complete_tx_only() 613 u32 idx; in tx_only() local 615 if (xsk_ring_prod__reserve(&xsk->tx, BATCH_SIZE, &idx) == BATCH_SIZE) { in tx_only() 619 xsk_ring_prod__tx_desc(&xsk->tx, idx + i)->addr = in tx_only() 621 xsk_ring_prod__tx_desc(&xsk->tx, idx + i)->len = in tx_only()
|
D | map_perf_test_user.c | 395 static void fixup_map(struct bpf_map_data *map, int idx) in fixup_map() argument 400 inner_lru_hash_idx = idx; in fixup_map() 410 array_of_lru_hashs_idx = idx; in fixup_map() 414 lru_hash_lookup_idx = idx; in fixup_map()
|
/samples/seccomp/ |
D | bpf-helper.h | 66 #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/ |
D | cn_test.c | 28 __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()
|
D | ucon.c | 66 __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/mic/mpssd/ |
D | mpssd.c | 515 while (avail_idx == le16toh(READ_ONCE(vr->vr.avail->idx))) { in spin_for_descriptors() 519 le16toh(vr->vr.avail->idx), vr->info->avail_idx); in spin_for_descriptors() 657 le16toh(rx_vr.vr.avail->idx)) { in virtio_net() 856 le16toh(rx_vr.vr.avail->idx)) { in virtio_console() 1216 le16toh(vring.vr.avail->idx)) { in virtio_block()
|
/samples/vfio-mdev/ |
D | mtty.c | 56 #define CIRCULAR_BUF_INC_IDX(idx) (idx = (idx + 1) & (MAX_FIFO_SIZE - 1)) argument
|