Home
last modified time | relevance | path

Searched refs:buff (Results 1 – 25 of 29) sorted by relevance

12

/tools/verification/rvgen/rvgen/
A Ddot2c.py39 buff = []
46 return buff
53 buff = []
58 return buff
61 buff = []
79 buff = []
102 buff = []
113 buff = []
137 buff = []
144 buff = []
[all …]
A Ddot2k.py28 buff = []
31 buff.append("{")
45 buff.append("")
49 buff = []
55 buff = []
61 buff = []
63 buff.append("/*")
67 buff.append(" */")
68 buff.append("")
70 return buff
[all …]
A Dltl2k.py205 buff = []
206 buff.append("static void handle_example_event(void *data, /* XXX: fill header */)")
207 buff.append("{")
208 buff.append("\tltl_atom_update(task, LTL_%s, true/false);" % self.atoms[0])
209 buff.append("}")
210 buff.append("")
211 return '\n'.join(buff)
222 buff = []
224 buff.append("\tltl_atom_set(mon, LTL_%s, true/false);" % a)
225 return '\n'.join(buff)
A Dgenerator.py122 buff = []
123 buff.append(" # XXX: add dependencies if there")
125 buff.append(" depends on RV_MON_%s" % self.parent.upper())
126 buff.append(" default y")
127 return '\n'.join(buff)
/tools/testing/selftests/bpf/prog_tests/
A Dassign_reuse.c39 char buff[1] = {}; in echo_test_udp() local
46 ASSERT_EQ(send(fd_cl, buff, sizeof(buff), 0), 1, "send_client"); in echo_test_udp()
48 ret = recv(fd_sv, buff, sizeof(buff), 0); in echo_test_udp()
55 ASSERT_EQ(sendto(fd_sv, buff, sizeof(buff), 0, (void *)&addr, len), 1, "send_server"); in echo_test_udp()
56 ASSERT_EQ(recv(fd_cl, buff, sizeof(buff), 0), 1, "recv_client"); in echo_test_udp()
63 char buff[1] = {}; in echo_test_tcp() local
73 ASSERT_EQ(send(fd_cl, buff, sizeof(buff), 0), 1, "send_client"); in echo_test_tcp()
74 ASSERT_EQ(recv(fd_sv_cl, buff, sizeof(buff), 0), 1, "recv_server"); in echo_test_tcp()
75 ASSERT_EQ(send(fd_sv_cl, buff, sizeof(buff), 0), 1, "send_server"); in echo_test_tcp()
76 ASSERT_EQ(recv(fd_cl, buff, sizeof(buff), 0), 1, "recv_client"); in echo_test_tcp()
A Dglobal_data_init.c8 __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()
A Dglobal_data.c107 __u8 *buff; in test_global_data_rdonly() local
124 buff = malloc(bpf_map__value_size(map)); in test_global_data_rdonly()
125 if (buff) in test_global_data_rdonly()
126 err = bpf_map_update_elem(map_fd, &zero, buff, 0); in test_global_data_rdonly()
127 free(buff); in test_global_data_rdonly()
A Dtailcalls.c23 char buff[128] = {}; in test_tailcall_1() local
25 .data_in = buff, in test_tailcall_1()
159 char buff[128] = {}; in test_tailcall_2() local
161 .data_in = buff, in test_tailcall_2()
236 char buff[128] = {}; in test_tailcall_count() local
238 .data_in = buff, in test_tailcall_count()
422 .data_in = buff, in test_tailcall_4()
512 .data_in = buff, in test_tailcall_5()
684 .data_in = buff, in test_tailcall_bpf2bpf_2()
1023 .data_in = buff, in test_tailcall_bpf2bpf_fentry_entry()
[all …]
/tools/testing/selftests/bpf/progs/
A Dverifier_const.c18 char buff[] = { '8', '4', '\0' }; in tcx1() local
19 bpf_strtol(buff, sizeof(buff), 0, (long *)&foo); in tcx1()
28 char buff[] = { '8', '4', '\0' }; in tcx2() local
29 bpf_strtol(buff, sizeof(buff), 0, &bar); in tcx2()
38 char buff[] = { '8', '4', '\0' }; in tcx3() local
39 bpf_strtol(buff, sizeof(buff), 0, &bart); in tcx3()
/tools/usb/usbip/libsrc/
A Dusbip_common.c101 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 …]
A Dvhci_driver.c359 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()
A Dusbip_common.h147 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/
A Dbpf_jit_disasm.c111 char *buff; in get_klog_buff() local
117 buff = malloc(len); in get_klog_buff()
118 if (!buff) in get_klog_buff()
123 free(buff); in get_klog_buff()
128 return buff; in get_klog_buff()
135 char *buff; in get_flog_buff() local
146 buff = malloc(len); in get_flog_buff()
147 if (!buff) in get_flog_buff()
157 return buff; in get_flog_buff()
159 free(buff); in get_flog_buff()
[all …]
/tools/bpf/bpftool/
A Dtracelog.c25 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()
A Dxlated_dumper.c29 char buff[256]; in kernel_syms_load() local
37 while (fgets(buff, sizeof(buff), fp)) { in kernel_syms_load()
53 if (sscanf(buff, "%p %*c %s [%[^]]s", &address, sym->name, sym->module) < 2) in kernel_syms_load()
/tools/testing/selftests/bpf/
A Dtest_tag.c94 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/testing/selftests/bpf/map_tests/
A Dlpm_trie_map_batch_ops.c27 char buff[16] = { 0 }; in map_batch_update() local
35 snprintf(buff, 16, "192.168.1.%d", i + 1); in map_batch_update()
36 inet_pton(AF_INET, buff, &keys[i].ipv4); in map_batch_update()
47 char buff[16] = { 0 }; in map_batch_verify() local
53 inet_ntop(AF_INET, &keys[i].ipv4, buff, 32); in map_batch_verify()
54 CHECK(sscanf(buff, "192.168.1.%d", &lower_byte) == EOF, in map_batch_verify()
57 "error: i %d key %s value %d\n", i, buff, values[i]); in map_batch_verify()
/tools/usb/usbip/src/
A Dusbip_network.c95 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()
A Dusbip_attach.c43 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()
A Dusbip_network.h168 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/lib/api/
A Dio_dir.h56 struct io_dirent64 buff[4]; member
76 ssize_t rc = perf_getdents64(iod->dirfd, iod->buff, sizeof(iod->buff)); in io_dir__readdir()
81 iod->next = iod->buff; in io_dir__readdir()
/tools/testing/selftests/connector/
A Dproc_filter.c42 char buff[NL_MESSAGE_SIZE]; in send_message() local
46 hdr = (struct nlmsghdr *)buff; in send_message()
134 int handle_packet(char *buff, int fd, struct proc_event *event) in handle_packet() argument
138 hdr = (struct nlmsghdr *)buff; in handle_packet()
215 char buff[CONNECTOR_MAX_MSG_SIZE]; in handle_events() local
229 if (recv(ev[i].data.fd, buff, sizeof(buff), 0) == -1) { in handle_events()
234 err = handle_packet(buff, ev[i].data.fd, pev); in handle_events()
/tools/testing/selftests/mqueue/
A Dmq_perf_tests.c325 char buff[MSG_SIZE]; in cont_thread() local
335 while (mq_send(queue, buff, sizeof(buff), 0) == 0) in cont_thread()
337 mq_receive(queue, buff, sizeof(buff), &priority); in cont_thread()
342 while (mq_receive(queue, buff, MSG_SIZE, &prio_in) == MSG_SIZE)
346 if (mq_send(queue, buff, MSG_SIZE, prio_out)) \
353 if (mq_send(queue, buff, MSG_SIZE, prio_out)) \
356 if (mq_receive(queue, buff, MSG_SIZE, &prio_in) != MSG_SIZE) \
428 char buff[MSG_SIZE]; in perf_test_thread() local
/tools/testing/selftests/powerpc/pmu/sampling_tests/
A Dmisc.c181 void *buff; in event_sample_buf_mmap() local
190 buff = mmap(NULL, mmap_size, in event_sample_buf_mmap()
193 if (buff == MAP_FAILED) { in event_sample_buf_mmap()
197 return buff; in event_sample_buf_mmap()
/tools/tracing/rtla/src/
A Dosnoise_hist.c143 char buff[128]; in osnoise_init_trace_hist() local
150 snprintf(buff, sizeof(buff), "duration.buckets=%d", bucket_size); in osnoise_init_trace_hist()
153 buff, TRACEFS_HIST_KEY_NORMAL); in osnoise_init_trace_hist()

Completed in 37 milliseconds

12