| /tools/testing/selftests/ublk/ |
| A D | null.c | 66 io_uring_prep_buf_register(sqe[0], 0, tag, q->q_id, ublk_get_io(q, tag)->buf_index); in null_queue_zc_io() 71 __setup_nop_io(tag, iod, sqe[1], q->q_id); in null_queue_zc_io() 74 io_uring_prep_buf_unregister(sqe[2], 0, tag, q->q_id, ublk_get_io(q, tag)->buf_index); in null_queue_zc_io() 97 struct ublk_io *io = ublk_get_io(q, tag); in ublk_null_io_done() 111 if (ublk_completed_tgt_io(t, q, tag)) in ublk_null_io_done() 112 ublk_complete_io(t, q, tag, io->result); in ublk_null_io_done() 120 unsigned zc = ublk_queue_use_zc(q); in ublk_null_queue_io() 126 queued = null_queue_zc_io(t, q, tag); in ublk_null_queue_io() 131 ublk_queued_tgt_io(t, q, tag, queued); in ublk_null_queue_io() 141 if (ublk_queue_auto_zc_fallback(q)) in ublk_null_buf_index() [all …]
|
| A D | file_backed.c | 34 unsigned zc = ublk_queue_use_zc(q); in loop_queue_tgt_rw_io() 35 unsigned auto_zc = ublk_queue_use_auto_zc(q); in loop_queue_tgt_rw_io() 59 io_uring_prep_buf_register(sqe[0], 0, tag, q->q_id, ublk_get_io(q, tag)->buf_index); in loop_queue_tgt_rw_io() 71 io_uring_prep_buf_unregister(sqe[2], 0, tag, q->q_id, ublk_get_io(q, tag)->buf_index); in loop_queue_tgt_rw_io() 85 ret = loop_queue_flush_io(t, q, iod, tag); in loop_queue_tgt_io() 93 ret = loop_queue_tgt_rw_io(t, q, iod, tag); in loop_queue_tgt_io() 108 int queued = loop_queue_tgt_io(t, q, tag); in ublk_loop_queue_io() 110 ublk_queued_tgt_io(t, q, tag, queued); in ublk_loop_queue_io() 119 struct ublk_io *io = ublk_get_io(q, tag); in ublk_loop_io_done() 133 if (ublk_completed_tgt_io(t, q, tag)) in ublk_loop_io_done() [all …]
|
| A D | kublk.h | 190 struct ublk_queue q[UBLK_MAX_QUEUES]; member 313 q->ios[tag].result = res; in ublk_set_io_res() 318 return q->ios[tag].result; in ublk_get_io_res() 329 return &q->io_cmd_buf[tag]; in ublk_get_iod() 342 return &q->ios[tag]; in ublk_get_io() 348 struct ublk_io *io = &q->ios[tag]; in ublk_complete_io() 359 ublk_complete_io(t, q, tag, queued); in ublk_queued_tgt_io() 370 struct ublk_queue *q, unsigned tag) in ublk_completed_tgt_io() argument 372 struct ublk_io *io = ublk_get_io(q, tag); in ublk_completed_tgt_io() 386 return q->flags & UBLK_F_AUTO_BUF_REG; in ublk_queue_use_auto_zc() [all …]
|
| A D | fault_inject.c | 42 struct ublk_queue *q, int tag) in ublk_fault_inject_queue_io() argument 44 const struct ublksrv_io_desc *iod = ublk_get_iod(q, tag); in ublk_fault_inject_queue_io() 47 .tv_nsec = (long long)q->dev->private_data, in ublk_fault_inject_queue_io() 52 sqe->user_data = build_user_data(tag, ublksrv_get_op(iod), 0, q->q_id, 1); in ublk_fault_inject_queue_io() 54 ublk_queued_tgt_io(t, q, tag, 1); in ublk_fault_inject_queue_io() 60 struct ublk_queue *q, in ublk_fault_inject_tgt_io_done() argument 64 const struct ublksrv_io_desc *iod = ublk_get_iod(q, tag); in ublk_fault_inject_tgt_io_done() 69 if (ublk_completed_tgt_io(t, q, tag)) in ublk_fault_inject_tgt_io_done() 70 ublk_complete_io(t, q, tag, iod->nr_sectors << 9); in ublk_fault_inject_tgt_io_done()
|
| A D | stripe.c | 30 return (struct stripe_conf *)q->dev->private_data; in get_chunk_shift() 131 unsigned zc = (ublk_queue_use_zc(q) != 0); in stripe_queue_tgt_rw_io() 135 struct ublk_io *io = ublk_get_io(q, tag); in stripe_queue_tgt_rw_io() 148 ublk_cmd_op_nr(sqe[0]->cmd_op), 0, q->q_id, 1); in stripe_queue_tgt_rw_io() 205 ret = handle_flush(t, q, iod, tag); in stripe_queue_tgt_io() 213 ret = stripe_queue_tgt_rw_io(t, q, iod, tag); in stripe_queue_tgt_io() 227 int queued = stripe_queue_tgt_io(t, q, tag); in ublk_stripe_queue_io() 229 ublk_queued_tgt_io(t, q, tag, queued); in ublk_stripe_queue_io() 239 struct ublk_io *io = ublk_get_io(q, tag); in ublk_stripe_io_done() 265 if (ublk_completed_tgt_io(t, q, tag)) { in ublk_stripe_io_done() [all …]
|
| A D | kublk.c | 416 munmap(q->io_cmd_buf, ublk_queue_cmd_buf_sz(q)); in ublk_queue_deinit() 444 q->flags = 0; in ublk_queue_init() 455 q->dev->dev_info.dev_id, q->q_id); in ublk_queue_init() 575 buf.index = q->tgt_ops->buf_index(q, tag); in ublk_set_auto_buf_reg() 678 q = &t->dev->q[q_id]; in ublk_submit_fetch_commands() 688 struct ublk_queue *q = &t->dev->q[t->idx]; in ublk_submit_fetch_commands() local 718 q->tgt_ops->tgt_io_done(t, q, cqe); in ublksrv_handle_tgt_cqe() 738 q->tgt_ops->queue_io(t, q, tag); in ublk_handle_uring_cmd() 760 struct ublk_queue *q = &dev->q[q_id]; in ublk_handle_cqe() local 898 memcpy(&ctx->shadow_dev->q, &dev->q, sizeof(dev->q)); in ublk_send_dev_event() [all …]
|
| /tools/testing/selftests/proc/ |
| A D | proc-pid-vm.c | 508 memset(&q, 0, sizeof(q)); in main() 509 q.size = sizeof(q); in main() 511 q.query_flags = 0; in main() 537 memset(&q, 0, sizeof(q)); in main() 538 q.size = sizeof(q); in main() 547 memset(&q, 0, sizeof(q)); in main() 548 q.size = sizeof(q); in main() 561 memset(&q, 0, sizeof(q)); in main() 562 q.size = sizeof(q); in main() 571 memset(&q, 0, sizeof(q)); in main() [all …]
|
| /tools/testing/selftests/bpf/progs/ |
| A D | bpf_qdisc_fq.c | 304 return (s64)skb->tstamp > (s64)(q.ktime_cache + q.horizon); in fq_packet_beyond_horizon() 329 skb->tstamp = q.ktime_cache + q.horizon; in BPF_PROG() 384 sch->q.qlen++; in BPF_PROG() 451 q.unthrottle_latency_ns -= q.unthrottle_latency_ns >> 3; in fq_check_throttled() 595 if (!sch->q.qlen) in BPF_PROG() 612 sch->q.qlen--; in BPF_PROG() 698 sch->q.qlen = 0; in BPF_PROG() 708 q.new_flow_cnt = 0; in BPF_PROG() 709 q.old_flow_cnt = 0; in BPF_PROG() 732 q.horizon_drop = 1; in BPF_PROG() [all …]
|
| A D | test_spin_lock.c | 55 struct bpf_vqueue *q; in bpf_spin_lock_test() local 80 q = bpf_map_lookup_elem(&vqueue, &key); in bpf_spin_lock_test() 81 if (!q) in bpf_spin_lock_test() 84 bpf_spin_lock(&q->lock); in bpf_spin_lock_test() 85 q->credit += CREDIT_PER_NS(curtime - q->lasttime, q->rate); in bpf_spin_lock_test() 86 q->lasttime = curtime; in bpf_spin_lock_test() 87 if (q->credit > max_credit) in bpf_spin_lock_test() 88 q->credit = max_credit; in bpf_spin_lock_test() 89 q->credit -= pkt_len; in bpf_spin_lock_test() 90 credit = q->credit; in bpf_spin_lock_test() [all …]
|
| A D | test_map_lock.c | 39 struct array_elem *q; in bpf_map_lock_test() local 51 q = bpf_map_lookup_elem(&array_map, &key); in bpf_map_lock_test() 52 if (!q) in bpf_map_lock_test() 54 bpf_spin_lock(&q->lock); in bpf_map_lock_test() 56 q->var[i] = rnd; in bpf_map_lock_test() 57 bpf_spin_unlock(&q->lock); in bpf_map_lock_test()
|
| A D | bpf_qdisc_fifo.c | 26 if (sch->q.qlen == sch->limit) in BPF_PROG() 35 sch->q.qlen++; in BPF_PROG() 72 sch->q.qlen--; in BPF_PROG() 93 bpf_for(i, 0, sch->q.qlen) { in BPF_PROG() 109 sch->q.qlen = 0; in BPF_PROG()
|
| /tools/perf/util/ |
| A D | demangle-java.c | 50 const char *q; in __demangle_java_sym() local 55 for (q = str; q != end; q++) { in __demangle_java_sym() 60 switch (*q) { in __demangle_java_sym() 73 buf[rlen++] = *q; in __demangle_java_sym() 86 rlen += scnprintf(buf + rlen, maxlen - rlen, "%s", base_types[*q - 'A']); in __demangle_java_sym() 92 buf[rlen++] = *q; in __demangle_java_sym() 101 buf[rlen++] = *q; in __demangle_java_sym() 111 buf[rlen++] = *q; in __demangle_java_sym() 117 buf[rlen++] = *q; in __demangle_java_sym() 124 if (isalpha(*(q + 1)) && mode == MODE_CLASS) in __demangle_java_sym() [all …]
|
| /tools/net/ynl/samples/ |
| A D | tc.c | 11 static void tc_qdisc_print(struct tc_getqdisc_rsp *q) in tc_qdisc_print() argument 16 name = if_indextoname(q->_hdr.tcm_ifindex, ifname); in tc_qdisc_print() 20 if (q->_len.kind) { in tc_qdisc_print() 21 printf("%s ", q->kind); in tc_qdisc_print() 23 if (q->options._present.fq_codel) { in tc_qdisc_print() 27 fq_codel = &q->options.fq_codel; in tc_qdisc_print() 28 stats = q->stats2.app.fq_codel; in tc_qdisc_print() 35 if (q->stats2.app._len.fq_codel) in tc_qdisc_print()
|
| /tools/testing/selftests/bpf/ |
| A D | trace_helpers.c | 255 struct procmap_query q; in procmap_query() local 258 memset(&q, 0, sizeof(q)); in procmap_query() 259 q.size = sizeof(q); in procmap_query() 260 q.query_flags = query_flags; in procmap_query() 261 q.query_addr = (__u64)addr; in procmap_query() 279 (long)addr, (long)q.vma_start, (long)q.vma_end, in procmap_query() 284 (long)q.vma_offset, q.dev_major, q.dev_minor, (long)q.inode, in procmap_query() 287 q.build_id_size); in procmap_query() 290 *start = q.vma_start; in procmap_query() 291 *offset = q.vma_offset; in procmap_query() [all …]
|
| /tools/testing/selftests/timers/ |
| A D | mqueue-lat.c | 61 mqd_t q; in mqueue_lat_test() local 66 q = mq_open("/foo", O_CREAT | O_RDONLY, 0666, NULL); in mqueue_lat_test() 67 if (q < 0) { in mqueue_lat_test() 71 mq_getattr(q, &attr); in mqueue_lat_test() 84 ret = mq_timedreceive(q, buf, sizeof(buf), NULL, &target); in mqueue_lat_test() 92 mq_close(q); in mqueue_lat_test()
|
| /tools/power/cpupower/utils/helpers/ |
| A D | bitmask.c | 105 static const char *nexttoken(const char *q, int sep) in nexttoken() argument 107 if (q) in nexttoken() 108 q = strchr(q, sep); in nexttoken() 109 if (q) in nexttoken() 110 q++; in nexttoken() 111 return q; in nexttoken() 194 const char *p, *q; in bitmask_parselist() local 198 q = buf; in bitmask_parselist() 199 while (p = q, q = nexttoken(q, ','), p) { in bitmask_parselist()
|
| /tools/testing/selftests/drivers/net/ |
| A D | queues.py | 23 return len([q for q in queues if q['type'] == qtype]) 44 for q in queues: 45 if q['id'] == 0: 46 if q['type'] == 'rx': 48 if q['type'] == 'tx': 51 ksft_eq(q.get('xsk', None), {}, 54 ksft_not_in('xsk', q,
|
| /tools/testing/selftests/net/netfilter/packetdrill/ |
| A D | conntrack_rst_invalid.pkt | 31 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null |grep -q ESTABLISHED` 35 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null |grep -q ESTABLISHED` 39 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null |grep -q ESTABLISHED` 44 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null |grep -q ESTABLISHED` 49 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null |grep -q ESTABLISHED` 56 +0 `$xtables -v -S INPUT | grep INVALID | grep -q -- "-c 4 "` 57 +0 `$xtables -v -S OUTPUT | grep INVALID | grep -q -- "-c 0 0"` 59 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null |grep -q CLOSE\ `
|
| A D | conntrack_syn_challenge_ack.pkt | 29 +0.01 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null | grep UNREPLIED | grep -q … 40 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null | grep ESTABLISHED | grep -q A… 43 +0 `$xtables -v -S INPUT | grep INVALID | grep -q -- "-c 0 0"` 44 +0 `$xtables -v -S OUTPUT | grep INVALID | grep -q -- "-c 0 0"`
|
| /tools/memory-model/scripts/ |
| A D | runlitmushist.sh | 66 …print "echo `grep " q "^P[0-9]" b "+(" q " " $0 " | tail -1 | sed -e " q "s/^P" b "([0-9]" b "+" b…
|
| /tools/memory-model/Documentation/ |
| A D | control-dependencies.txt | 15 q = READ_ONCE(a); 16 if (q) 26 if (q) { 36 if (q) 52 q = a; 63 if (q) { 79 if (q) { 95 if (q) { 107 if (q) { 124 if (q % MAX) { [all …]
|
| /tools/tracing/latency/ |
| A D | latency-collector.c | 789 q->next_prod_idx = 0; in init_queue() 790 q->next_cons_idx = 0; in init_queue() 799 if (q->next_prod_idx >= q->next_cons_idx) in queue_len() 800 return q->next_prod_idx - q->next_cons_idx; in queue_len() 802 return QUEUE_SIZE - q->next_cons_idx + q->next_prod_idx; in queue_len() 826 q->entries[q->next_prod_idx] = *e; in queue_push_to_back() 832 struct entry e = q->entries[q->next_cons_idx]; in queue_pop_from_front() 840 cond_signal(&q->cond); in queue_cond_signal() 845 cond_wait(&q->cond, &q->mutex); in queue_cond_wait() 853 mutex_lock(&q->mutex); in queue_try_to_add_entry() [all …]
|
| /tools/perf/tests/shell/ |
| A D | test_java_symbol.sh | 46 int q = 0; 49 q += fib(i); 51 System.out.println(q);
|
| /tools/testing/selftests/powerpc/copyloops/ |
| A D | exc_validate.c | 82 static char *p, *q; in test_copy_exception() local 103 q = p + page_size - MAX_LEN; in test_copy_exception() 109 do_one_test(q+dst, q+src, len); in test_copy_exception()
|
| /tools/testing/selftests/net/tcp_ao/lib/ |
| A D | repair.c | 43 struct tcp_sock_queue *q) in test_sock_checkpoint_queue() argument 51 len = sizeof(q->seq); in test_sock_checkpoint_queue() 52 ret = getsockopt(sk, SOL_TCP, TCP_QUEUE_SEQ, &q->seq, &len); in test_sock_checkpoint_queue() 53 if (ret || len != sizeof(q->seq)) in test_sock_checkpoint_queue() 57 q->buf = NULL; in test_sock_checkpoint_queue() 61 q->buf = malloc(qlen); in test_sock_checkpoint_queue() 62 if (q->buf == NULL) in test_sock_checkpoint_queue() 64 ret = recv(sk, q->buf, qlen, MSG_PEEK | MSG_DONTWAIT); in test_sock_checkpoint_queue()
|