| /src/sys/dev/mlx5/mlx5_core/ |
| H A D | mlx5_fs_counters.c | 109 struct mlx5_fc *counter; in mlx5_fc_counters_lookup_next() local 114 while ((counter = idr_get_next(&fc_stats->counters_idr, &next_id)) != NULL && in mlx5_fc_counters_lookup_next() 115 list_empty(&counter->list)) in mlx5_fc_counters_lookup_next() 119 return counter ? &counter->list : &fc_stats->counters; in mlx5_fc_counters_lookup_next() 123 struct mlx5_fc *counter) in mlx5_fc_stats_insert() argument 125 struct list_head *next = mlx5_fc_counters_lookup_next(dev, counter->id); in mlx5_fc_stats_insert() 127 list_add_tail(&counter->list, next); in mlx5_fc_stats_insert() 131 struct mlx5_fc *counter) in mlx5_fc_stats_remove() argument 135 list_del(&counter->list); in mlx5_fc_stats_remove() 138 WARN_ON(!idr_remove(&fc_stats->counters_idr, counter->id)); in mlx5_fc_stats_remove() [all …]
|
| /src/sys/crypto/openssl/ |
| H A D | ossl_chacha20.c | 60 unsigned int counter[CHACHA_CTR_SIZE / 4]; in ossl_chacha20() local 75 crypto_read_iv(crp, counter); in ossl_chacha20() 76 for (i = 0; i < nitems(counter); i++) in ossl_chacha20() 77 counter[i] = le32toh(counter[i]); in ossl_chacha20() 112 next_counter = counter[0] + todo / CHACHA_BLK_SIZE; in ossl_chacha20() 113 if (next_counter < counter[0]) { in ossl_chacha20() 118 ChaCha20_ctr32(out, in, todo, key, counter); in ossl_chacha20() 120 counter[0] = next_counter; in ossl_chacha20() 121 if (counter[0] == 0) in ossl_chacha20() 122 counter[1]++; in ossl_chacha20() [all …]
|
| /src/contrib/jemalloc/src/ |
| H A D | counter.c | 7 counter_accum_init(counter_accum_t *counter, uint64_t interval) { in counter_accum_init() argument 8 if (LOCKEDINT_MTX_INIT(counter->mtx, "counter_accum", in counter_accum_init() 12 locked_init_u64_unsynchronized(&counter->accumbytes, 0); in counter_accum_init() 13 counter->interval = interval; in counter_accum_init() 18 counter_prefork(tsdn_t *tsdn, counter_accum_t *counter) { in counter_prefork() argument 19 LOCKEDINT_MTX_PREFORK(tsdn, counter->mtx); in counter_prefork() 23 counter_postfork_parent(tsdn_t *tsdn, counter_accum_t *counter) { in counter_postfork_parent() argument 24 LOCKEDINT_MTX_POSTFORK_PARENT(tsdn, counter->mtx); in counter_postfork_parent() 28 counter_postfork_child(tsdn_t *tsdn, counter_accum_t *counter) { in counter_postfork_child() argument 29 LOCKEDINT_MTX_POSTFORK_CHILD(tsdn, counter->mtx); in counter_postfork_child()
|
| /src/contrib/jemalloc/include/jemalloc/internal/ |
| H A D | counter.h | 13 counter_accum(tsdn_t *tsdn, counter_accum_t *counter, uint64_t bytes) { in counter_accum() argument 14 uint64_t interval = counter->interval; in counter_accum() 16 LOCKEDINT_MTX_LOCK(tsdn, counter->mtx); in counter_accum() 23 bool overflow = locked_inc_mod_u64(tsdn, LOCKEDINT_MTX(counter->mtx), in counter_accum() 24 &counter->accumbytes, bytes, interval); in counter_accum() 25 LOCKEDINT_MTX_UNLOCK(tsdn, counter->mtx); in counter_accum() 29 bool counter_accum_init(counter_accum_t *counter, uint64_t interval); 30 void counter_prefork(tsdn_t *tsdn, counter_accum_t *counter); 31 void counter_postfork_parent(tsdn_t *tsdn, counter_accum_t *counter); 32 void counter_postfork_child(tsdn_t *tsdn, counter_accum_t *counter);
|
| /src/sys/compat/linuxkpi/common/include/asm/ |
| H A D | atomic64.h | 34 volatile int64_t counter; member 36 #define ATOMIC64_INIT(x) { .counter = (x) } 56 return (atomic_fetchadd_64(&v->counter, i)); in atomic64_fetch_add() 62 return i + atomic_fetchadd_64(&v->counter, i); in atomic64_add_return() 68 return atomic_fetchadd_64(&v->counter, -i) - i; in atomic64_sub_return() 74 atomic_store_rel_64(&v->counter, i); in atomic64_set() 80 return READ_ONCE(v->counter); in atomic64_read() 86 return atomic_fetchadd_64(&v->counter, 1) + 1; in atomic64_inc() 92 return atomic_fetchadd_64(&v->counter, -1) - 1; in atomic64_dec() 103 if (likely(atomic_fcmpset_64(&v->counter, &c, c + a))) in atomic64_add_unless() [all …]
|
| H A D | atomic-long.h | 35 #define ATOMIC_LONG_INIT(x) { .counter = (x) } 38 volatile long counter; member 49 return i + atomic_fetchadd_long(&v->counter, i); in atomic_long_add_return() 55 return atomic_fetchadd_long(&v->counter, -i) - i; in atomic_long_sub_return() 61 WRITE_ONCE(v->counter, i); in atomic_long_set() 67 return READ_ONCE(v->counter); in atomic_long_read() 73 return atomic_fetchadd_long(&v->counter, 1) + 1; in atomic_long_inc() 79 return atomic_fetchadd_long(&v->counter, -1) - 1; in atomic_long_dec() 85 return atomic_swap_long(&v->counter, val); in atomic_long_xchg() 94 if (atomic_fcmpset_long(&v->counter, &ret, new)) in atomic_long_cmpxchg() [all …]
|
| H A D | atomic.h | 36 #define ATOMIC_INIT(x) { .counter = (x) } 39 volatile int counter; member 60 return i + atomic_fetchadd_int(&v->counter, i); in atomic_add_return() 66 return atomic_fetchadd_int(&v->counter, -i) - i; in atomic_sub_return() 72 WRITE_ONCE(v->counter, i); in atomic_set() 78 atomic_store_rel_int(&v->counter, i); in atomic_set_release() 84 atomic_set_int(&v->counter, mask); in atomic_set_mask() 90 return READ_ONCE(v->counter); in atomic_read() 96 return atomic_fetchadd_int(&v->counter, 1) + 1; in atomic_inc() 102 return atomic_fetchadd_int(&v->counter, -1) - 1; in atomic_dec() [all …]
|
| /src/sys/contrib/openzfs/module/icp/algs/blake3/ |
| H A D | blake3_impl.c | 43 uint64_t counter, uint8_t flags); 47 uint64_t counter, uint8_t flags, uint8_t out[64]); 51 uint64_t counter, boolean_t increment_counter, uint8_t flags, 56 uint64_t counter, uint8_t flags) { in blake3_compress_in_place_sse2() argument 58 zfs_blake3_compress_in_place_sse2(cv, block, block_len, counter, in blake3_compress_in_place_sse2() 65 uint64_t counter, uint8_t flags, uint8_t out[64]) { in blake3_compress_xof_sse2() argument 67 zfs_blake3_compress_xof_sse2(cv, block, block_len, counter, flags, in blake3_compress_xof_sse2() 74 uint64_t counter, boolean_t increment_counter, uint8_t flags, in blake3_hash_many_sse2() argument 77 zfs_blake3_hash_many_sse2(inputs, num_inputs, blocks, key, counter, in blake3_hash_many_sse2() 107 uint64_t counter, uint8_t flags); [all …]
|
| /src/contrib/wpa/src/eap_common/ |
| H A D | eap_psk_common.c | 38 u8 counter = 1; in eap_psk_derive_keys() local 44 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 47 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 48 counter++; in eap_psk_derive_keys() 51 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 54 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 55 counter++; in eap_psk_derive_keys() 59 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 63 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 64 counter++; in eap_psk_derive_keys()
|
| /src/crypto/openssl/crypto/chacha/ |
| H A D | chacha_ppc.c | 19 const unsigned int counter[4]); 22 const unsigned int counter[4]); 25 const unsigned int counter[4]); 28 const unsigned int counter[4]); 31 const unsigned int counter[4]) in ChaCha20_ctr32() 35 ? ChaCha20_ctr32_vsx_p10(out, inp, len, key, counter) in ChaCha20_ctr32() 39 ? ChaCha20_ctr32_vsx(out, inp, len, key, counter) in ChaCha20_ctr32() 41 ? ChaCha20_ctr32_vmx(out, inp, len, key, counter) in ChaCha20_ctr32() 42 : ChaCha20_ctr32_int(out, inp, len, key, counter); in ChaCha20_ctr32()
|
| H A D | chacha_riscv.c | 45 const unsigned int counter[4]); 49 const unsigned int counter[4]); 52 const unsigned int key[8], const unsigned int counter[4]) in ChaCha20_ctr32() 58 ChaCha20_ctr32_v_zbb_zvkb(out, inp, len, key, counter); in ChaCha20_ctr32() 60 ChaCha20_ctr32_v_zbb(out, inp, len, key, counter); in ChaCha20_ctr32() 63 ChaCha20_ctr32_c(out, inp, len, key, counter); in ChaCha20_ctr32()
|
| /src/contrib/llvm-project/llvm/lib/Support/BLAKE3/ |
| H A D | blake3_impl.h | 143 INLINE uint32_t counter_low(uint64_t counter) { return (uint32_t)counter; } in counter_low() argument 145 INLINE uint32_t counter_high(uint64_t counter) { in counter_high() argument 146 return (uint32_t)(counter >> 32); in counter_high() 189 uint8_t block_len, uint64_t counter, 195 uint8_t block_len, uint64_t counter, uint8_t flags, 200 size_t blocks, const uint32_t key[8], uint64_t counter, 212 uint8_t block_len, uint64_t counter, 218 uint8_t block_len, uint64_t counter, 224 uint64_t counter, bool increment_counter, 233 uint8_t block_len, uint64_t counter, [all …]
|
| H A D | blake3_dispatch.c | 139 uint8_t block_len, uint64_t counter, in blake3_compress_in_place() argument 146 blake3_compress_in_place_avx512(cv, block, block_len, counter, flags); in blake3_compress_in_place() 152 blake3_compress_in_place_sse41(cv, block, block_len, counter, flags); in blake3_compress_in_place() 158 blake3_compress_in_place_sse2(cv, block, block_len, counter, flags); in blake3_compress_in_place() 163 blake3_compress_in_place_portable(cv, block, block_len, counter, flags); in blake3_compress_in_place() 168 uint8_t block_len, uint64_t counter, uint8_t flags, in blake3_compress_xof() argument 175 blake3_compress_xof_avx512(cv, block, block_len, counter, flags, out); in blake3_compress_xof() 181 blake3_compress_xof_sse41(cv, block, block_len, counter, flags, out); in blake3_compress_xof() 187 blake3_compress_xof_sse2(cv, block, block_len, counter, flags, out); in blake3_compress_xof() 192 blake3_compress_xof_portable(cv, block, block_len, counter, flags, out); in blake3_compress_xof() [all …]
|
| /src/crypto/openssl/crypto/dh/ |
| H A D | dh_asn1.c | 63 BIGNUM *counter; member 76 ASN1_SIMPLE(int_dhvparams, counter, BIGNUM) 120 size_t counter = (size_t)BN_get_word(dhx->vparams->counter); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() local 123 counter); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() 125 BN_free(dhx->vparams->counter); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() 144 int counter; in i2d_DHxparams() local 149 ossl_ffc_params_get_validate_params(params, &seed.data, &seedlen, &counter); in i2d_DHxparams() 152 if (counter != -1 && seed.data != NULL && seed.length > 0) { in i2d_DHxparams() 155 dhv.counter = BN_new(); in i2d_DHxparams() 156 if (dhv.counter == NULL) in i2d_DHxparams() [all …]
|
| /src/crypto/krb5/src/lib/crypto/builtin/sha2/ |
| H A D | sha512.c | 56 #define A m->counter[0] 57 #define B m->counter[1] 58 #define C m->counter[2] 59 #define D m->counter[3] 60 #define E m->counter[4] 61 #define F m->counter[5] 62 #define G m->counter[6] 63 #define H m->counter[7] 267 r[8*i+7] = m->counter[i] & 0xFF; in k5_sha512_final() 268 r[8*i+6] = (m->counter[i] >> 8) & 0xFF; in k5_sha512_final() [all …]
|
| H A D | sha256.c | 78 #define A m->counter[0] 79 #define B m->counter[1] 80 #define C m->counter[2] 81 #define D m->counter[3] 82 #define E m->counter[4] 83 #define F m->counter[5] 84 #define G m->counter[6] 85 #define H m->counter[7] 252 r[4*i+3] = m->counter[i] & 0xFF; in k5_sha256_final() 253 r[4*i+2] = (m->counter[i] >> 8) & 0xFF; in k5_sha256_final() [all …]
|
| /src/crypto/openssl/crypto/evp/ |
| H A D | e_chacha20_poly1305.c | 27 unsigned int counter[CHACHA_CTR_SIZE / 4]; member 50 key->counter[i / 4] = CHACHA_U8TOU32(iv + i); in chacha_init_key() 76 key->counter[0]++; in chacha_cipher() 77 if (key->counter[0] == 0) in chacha_cipher() 78 key->counter[1]++; in chacha_cipher() 84 ctr32 = key->counter[0]; in chacha_cipher() 107 ChaCha20_ctr32(out, inp, blocks, key->key.d, key->counter); in chacha_cipher() 112 key->counter[0] = ctr32; in chacha_cipher() 114 key->counter[1]++; in chacha_cipher() 120 key->key.d, key->counter); in chacha_cipher() [all …]
|
| /src/contrib/ee/ |
| H A D | ee.c | 586 int counter; in main() local 588 for (counter = 1; counter < 24; counter++) in main() 589 signal(counter, SIG_IGN); in main() 651 counter = 0; in main() 748 int counter; in insert() local 755 counter = len_char('\011', scr_horz); in insert() 756 for (; counter > 0; counter--) in insert() 767 counter = position; in insert() 768 while (counter < curr_line->line_length) /* find end of line */ in insert() 770 counter++; in insert() [all …]
|
| /src/crypto/openssl/providers/implementations/ciphers/ |
| H A D | cipher_chacha20_hw.c | 35 ctx->counter[i / 4] = CHACHA_U8TOU32(bctx->oiv + i); in chacha20_initiv() 60 ctx->counter[0]++; in chacha20_cipher() 61 if (ctx->counter[0] == 0) in chacha20_cipher() 62 ctx->counter[1]++; in chacha20_cipher() 68 ctr32 = ctx->counter[0]; in chacha20_cipher() 92 ChaCha20_ctr32(out, in, blocks, ctx->key.d, ctx->counter); in chacha20_cipher() 97 ctx->counter[0] = ctr32; in chacha20_cipher() 99 ctx->counter[1]++; in chacha20_cipher() 105 ctx->key.d, ctx->counter); in chacha20_cipher()
|
| H A D | cipher_aes_gcm_siv_hw.c | 29 uint32_t counter = 0x0; in aes_gcm_siv_initkey() local 32 uint32_t counter; in aes_gcm_siv_initkey() member 59 memcpy(&data.block[sizeof(data.counter)], ctx->nonce, NONCE_SIZE); in aes_gcm_siv_initkey() 65 data.counter = counter; in aes_gcm_siv_initkey() 67 data.counter = GSWAP4(counter); in aes_gcm_siv_initkey() 74 counter++; in aes_gcm_siv_initkey() 80 data.counter = counter; in aes_gcm_siv_initkey() 82 data.counter = GSWAP4(counter); in aes_gcm_siv_initkey() 89 counter++; in aes_gcm_siv_initkey() 342 uint32_t counter; in aes_gcm_siv_ctr32() local [all …]
|
| H A D | cipher_chacha20_poly1305_hw.c | 37 ctx->chacha.counter[1] = ctx->nonce[0]; in chacha_poly1305_tls_init() 38 ctx->chacha.counter[2] = ctx->nonce[1] ^ CHACHA_U8TOU32(aad); in chacha_poly1305_tls_init() 39 ctx->chacha.counter[3] = ctx->nonce[2] ^ CHACHA_U8TOU32(aad + 4); in chacha_poly1305_tls_init() 52 ctx->nonce[0] = ctx->chacha.counter[1] = CHACHA_U8TOU32(fixed); in chacha_poly1305_tls_iv_set_fixed() 53 ctx->nonce[1] = ctx->chacha.counter[2] = CHACHA_U8TOU32(fixed + 4); in chacha_poly1305_tls_iv_set_fixed() 54 ctx->nonce[2] = ctx->chacha.counter[3] = CHACHA_U8TOU32(fixed + 8); in chacha_poly1305_tls_iv_set_fixed() 98 ctx->nonce[0] = ctx->chacha.counter[1]; in chacha20_poly1305_initiv() 99 ctx->nonce[1] = ctx->chacha.counter[2]; in chacha20_poly1305_initiv() 100 ctx->nonce[2] = ctx->chacha.counter[3]; in chacha20_poly1305_initiv() 134 ctx->chacha.counter[0] = 0; in chacha20_poly1305_tls_cipher() [all …]
|
| /src/tools/test/hwpmc/ |
| H A D | pmctest.py | 74 for counter in counters: 75 if counter in notcounter: 78 with open(tmpdir + "/" + program + "-" + counter + ".txt", 'w') as file: 79 p = subprocess.Popen(["pmcstat", "-p", counter] + program_parts, 84 pmcout = tmpdir + "/" + program + "-" + counter + ".pmc" 87 "-P", counter] + program_parts, 90 resdir = tmpdir + "/" + program + "-" + counter + ".results" 98 gmondir = resdir + "/" + counter 110 print ("Failed to get gmon data for ", counter) 114 p = subprocess.Popen(["pmcstat", "-p", counter] + program_parts,
|
| /src/crypto/krb5/src/lib/crypto/builtin/enc_provider/ |
| H A D | rc4.c | 77 unsigned int counter; in k5_arcfour_init() local 85 for (counter = 0; counter < 256; counter++) in k5_arcfour_init() 86 state[counter] = counter; in k5_arcfour_init() 89 for (counter = 0; counter < 256; counter++) in k5_arcfour_init() 91 t = state[counter]; in k5_arcfour_init() 95 state[counter] = u; in k5_arcfour_init()
|
| /src/crypto/openssl/crypto/modes/ |
| H A D | ctr128.c | 27 static void ctr128_inc(unsigned char *counter) in ctr128_inc() argument 33 c += counter[n]; in ctr128_inc() 34 counter[n] = (u8)c; in ctr128_inc() 40 static void ctr128_inc_aligned(unsigned char *counter) in ctr128_inc_aligned() argument 45 if (IS_LITTLE_ENDIAN || ((size_t)counter % sizeof(size_t)) != 0) { in ctr128_inc_aligned() 46 ctr128_inc(counter); in ctr128_inc_aligned() 50 data = (size_t *)counter; in ctr128_inc_aligned() 138 static void ctr96_inc(unsigned char *counter) in ctr96_inc() argument 144 c += counter[n]; in ctr96_inc() 145 counter[n] = (u8)c; in ctr96_inc()
|
| /src/sys/dev/hwpmc/ |
| H A D | hwpmc_power8.c | 156 uint32_t caps, config, counter, pe; in power8_allocate_pmc() local 164 counter = PM_EVENT_COUNTER(pe); in power8_allocate_pmc() 180 if (counter == 0 && config == PM_INST_CMPL) in power8_allocate_pmc() 181 counter = 5; in power8_allocate_pmc() 182 else if (counter == 0 && config == PM_CYC) in power8_allocate_pmc() 183 counter = 6; in power8_allocate_pmc() 184 else if (counter > 4) in power8_allocate_pmc() 187 if (counter != 0 && counter != ri + 1) in power8_allocate_pmc()
|