/tools/testing/selftests/bpf/prog_tests/ |
D | global_data_init.c | 8 __u8 *buff = NULL, *newval = NULL; in test_global_data_init() local 46 buff = malloc(sz); in test_global_data_init() 47 if (buff) in test_global_data_init() 48 err = bpf_map_lookup_elem(map_fd, &zero, buff); in test_global_data_init() 49 if (CHECK(!buff || err || memcmp(buff, newval, sz), in test_global_data_init() 59 free(buff); in test_global_data_init()
|
D | tailcalls.c | 17 char buff[128] = {}; in test_tailcall_1() local 57 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_1() 67 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_1() 88 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_1() 113 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_1() 123 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_1() 133 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_1() 155 char buff[128] = {}; in test_tailcall_2() local 194 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_2() 204 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_2() [all …]
|
D | global_data.c | 107 __u8 *buff; in test_global_data_rdonly() local 117 buff = malloc(bpf_map__def(map)->value_size); in test_global_data_rdonly() 118 if (buff) in test_global_data_rdonly() 119 err = bpf_map_update_elem(map_fd, &zero, buff, 0); in test_global_data_rdonly() 120 free(buff); in test_global_data_rdonly()
|
/tools/usb/usbip/libsrc/ |
D | usbip_common.c | 101 char buff[100]; in dump_usb_interface() local 103 usbip_names_get_class(buff, sizeof(buff), in dump_usb_interface() 107 dbg("%-20s = %s", "Interface(C/SC/P)", buff); in dump_usb_interface() 112 char buff[100]; in dump_usb_device() local 117 usbip_names_get_class(buff, sizeof(buff), in dump_usb_device() 121 dbg("%-20s = %s", "Device(C/SC/P)", buff); in dump_usb_device() 125 usbip_names_get_product(buff, sizeof(buff), in dump_usb_device() 128 dbg("%-20s = %s", "Vendor/Product", buff); in dump_usb_device() 278 void usbip_names_get_product(char *buff, size_t size, uint16_t vendor, in usbip_names_get_product() argument 292 snprintf(buff, size, "%s : %s (%04x:%04x)", vend, prod, vendor, product); in usbip_names_get_product() [all …]
|
D | vhci_driver.c | 359 char buff[200]; /* what size should be ? */ in usbip_vhci_attach_device2() local 365 snprintf(buff, sizeof(buff), "%u %d %u %u", in usbip_vhci_attach_device2() 367 dbg("writing: %s", buff); in usbip_vhci_attach_device2() 374 ret = write_sysfs_attribute(attach_attr_path, buff, strlen(buff)); in usbip_vhci_attach_device2() 403 char buff[200]; /* what size should be ? */ in usbip_vhci_detach_device() local 407 snprintf(buff, sizeof(buff), "%u", port); in usbip_vhci_detach_device() 408 dbg("writing: %s", buff); in usbip_vhci_detach_device() 415 ret = write_sysfs_attribute(detach_attr_path, buff, strlen(buff)); in usbip_vhci_detach_device()
|
D | usbip_common.h | 147 void usbip_names_get_product(char *buff, size_t size, uint16_t vendor, 149 void usbip_names_get_class(char *buff, size_t size, uint8_t class,
|
/tools/bpf/ |
D | bpf_jit_disasm.c | 106 char *buff; in get_klog_buff() local 112 buff = malloc(len); in get_klog_buff() 113 if (!buff) in get_klog_buff() 116 ret = klogctl(CMD_ACTION_READ_ALL, buff, len); in get_klog_buff() 118 free(buff); in get_klog_buff() 123 return buff; in get_klog_buff() 130 char *buff; in get_flog_buff() local 141 buff = malloc(len); in get_flog_buff() 142 if (!buff) in get_flog_buff() 145 memset(buff, 0, len); in get_flog_buff() [all …]
|
/tools/bpf/bpftool/ |
D | tracelog.c | 25 char *buff; variable 115 free(buff); in exit_tracelog() 151 ret = getline(&buff, &buff_len, trace_pipe_fd); in do_tracelog() 158 jsonw_string(json_wtr, buff); in do_tracelog() 160 printf("%s", buff); in do_tracelog() 164 free(buff); in do_tracelog()
|
D | xlated_dumper.c | 26 char buff[256]; in kernel_syms_load() local 34 while (fgets(buff, sizeof(buff), fp)) { in kernel_syms_load() 46 if (sscanf(buff, "%p %*c %s", &address, sym->name) != 2) in kernel_syms_load()
|
D | common.c | 120 mnt_fs(const char *target, const char *type, char *buff, size_t bufflen) in mnt_fs() argument 126 snprintf(buff, bufflen, in mnt_fs() 133 snprintf(buff, bufflen, in mnt_fs() 143 snprintf(buff, bufflen, "mount -t %s %s %s failed: %s", in mnt_fs()
|
/tools/testing/selftests/bpf/ |
D | test_tag.c | 94 char buff[256]; in tag_from_fdinfo() local 98 snprintf(buff, sizeof(buff), "/proc/%d/fdinfo/%d", getpid(), in tag_from_fdinfo() 100 fp = fopen(buff, "r"); in tag_from_fdinfo() 103 while (fgets(buff, sizeof(buff), fp)) { in tag_from_fdinfo() 104 if (strncmp(buff, "prog_tag:\t", prefix_len)) in tag_from_fdinfo() 106 ret = hex2bin(tag, buff + prefix_len, len); in tag_from_fdinfo()
|
/tools/usb/usbip/src/ |
D | usbip_network.c | 95 static ssize_t usbip_net_xmit(int sockfd, void *buff, size_t bufflen, in usbip_net_xmit() argument 106 nbytes = send(sockfd, buff, bufflen, 0); in usbip_net_xmit() 108 nbytes = recv(sockfd, buff, bufflen, MSG_WAITALL); in usbip_net_xmit() 113 buff = (void *)((intptr_t) buff + nbytes); in usbip_net_xmit() 122 ssize_t usbip_net_recv(int sockfd, void *buff, size_t bufflen) in usbip_net_recv() argument 124 return usbip_net_xmit(sockfd, buff, bufflen, 0); in usbip_net_recv() 127 ssize_t usbip_net_send(int sockfd, void *buff, size_t bufflen) in usbip_net_send() argument 129 return usbip_net_xmit(sockfd, buff, bufflen, 1); in usbip_net_send()
|
D | usbip_attach.c | 43 char buff[MAX_BUFF+1]; in record_connection() local 67 snprintf(buff, MAX_BUFF, "%s %s %s\n", in record_connection() 70 ret = write(fd, buff, strlen(buff)); in record_connection() 71 if (ret != (ssize_t) strlen(buff)) { in record_connection()
|
D | usbip_network.h | 168 ssize_t usbip_net_recv(int sockfd, void *buff, size_t bufflen); 169 ssize_t usbip_net_send(int sockfd, void *buff, size_t bufflen);
|
/tools/testing/selftests/mqueue/ |
D | mq_perf_tests.c | 325 char buff[MSG_SIZE]; in cont_thread() local 334 while (mq_send(queue, buff, sizeof(buff), 0) == 0) in cont_thread() 336 mq_receive(queue, buff, sizeof(buff), &priority); in cont_thread() 341 while (mq_receive(queue, buff, MSG_SIZE, &prio_in) == MSG_SIZE) 345 if (mq_send(queue, buff, MSG_SIZE, prio_out)) \ 352 if (mq_send(queue, buff, MSG_SIZE, prio_out)) \ 355 if (mq_receive(queue, buff, MSG_SIZE, &prio_in) != MSG_SIZE) \ 427 char buff[MSG_SIZE]; in perf_test_thread() local
|
/tools/perf/examples/bpf/ |
D | augmented_syscalls.c | 160 void *buff; member
|
/tools/perf/trace/beauty/include/linux/ |
D | socket.h | 417 extern int __sys_sendto(int fd, void __user *buff, size_t len,
|
/tools/lib/bpf/ |
D | libbpf.c | 3621 char file[PATH_MAX], buff[4096]; in bpf_get_map_info_from_fdinfo() local 3637 while (fgets(buff, sizeof(buff), fp)) { in bpf_get_map_info_from_fdinfo() 3638 if (sscanf(buff, "map_type:\t%u", &val) == 1) in bpf_get_map_info_from_fdinfo() 3640 else if (sscanf(buff, "key_size:\t%u", &val) == 1) in bpf_get_map_info_from_fdinfo() 3642 else if (sscanf(buff, "value_size:\t%u", &val) == 1) in bpf_get_map_info_from_fdinfo() 3644 else if (sscanf(buff, "max_entries:\t%u", &val) == 1) in bpf_get_map_info_from_fdinfo() 3646 else if (sscanf(buff, "map_flags:\t%i", &val) == 1) in bpf_get_map_info_from_fdinfo()
|
/tools/testing/selftests/filesystems/incfs/ |
D | incfs_test.c | 581 uint8_t buff[16 * 1024]; in read_whole_file() local 588 int read_result = read(fd, buff, ARRAY_SIZE(buff)); in read_whole_file()
|