/tools/arch/x86/include/asm/ |
D | atomic.h | 26 static inline int atomic_read(const atomic_t *v) in atomic_read() argument 28 return READ_ONCE((v)->counter); in atomic_read() 38 static inline void atomic_set(atomic_t *v, int i) in atomic_set() argument 40 v->counter = i; in atomic_set() 49 static inline void atomic_inc(atomic_t *v) in atomic_inc() argument 52 : "+m" (v->counter)); in atomic_inc() 63 static inline int atomic_dec_and_test(atomic_t *v) in atomic_dec_and_test() argument 65 GEN_UNARY_RMWcc(LOCK_PREFIX "decl", v->counter, "%0", "e"); in atomic_dec_and_test() 68 static __always_inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument 70 return cmpxchg(&v->counter, old, new); in atomic_cmpxchg()
|
/tools/testing/selftests/net/forwarding/ |
D | gre_inner_v4_multipath.sh | 85 ip route add vrf v$h1 192.0.4.0/24 via 192.0.3.1 90 ip route del vrf v$h1 192.0.4.0/24 via 192.0.3.1 97 __simple_if_init $ul1 v$ol1 192.0.2.129/28 99 tunnel_create g1 gre 192.0.2.65 192.0.2.66 tos inherit dev v$ol1 100 __simple_if_init g1 v$ol1 192.0.2.65/32 101 ip route add vrf v$ol1 192.0.2.66/32 via 192.0.2.130 103 ip route add vrf v$ol1 192.0.4.0/24 nexthop dev g1 108 ip route del vrf v$ol1 192.0.4.0/24 110 ip route del vrf v$ol1 192.0.2.66/32 121 __simple_if_init $ul22 v$ul21 [all …]
|
D | gre_multipath.sh | 69 ip route add vrf v$h1 192.0.2.16/28 via 192.0.2.2 74 ip route del vrf v$h1 192.0.2.16/28 via 192.0.2.2 81 __simple_if_init $ul1 v$ol1 82 vlan_create $ul1 111 v$ol1 192.0.2.129/28 83 vlan_create $ul1 222 v$ol1 192.0.2.145/28 85 tunnel_create g1a gre 192.0.2.65 192.0.2.66 tos inherit dev v$ol1 86 __simple_if_init g1a v$ol1 192.0.2.65/32 87 ip route add vrf v$ol1 192.0.2.66/32 via 192.0.2.130 89 tunnel_create g1b gre 192.0.2.81 192.0.2.82 tos inherit dev v$ol1 90 __simple_if_init g1b v$ol1 192.0.2.81/32 [all …]
|
D | gre_inner_v6_multipath.sh | 85 ip -6 route add vrf v$h1 2001:db8:2::/64 via 2001:db8:1::1 90 ip -6 route del vrf v$h1 2001:db8:2::/64 via 2001:db8:1::1 97 __simple_if_init $ul1 v$ol1 192.0.2.129/28 99 tunnel_create g1 gre 192.0.2.65 192.0.2.66 tos inherit dev v$ol1 100 __simple_if_init g1 v$ol1 192.0.2.65/32 101 ip route add vrf v$ol1 192.0.2.66/32 via 192.0.2.130 103 ip -6 route add vrf v$ol1 2001:db8:2::/64 dev g1 108 ip -6 route del vrf v$ol1 2001:db8:2::/64 110 ip route del vrf v$ol1 192.0.2.66/32 121 __simple_if_init $ul22 v$ul21 [all …]
|
D | ip6gre_inner_v4_multipath.sh | 84 ip route add vrf v$h1 192.0.4.0/24 via 192.0.3.1 89 ip route del vrf v$h1 192.0.4.0/24 via 192.0.3.1 96 __simple_if_init $ul1 v$ol1 2001:db8:80::1/64 98 tunnel_create g1 ip6gre 2001:db8:40::1 2001:db8:40::2 tos inherit dev v$ol1 99 __simple_if_init g1 v$ol1 2001:db8:40::1/128 100 ip -6 route add vrf v$ol1 2001:db8:40::2/128 via 2001:db8:80::2 102 ip route add vrf v$ol1 192.0.4.0/24 nexthop dev g1 107 ip route del vrf v$ol1 192.0.4.0/24 109 ip -6 route del vrf v$ol1 2001:db8:40::2/128 120 __simple_if_init $ul22 v$ul21 [all …]
|
D | ip6gre_inner_v6_multipath.sh | 84 ip -6 route add vrf v$h1 2001:db8:2::/64 via 2001:db8:1::1 89 ip -6 route del vrf v$h1 2001:db8:2::/64 via 2001:db8:1::1 96 __simple_if_init $ul1 v$ol1 2001:db8:80::1/64 98 tunnel_create g1 ip6gre 2001:db8:40::1 2001:db8:40::2 tos inherit dev v$ol1 99 __simple_if_init g1 v$ol1 2001:db8:40::1/128 100 ip -6 route add vrf v$ol1 2001:db8:40::2/128 via 2001:db8:80::2 102 ip -6 route add vrf v$ol1 2001:db8:2::/64 dev g1 107 ip -6 route del vrf v$ol1 2001:db8:2::/64 109 ip -6 route del vrf v$ol1 2001:db8:40::2/128 120 __simple_if_init $ul22 v$ul21 [all …]
|
D | ipip_lib.sh | 149 ip route add vrf v$h1 192.0.2.16/28 via 192.0.2.2 154 ip route del vrf v$h1 192.0.2.16/28 via 192.0.2.2 161 ip route add vrf v$h2 192.0.2.0/28 via 192.0.2.17 166 ip route del vrf v$h2 192.0.2.0/28 via 192.0.2.17 214 __simple_if_init $ul2 v$ol2 215 vlan_create $ul2 111 v$ol2 192.0.2.130/28 217 tunnel_create g2a $type 192.0.2.66 192.0.2.65 tos inherit dev v$ol2 \ 219 __simple_if_init g2a v$ol2 192.0.2.66/32 221 ip route add vrf v$ol2 192.0.2.65/32 via 192.0.2.129 222 ip route add vrf v$ol2 192.0.2.0/28 nexthop dev g2a [all …]
|
D | tc_flower_router.sh | 13 ip route add 192.0.2.0/24 vrf v$h1 nexthop via 192.0.1.2 14 ip route add 192.0.3.0/24 vrf v$h1 nexthop via 192.0.1.2 19 ip route del 192.0.3.0/24 vrf v$h1 20 ip route del 192.0.2.0/24 vrf v$h1 29 ip route add 192.0.1.0/24 vrf v$h2 nexthop via 192.0.2.2 30 ip route add 192.0.3.0/24 vrf v$h2 nexthop via 192.0.2.2 35 ip route del 192.0.3.0/24 vrf v$h2 36 ip route del 192.0.1.0/24 vrf v$h2 45 ip route add 192.0.1.0/24 vrf v$h3 nexthop via 192.0.3.2 46 ip route add 192.0.2.0/24 vrf v$h3 nexthop via 192.0.3.2 [all …]
|
D | router_bridge_vlan.sh | 15 vlan_create $h1 555 v$h1 192.0.2.1/28 2001:db8:1::1/64 16 ip -4 route add 192.0.2.128/28 vrf v$h1 nexthop via 192.0.2.2 17 ip -6 route add 2001:db8:2::/64 vrf v$h1 nexthop via 2001:db8:1::2 22 ip -6 route del 2001:db8:2::/64 vrf v$h1 23 ip -4 route del 192.0.2.128/28 vrf v$h1 31 ip -4 route add 192.0.2.0/28 vrf v$h2 nexthop via 192.0.2.129 32 ip -6 route add 2001:db8:1::/64 vrf v$h2 nexthop via 2001:db8:2::1 37 ip -6 route del 2001:db8:1::/64 vrf v$h2 38 ip -4 route del 192.0.2.0/28 vrf v$h2
|
D | router_bridge.sh | 14 ip -4 route add 192.0.2.128/28 vrf v$h1 nexthop via 192.0.2.2 15 ip -6 route add 2001:db8:2::/64 vrf v$h1 nexthop via 2001:db8:1::2 20 ip -6 route del 2001:db8:2::/64 vrf v$h1 21 ip -4 route del 192.0.2.128/28 vrf v$h1 28 ip -4 route add 192.0.2.0/28 vrf v$h2 nexthop via 192.0.2.129 29 ip -6 route add 2001:db8:1::/64 vrf v$h2 nexthop via 2001:db8:2::1 34 ip -6 route del 2001:db8:1::/64 vrf v$h2 35 ip -4 route del 192.0.2.0/28 vrf v$h2
|
/tools/include/asm-generic/ |
D | atomic-gcc.h | 23 static inline int atomic_read(const atomic_t *v) in atomic_read() argument 25 return READ_ONCE((v)->counter); in atomic_read() 35 static inline void atomic_set(atomic_t *v, int i) in atomic_set() argument 37 v->counter = i; in atomic_set() 46 static inline void atomic_inc(atomic_t *v) in atomic_inc() argument 48 __sync_add_and_fetch(&v->counter, 1); in atomic_inc() 59 static inline int atomic_dec_and_test(atomic_t *v) in atomic_dec_and_test() argument 61 return __sync_sub_and_fetch(&v->counter, 1) == 0; in atomic_dec_and_test() 67 static inline int atomic_cmpxchg(atomic_t *v, int oldval, int newval) in atomic_cmpxchg() argument 69 return cmpxchg(&(v)->counter, oldval, newval); in atomic_cmpxchg()
|
/tools/lib/subcmd/ |
D | parse-options.h | 118 #define check_vtype(v, type) ( BUILD_BUG_ON_ZERO(!__builtin_types_compatible_p(typeof(v), type)) + … argument 124 #define OPT_BIT(s, l, v, h, b) { .type = OPTION_BIT, .short_name = (s), .long_name = (l), .val… argument 125 #define OPT_BOOLEAN(s, l, v, h) { .type = OPTION_BOOLEAN, .short_name = (s), .long_name = (l), … argument 126 …ine OPT_BOOLEAN_FLAG(s, l, v, h, f) { .type = OPTION_BOOLEAN, .short_name = (s), .long_name = … argument 127 #define OPT_BOOLEAN_SET(s, l, v, os, h) \ argument 129 .value = check_vtype(v, bool *), .help = (h), \ 131 #define OPT_INCR(s, l, v, h) { .type = OPTION_INCR, .short_name = (s), .long_name = (l), .va… argument 132 #define OPT_SET_UINT(s, l, v, h, i) { .type = OPTION_SET_UINT, .short_name = (s), .long_name = (l)… argument 133 #define OPT_SET_PTR(s, l, v, h, p) { .type = OPTION_SET_PTR, .short_name = (s), .long_name = (l), … argument 134 #define OPT_INTEGER(s, l, v, h) { .type = OPTION_INTEGER, .short_name = (s), .long_name = (l), … argument [all …]
|
/tools/testing/selftests/rseq/ |
D | rseq-arm64.h | 58 #define rseq_smp_store_release(p, v) \ argument 64 : "r" ((__u8)v) \ 70 : "r" ((__u16)v) \ 76 : "r" ((__u32)v) \ 82 : "r" ((__u64)v) \ 208 int rseq_cmpeqv_storev(intptr_t *v, intptr_t expect, intptr_t newv, int cpu) in rseq_cmpeqv_storev() argument 222 RSEQ_ASM_OP_CMPEQ(v, expect, %l[cmpfail]) in rseq_cmpeqv_storev() 226 RSEQ_ASM_OP_CMPEQ(v, expect, %l[error2]) in rseq_cmpeqv_storev() 228 RSEQ_ASM_OP_FINAL_STORE(newv, v, 3) in rseq_cmpeqv_storev() 235 [v] "Qo" (*v), in rseq_cmpeqv_storev() [all …]
|
D | rseq-ppc.h | 33 #define rseq_smp_store_release(p, v) \ argument 36 RSEQ_WRITE_ONCE(*p, v); \ 213 int rseq_cmpeqv_storev(intptr_t *v, intptr_t expect, intptr_t newv, int cpu) in rseq_cmpeqv_storev() argument 230 RSEQ_ASM_OP_CMPEQ(v, expect, %l[cmpfail]) in rseq_cmpeqv_storev() 236 RSEQ_ASM_OP_CMPEQ(v, expect, %l[error2]) in rseq_cmpeqv_storev() 239 RSEQ_ASM_OP_FINAL_STORE(newv, v, 2) in rseq_cmpeqv_storev() 246 [v] "m" (*v), in rseq_cmpeqv_storev() 277 int rseq_cmpnev_storeoffp_load(intptr_t *v, intptr_t expectnot, in rseq_cmpnev_storeoffp_load() argument 295 RSEQ_ASM_OP_CMPNE(v, expectnot, %l[cmpfail]) in rseq_cmpnev_storeoffp_load() 301 RSEQ_ASM_OP_CMPNE(v, expectnot, %l[error2]) in rseq_cmpnev_storeoffp_load() [all …]
|
D | rseq-skip.h | 9 int rseq_cmpeqv_storev(intptr_t *v, intptr_t expect, intptr_t newv, int cpu) in rseq_cmpeqv_storev() argument 15 int rseq_cmpnev_storeoffp_load(intptr_t *v, intptr_t expectnot, in rseq_cmpnev_storeoffp_load() argument 22 int rseq_addv(intptr_t *v, intptr_t count, int cpu) in rseq_addv() argument 28 int rseq_cmpeqv_trystorev_storev(intptr_t *v, intptr_t expect, in rseq_cmpeqv_trystorev_storev() argument 36 int rseq_cmpeqv_trystorev_storev_release(intptr_t *v, intptr_t expect, in rseq_cmpeqv_trystorev_storev_release() argument 44 int rseq_cmpeqv_cmpeqv_storev(intptr_t *v, intptr_t expect, in rseq_cmpeqv_cmpeqv_storev() argument 52 int rseq_cmpeqv_trymemcpy_storev(intptr_t *v, intptr_t expect, in rseq_cmpeqv_trymemcpy_storev() argument 60 int rseq_cmpeqv_trymemcpy_storev_release(intptr_t *v, intptr_t expect, in rseq_cmpeqv_trymemcpy_storev_release() argument
|
D | rseq-x86.h | 47 #define rseq_smp_store_release(p, v) \ argument 50 RSEQ_WRITE_ONCE(*p, v); \ 116 int rseq_cmpeqv_storev(intptr_t *v, intptr_t expect, intptr_t newv, int cpu) in rseq_cmpeqv_storev() argument 147 [v] "m" (*v), in rseq_cmpeqv_storev() 181 int rseq_cmpnev_storeoffp_load(intptr_t *v, intptr_t expectnot, in rseq_cmpnev_storeoffp_load() argument 219 [v] "m" (*v), in rseq_cmpnev_storeoffp_load() 250 int rseq_addv(intptr_t *v, intptr_t count, int cpu) in rseq_addv() argument 275 [v] "m" (*v), in rseq_addv() 355 int rseq_cmpeqv_trystorev_storev(intptr_t *v, intptr_t expect, in rseq_cmpeqv_trystorev_storev() argument 395 [v] "m" (*v), in rseq_cmpeqv_trystorev_storev() [all …]
|
D | rseq-s390.h | 25 #define rseq_smp_store_release(p, v) \ argument 28 RSEQ_WRITE_ONCE(*p, v); \ 138 int rseq_cmpeqv_storev(intptr_t *v, intptr_t expect, intptr_t newv, int cpu) in rseq_cmpeqv_storev() argument 170 [v] "m" (*v), in rseq_cmpeqv_storev() 205 int rseq_cmpnev_storeoffp_load(intptr_t *v, intptr_t expectnot, in rseq_cmpnev_storeoffp_load() argument 244 [v] "m" (*v), in rseq_cmpnev_storeoffp_load() 276 int rseq_addv(intptr_t *v, intptr_t count, int cpu) in rseq_addv() argument 304 [v] "m" (*v), in rseq_addv() 328 int rseq_cmpeqv_trystorev_storev(intptr_t *v, intptr_t expect, in rseq_cmpeqv_trystorev_storev() argument 369 [v] "m" (*v), in rseq_cmpeqv_trystorev_storev() [all …]
|
D | rseq-arm.h | 76 #define rseq_smp_store_release(p, v) \ argument 79 RSEQ_WRITE_ONCE(*p, v); \ 151 int rseq_cmpeqv_storev(intptr_t *v, intptr_t expect, intptr_t newv, int cpu) in rseq_cmpeqv_storev() argument 187 [v] "m" (*v), in rseq_cmpeqv_storev() 218 int rseq_cmpnev_storeoffp_load(intptr_t *v, intptr_t expectnot, in rseq_cmpnev_storeoffp_load() argument 259 [v] "m" (*v), in rseq_cmpnev_storeoffp_load() 291 int rseq_addv(intptr_t *v, intptr_t count, int cpu) in rseq_addv() argument 320 [v] "m" (*v), in rseq_addv() 344 int rseq_cmpeqv_trystorev_storev(intptr_t *v, intptr_t expect, in rseq_cmpeqv_trystorev_storev() argument 389 [v] "m" (*v), in rseq_cmpeqv_trystorev_storev() [all …]
|
/tools/testing/selftests/bpf/prog_tests/ |
D | hashmap.c | 57 void *oldv, *v = (void *)(long)(1024 + i); in test_hashmap_generic() local 59 err = hashmap__update(map, k, v, &oldk, &oldv); in test_hashmap_generic() 65 err = hashmap__add(map, k, v); in test_hashmap_generic() 67 err = hashmap__set(map, k, v, &oldk, &oldv); in test_hashmap_generic() 74 (long)k, (long)v, err)) in test_hashmap_generic() 80 if (CHECK(oldv != v, "elem_val", in test_hashmap_generic() 96 long v = (long)entry->value; in test_hashmap_generic() local 99 if (CHECK(v - k != 1024, "check_kv", in test_hashmap_generic() 100 "invalid k/v pair: %ld = %ld\n", k, v)) in test_hashmap_generic() 109 void *oldv, *v = (void *)(long)(256 + i); in test_hashmap_generic() local [all …]
|
/tools/include/linux/ |
D | rcu.h | 22 #define rcu_assign_pointer(p, v) do { (p) = (v); } while (0) argument 23 #define RCU_INIT_POINTER(p, v) do { (p) = (v); } while (0) argument
|
/tools/testing/selftests/net/mptcp/ |
D | mptcp_lib.sh | 87 local v maj min 94 v=$(uname -r | cut -d'.' -f1,2) 95 maj=${v%.*} 96 min=${v#*.} 103 mptcp_lib_fail_if_expected_feature "kernel version ${1} lower than ${v}"
|
/tools/testing/selftests/bpf/progs/ |
D | test_tcpbpf_kern.c | 63 int v = 0; in bpf_testcb() local 134 v = 0xff; in bpf_testcb() 135 rv = bpf_setsockopt(skops, SOL_IPV6, IPV6_TCLASS, &v, in bpf_testcb() 136 sizeof(v)); in bpf_testcb() 138 v = bpf_getsockopt(skops, IPPROTO_TCP, TCP_SAVED_SYN, in bpf_testcb() 141 if (!v) { in bpf_testcb() 145 v = thdr->syn; in bpf_testcb() 148 bpf_map_update_elem(&sockopt_results, &key, &v, in bpf_testcb() 182 v = bpf_setsockopt(skops, IPPROTO_TCP, TCP_SAVE_SYN, in bpf_testcb() 187 bpf_map_update_elem(&sockopt_results, &key, &v, BPF_ANY); in bpf_testcb()
|
/tools/testing/selftests/powerpc/security/ |
D | entry_flush.c | 25 struct perf_event_read v; in entry_flush_test() local 79 FAIL_IF(read(fd, &v, sizeof(v)) != sizeof(v)); in entry_flush_test() 81 if (entry_flush && v.l1d_misses >= l1d_misses_expected) in entry_flush_test() 83 else if (!entry_flush && v.l1d_misses < (l1d_misses_expected / 2)) in entry_flush_test() 86 l1d_misses_total += v.l1d_misses; in entry_flush_test()
|
D | rfi_flush.c | 25 struct perf_event_read v; in rfi_flush_test() local 80 FAIL_IF(read(fd, &v, sizeof(v)) != sizeof(v)); in rfi_flush_test() 82 if (rfi_flush && v.l1d_misses >= l1d_misses_expected) in rfi_flush_test() 84 else if (!rfi_flush && v.l1d_misses < (l1d_misses_expected / 2)) in rfi_flush_test() 87 l1d_misses_total += v.l1d_misses; in rfi_flush_test()
|
/tools/testing/selftests/zram/ |
D | zram01.sh | 48 local v=$((100 * 1024 * $b / $mem_used_total)) 49 if [ "$v" -lt 100 ]; then 50 echo "FAIL compression ratio: 0.$v:1" 55 echo "zram compression ratio: $(echo "scale=2; $v / 100 " | bc):1: OK"
|