| /samples/bpf/ |
| A D | hash_func01.h | 10 __u32 SuperFastHash (const char *data, int len, __u32 initval) { in SuperFastHash() argument 15 if (len <= 0 || data == NULL) return 0; in SuperFastHash() 17 rem = len & 3; in SuperFastHash() 18 len >>= 2; in SuperFastHash() 22 for (;len > 0; len--) { in SuperFastHash()
|
| A D | tracex1.bpf.c | 29 int len; in bpf_prog1() local 33 len = BPF_CORE_READ(skb, len); in bpf_prog1() 40 bpf_trace_printk(fmt, sizeof(fmt), skb, len); in bpf_prog1()
|
| A D | hbm_out_kern.c | 61 int len = skb->len; in _hbm_out_cg() local 109 credit -= len; in _hbm_out_cg() 125 (len > LARGE_PKT_THRESH && credit < -LARGE_PKT_DROP_THRESH)) { in _hbm_out_cg() 156 } else if (len > LARGE_PKT_THRESH) { in _hbm_out_cg() 167 hbm_update_stats(qsp, len, curtime, congestion_flag, drop_flag, in _hbm_out_cg() 171 __sync_add_and_fetch(&(qdp->credit), len); in _hbm_out_cg()
|
| A D | hbm_edt_kern.c | 68 int len = skb->len; in _hbm_out_cg() local 101 delta_send = BYTES_TO_NS(len, qdp->rate); in _hbm_out_cg() 116 len > LARGE_PKT_THRESH)) { in _hbm_out_cg() 139 } else if (len > LARGE_PKT_THRESH) { in _hbm_out_cg() 156 hbm_update_stats(qsp, len, curtime, congestion_flag, drop_flag, in _hbm_out_cg()
|
| A D | cpustat_user.c | 155 int len, fd; in cpu_stat_inject_cpu_frequency_event() local 163 len = write(fd, CPUFREQ_LOWEST_FREQ, strlen(CPUFREQ_LOWEST_FREQ)); in cpu_stat_inject_cpu_frequency_event() 164 if (len < 0) { in cpu_stat_inject_cpu_frequency_event() 169 len = write(fd, CPUFREQ_HIGHEST_FREQ, strlen(CPUFREQ_HIGHEST_FREQ)); in cpu_stat_inject_cpu_frequency_event() 170 if (len < 0) { in cpu_stat_inject_cpu_frequency_event() 177 return len; in cpu_stat_inject_cpu_frequency_event()
|
| A D | hbm_kern.h | 156 int len, in hbm_update_stats() argument 169 __sync_add_and_fetch(&(qsp->bytes_total), len); in hbm_update_stats() 178 __sync_add_and_fetch(&(qsp->bytes_marked), len); in hbm_update_stats() 183 len); in hbm_update_stats()
|
| A D | sockex1_kern.c | 26 __sync_fetch_and_add(value, skb->len); in bpf_prog1()
|
| A D | task_fd_query_user.c | 95 __u32 len, prog_id, fd_type; in test_debug_fs_kprobe() local 99 len = sizeof(buf); in test_debug_fs_kprobe() 101 err = bpf_task_fd_query(getpid(), event_fd, 0, buf, &len, in test_debug_fs_kprobe() 233 __u32 len, prog_id, fd_type; in test_debug_fs_uprobe() local 279 len = sizeof(buf); in test_debug_fs_uprobe() 280 err = bpf_task_fd_query(getpid(), kfd, 0, buf, &len, in test_debug_fs_uprobe()
|
| A D | lwt_len_hist.bpf.c | 51 key = log2l(skb->len); in do_len_hist()
|
| A D | cookie_uid_helper_example.c | 127 offsetof(struct __sk_buff, len)), in prog_load() 153 offsetof(struct __sk_buff, len)), in prog_load() 157 offsetof(struct __sk_buff, len)), in prog_load()
|
| A D | tracex5_user.c | 28 .len = (unsigned short)ARRAY_SIZE(filter), in install_accept_all_seccomp()
|
| /samples/watch_queue/ |
| A D | watch_test.c | 48 static void saw_key_change(struct watch_notification *n, size_t len) in saw_key_change() argument 52 if (len != sizeof(struct key_notification)) { in saw_key_change() 95 size_t largest, len; in consumer() local 109 len = n.n.info & WATCH_INFO_LENGTH; in consumer() 110 if (len < sizeof(n.n) || len > largest) { in consumer() 111 fprintf(stderr, "Bad message length: %zu/%zu\n", len, largest); in consumer() 132 saw_key_change(&n.n, len); in consumer() 139 p += len; in consumer()
|
| /samples/rust/ |
| A D | rust_configfs.rs | 98 page[0..data.len()].copy_from_slice(data); 99 Ok(data.len()) 111 let len = guard.1; 112 page[0..len].copy_from_slice(&data[0..len]); 113 Ok(len) 119 guard.0[0..page.len()].copy_from_slice(page); in store() 120 guard.1 = page.len(); in store() 167 page[0..data.len()].copy_from_slice(data); 168 Ok(data.len()) 189 page[0..data.len()].copy_from_slice(data); [all …]
|
| /samples/fanotify/ |
| A D | fs-monitor.c | 58 static void handle_notifications(char *buffer, int len) in handle_notifications() argument 67 for (; FAN_EVENT_OK(event, len); event = FAN_EVENT_NEXT(event, len)) { in handle_notifications() 83 off += info->len) { in handle_notifications() 92 err->hdr.len); in handle_notifications() 111 info->info_type, info->len); in handle_notifications()
|
| /samples/connector/ |
| A D | cn_test.c | 29 msg->seq, msg->ack, msg->len, in cn_test_callback() 30 msg->len ? (char *)msg->data : ""); in cn_test_callback() 73 msg->len = size0 - sizeof(*msg); 80 ctl->len = msg->len - sizeof(*ctl); 127 m->len = sizeof(data); in cn_test_timer_func() 129 m->len = in cn_test_timer_func() 133 memcpy(m + 1, data, m->len); in cn_test_timer_func()
|
| A D | ucon.c | 54 size = NLMSG_SPACE(sizeof(struct cn_msg) + msg->len); in netlink_send() 66 __func__, msg->id.idx, msg->id.val, msg->len, msg->seq, msg->ack); in netlink_send() 68 memcpy(m, msg, sizeof(*m) + msg->len); in netlink_send() 101 int len; in main() local 174 data->len = 0; in main() 178 len = netlink_send(s, data); in main() 208 len = recv(s, buf, sizeof(buf), 0); in main() 209 if (len == -1) { in main()
|
| /samples/cgroup/ |
| A D | memcg_event_listener.c | 27 (length) -= sizeof(*(event)) + (event)->len; \ 64 size_t len = strlen(name); in get_memcg_counter() local 68 if (memcmp(line, name, len)) { in get_memcg_counter() 75 len += 1; in get_memcg_counter() 78 tmp = strtol(&line[len], &endptr, 10); in get_memcg_counter() 81 warnx("Failed to parse: %s", &line[len]); in get_memcg_counter() 85 if (endptr == &line[len]) { in get_memcg_counter() 86 warnx("Not digits were found in line %s", &line[len]); in get_memcg_counter() 107 size_t len = 0; in read_memcg_events() local 157 nread = getline(&line, &len, fp); in read_memcg_events()
|
| /samples/mei/ |
| A D | mei-amt-version.c | 155 ssize_t len, unsigned long timeout) in mei_recv_msg() argument 164 mei_msg(me, "call read length = %zd\n", len); in mei_recv_msg() 182 rc = read(me->fd, buffer, len); in mei_recv_msg() 199 ssize_t len, unsigned long timeout) in mei_send_msg() argument 204 mei_msg(me, "call write length = %zd\n", len); in mei_send_msg() 206 written = write(me->fd, buffer, len); in mei_send_msg() 323 uint32_t len; in amt_verify_code_versions() local 338 len = code_ver->versions[i].description.length; in amt_verify_code_versions() 340 if (len > AMT_UNICODE_STRING_LEN) { in amt_verify_code_versions() 345 len = code_ver->versions[i].version.length; in amt_verify_code_versions() [all …]
|
| /samples/vfs/ |
| A D | test-statx.c | 53 int len; in print_time() local 60 len = strftime(buffer, 100, "%F %T", &tm); in print_time() 61 if (len == 0) { in print_time() 66 fwrite(buffer, 1, len, stdout); in print_time() 68 len = strftime(buffer, 100, "%z", &tm); in print_time() 69 if (len == 0) { in print_time() 73 fwrite(buffer, 1, len, stdout); in print_time()
|
| /samples/hidraw/ |
| A D | hid-example.c | 24 #define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len) argument 25 #define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len) argument
|
| /samples/trace_events/ |
| A D | trace-events-sample.c | 27 int len = cnt % 5; in do_simple_thread_func() local 33 for (i = 0; i < len; i++) in do_simple_thread_func() 40 trace_foo_bar("hello", cnt, array, random_strings[len], in do_simple_thread_func()
|
| /samples/fprobe/ |
| A D | fprobe_example.c | 45 unsigned int len; in show_backtrace() local 47 len = stack_trace_save(stacks, BACKTRACE_DEPTH, 2); in show_backtrace() 48 stack_trace_print(stacks, len, 24); in show_backtrace()
|
| /samples/seccomp/ |
| A D | bpf-direct.c | 68 size_t len; in emulator() local 75 len = (size_t) ctx->uc_mcontext.gregs[REG_ARG2]; in emulator() 84 bytes = write(STDOUT_FILENO, buf, len); in emulator() 146 .len = (unsigned short)(sizeof(filter)/sizeof(filter[0])), in install_filter()
|
| A D | dropper.c | 42 .len = (unsigned short)(sizeof(filter)/sizeof(filter[0])), in install_filter()
|
| /samples/rpmsg/ |
| A D | rpmsg_client_sample.c | 25 static int rpmsg_sample_cb(struct rpmsg_device *rpdev, void *data, int len, in rpmsg_sample_cb() argument 34 print_hex_dump_debug(__func__, DUMP_PREFIX_NONE, 16, 1, data, len, in rpmsg_sample_cb()
|