Home
last modified time | relevance | path

Searched refs:sum (Results 1 – 25 of 42) sorted by relevance

12

/tools/testing/selftests/bpf/progs/
Dtest_rdonly_maps.c21 unsigned sum; member
29 unsigned iters = 0, sum = 0; in skip_loop() local
34 sum += *p; in skip_loop()
39 res.sum = sum; in skip_loop()
48 unsigned iters = 0, sum = 0; in part_loop() local
53 sum += *p; in part_loop()
58 res.sum = sum; in part_loop()
68 unsigned iters = 0, sum = 0; in full_loop() local
73 sum += *p; in full_loop()
79 res.sum = sum; in full_loop()
Dloop3.c17 __u64 i = 0, sum = 0; in while_true() local
20 sum += PT_REGS_RC(ctx); in while_true()
22 return sum; in while_true()
Dxdping_kern.c43 static __always_inline __u16 csum_fold_helper(__wsum sum) in csum_fold_helper() argument
45 sum = (sum & 0xffff) + (sum >> 16); in csum_fold_helper()
46 return ~((sum & 0xffff) + (sum >> 16)); in csum_fold_helper()
51 __wsum sum; in ipv4_csum() local
53 sum = bpf_csum_diff(0, 0, data_start, data_size, 0); in ipv4_csum()
54 return csum_fold_helper(sum); in ipv4_csum()
Dloop1.c17 int i, j, sum = 0, m; in nested_loops() local
25 sum += i * m; in nested_loops()
28 return sum; in nested_loops()
/tools/testing/selftests/net/
Dip_defrag.c82 static uint32_t raw_checksum(uint8_t *buf, int len, uint32_t sum) in raw_checksum() argument
87 sum += (u_int16_t)ntohs(*((u_int16_t *)(buf + i))); in raw_checksum()
88 if (sum > 0xffff) in raw_checksum()
89 sum -= 0xffff; in raw_checksum()
93 sum += buf[i] << 8; in raw_checksum()
94 if (sum > 0xffff) in raw_checksum()
95 sum -= 0xffff; in raw_checksum()
98 return sum; in raw_checksum()
103 uint32_t sum = 0; in udp_checksum() local
106 sum = raw_checksum((uint8_t *)&iphdr->ip_src, 2 * sizeof(iphdr->ip_src), in udp_checksum()
[all …]
Dpsock_snd.c56 unsigned long sum = 0; in add_csum_hword() local
60 sum += start[i]; in add_csum_hword()
62 return sum; in add_csum_hword()
66 unsigned long sum) in build_ip_csum() argument
68 sum += add_csum_hword(start, num_u16); in build_ip_csum()
70 while (sum >> 16) in build_ip_csum()
71 sum = (sum & 0xffff) + (sum >> 16); in build_ip_csum()
73 return ~sum; in build_ip_csum()
Dgro.c144 static uint32_t checksum_nofold(void *data, size_t len, uint32_t sum) in checksum_nofold() argument
150 sum += words[i]; in checksum_nofold()
152 sum += ((char *)data)[len - 1]; in checksum_nofold()
153 return sum; in checksum_nofold()
156 static uint16_t checksum_fold(void *data, size_t len, uint32_t sum) in checksum_fold() argument
158 sum = checksum_nofold(data, len, sum); in checksum_fold()
159 while (sum > 0xFFFF) in checksum_fold()
160 sum = (sum & 0xFFFF) + (sum >> 16); in checksum_fold()
161 return ~sum; in checksum_fold()
178 uint32_t sum = 0; in tcp_checksum() local
[all …]
Dtxtimestamp.c402 unsigned long sum) in get_ip_csum() argument
407 sum += start[i]; in get_ip_csum()
409 while (sum >> 16) in get_ip_csum()
410 sum = (sum & 0xFFFF) + (sum >> 16); in get_ip_csum()
412 return ~sum; in get_ip_csum()
Dmsg_zerocopy.c109 unsigned long sum = 0; in get_ip_csum() local
113 sum += start[i]; in get_ip_csum()
115 while (sum >> 16) in get_ip_csum()
116 sum = (sum & 0xFFFF) + (sum >> 16); in get_ip_csum()
118 return ~sum; in get_ip_csum()
/tools/rcu/
Drcu-cbs.py40 sum = 0; variable
45 sum += len;
46 print("Number of RCU callbacks in flight: " + str(sum));
/tools/testing/selftests/rseq/
Dbasic_percpu_ops_test.c113 uint64_t sum; in test_percpu_spinlock() local
127 sum = 0; in test_percpu_spinlock()
129 sum += data.c[i].count; in test_percpu_spinlock()
131 assert(sum == (uint64_t)data.reps * num_threads); in test_percpu_spinlock()
239 uint64_t sum = 0, expected_sum = 0; in test_percpu_list() local
278 sum += node->data; in test_percpu_list()
288 assert(sum == expected_sum); in test_percpu_list()
Dparam_test.c398 uint64_t sum; in test_percpu_spinlock() local
430 sum = 0; in test_percpu_spinlock()
432 sum += data.c[i].count; in test_percpu_spinlock()
434 assert(sum == (uint64_t)opt_reps * num_threads); in test_percpu_spinlock()
474 uint64_t sum; in test_percpu_inc() local
506 sum = 0; in test_percpu_inc()
508 sum += data.c[i].count; in test_percpu_inc()
510 assert(sum == (uint64_t)opt_reps * num_threads); in test_percpu_inc()
622 uint64_t sum = 0, expected_sum = 0; in test_percpu_list() local
673 sum += node->data; in test_percpu_list()
[all …]
/tools/testing/selftests/resctrl/
Dfill_buf.c88 unsigned char sum, *p; in fill_one_span_read() local
90 sum = 0; in fill_one_span_read()
93 sum += *p; in fill_one_span_read()
97 return sum; in fill_one_span_read()
/tools/testing/selftests/bpf/prog_tests/
Drdonly_maps.c7 unsigned sum; member
80 if (CHECK(bss.sum != t->exp_sum, "check_sum", in test_rdonly_maps()
82 t->prog_name, bss.sum, t->exp_sum)) in test_rdonly_maps()
/tools/testing/selftests/bpf/
Dtest_flow_dissector.c145 unsigned long sum = 0; in add_csum_hword() local
149 sum += start[i]; in add_csum_hword()
151 return sum; in add_csum_hword()
155 unsigned long sum) in build_ip_csum() argument
157 sum += add_csum_hword(start, num_u16); in build_ip_csum()
159 while (sum >> 16) in build_ip_csum()
160 sum = (sum & 0xffff) + (sum >> 16); in build_ip_csum()
162 return ~sum; in build_ip_csum()
Dxdpxceiver.c141 u32 sum = (__force u32)csum; in csum_fold() local
143 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
144 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
145 return (__force __u16)~sum; in csum_fold()
165 static __u32 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, __u8 proto, __u32 sum) in csum_tcpudp_nofold() argument
167 unsigned long long s = (__force u32)sum; in csum_tcpudp_nofold()
183 static __u16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, __u32 len, __u8 proto, __u32 sum) in csum_tcpudp_magic() argument
185 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic()
/tools/testing/selftests/rcutorture/bin/
Dkcsan-collapse.sh22 sort -k1nr > $1/kcsan.sum
Dkvm-recheck-rcu.sh45 awk -v sum=0 '
Dkvm-recheck.sh86 echo KCSAN summary in $rd/kcsan.sum
/tools/testing/selftests/cgroup/
Dtest_kmem.c165 long current, slab, anon, file, kernel_stack, pagetables, percpu, sock, sum; in test_kmem_memcg_deletion() local
194 sum = slab + anon + file + kernel_stack + pagetables + percpu + sock; in test_kmem_memcg_deletion()
195 if (abs(sum - current) < MAX_VMSTAT_ERROR) { in test_kmem_memcg_deletion()
199 printf("slab + anon + file + kernel_stack = %ld\n", sum); in test_kmem_memcg_deletion()
/tools/testing/selftests/tc-testing/
DTdcResults.py73 return sum(1 for t in self._testsuite if t.result == ResultState.fail)
76 return sum(1 for t in self._testsuite if t.result == ResultState.skip)
/tools/testing/selftests/ia64/
Daliasing-test.c22 int sum; variable
49 sum += *c++; in map_mem()
/tools/perf/scripts/python/
Dmem-phys-addr.py48 total = sum(load_mem_type_cnt.values())
/tools/perf/Documentation/
Dcallchain-overhead-calculation.txt6 This is the value that perf shows traditionally and sum of all the
15 It might be confusing that the sum of all the 'children' overhead
Dperf-c2c.txt184 - sum of all cachelines accesses
187 - sum of all load accesses
190 - sum of all store accesses
229 - sum of cycles for given accesses - Remote/Local HITM and generic load

12