Home
last modified time | relevance | path

Searched refs:counter (Results 1 – 25 of 537) sorted by relevance

12345678910>>...22

/freebsd/sys/dev/mlx5/mlx5_core/
H A Dmlx5_fs_counters.c79 * dump (access to struct mlx5_fc) after a counter is destroyed.
81 * access to counter list:
90 * - add a counter to lockless dellist
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 in mlx5_fc_stats_insert()
131 mlx5_fc_stats_remove(struct mlx5_core_dev * dev,struct mlx5_fc * counter) mlx5_fc_stats_remove() argument
178 struct mlx5_fc *counter = first; mlx5_fc_stats_query_counter_range() local
213 mlx5_fc_free(struct mlx5_core_dev * dev,struct mlx5_fc * counter) mlx5_fc_free() argument
219 mlx5_fc_release(struct mlx5_core_dev * dev,struct mlx5_fc * counter) mlx5_fc_release() argument
274 struct mlx5_fc *counter = NULL, *last = NULL, *tmp; mlx5_fc_stats_work() local
312 struct mlx5_fc *counter; mlx5_fc_single_alloc() local
331 struct mlx5_fc *counter; mlx5_fc_acquire() local
344 struct mlx5_fc *counter = mlx5_fc_acquire(dev, aging); mlx5_fc_create_ex() local
384 struct mlx5_fc *counter = mlx5_fc_create_ex(dev, aging); mlx5_fc_create() local
393 mlx5_fc_id(struct mlx5_fc * counter) mlx5_fc_id() argument
399 mlx5_fc_destroy(struct mlx5_core_dev * dev,struct mlx5_fc * counter) mlx5_fc_destroy() argument
454 struct mlx5_fc *counter; mlx5_cleanup_fc_stats() local
476 mlx5_fc_query(struct mlx5_core_dev * dev,struct mlx5_fc * counter,u64 * packets,u64 * bytes) mlx5_fc_query() argument
483 mlx5_fc_query_lastuse(struct mlx5_fc * counter) mlx5_fc_query_lastuse() argument
488 mlx5_fc_query_cached(struct mlx5_fc * counter,u64 * bytes,u64 * packets,u64 * lastuse) mlx5_fc_query_cached() argument
531 mlx5_fc_init(struct mlx5_fc * counter,struct mlx5_fc_bulk * bulk,u32 id) mlx5_fc_init() argument
[all...]
/freebsd/sys/crypto/openssl/
H A Dossl_chacha20.c60 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 …]
H A Dossl_ppc.c110 const unsigned int counter[4]);
113 const unsigned int counter[4]);
116 const unsigned int counter[4]);
119 const unsigned int counter[4]);
122 const unsigned int counter[4]) in ChaCha20_ctr32()
125 ? ChaCha20_ctr32_vsx(out, inp, len, key, counter) in ChaCha20_ctr32()
127 ? ChaCha20_ctr32_vmx(out, inp, len, key, counter) in ChaCha20_ctr32()
128 : ChaCha20_ctr32_int(out, inp, len, key, counter); in ChaCha20_ctr32()
/freebsd/sys/compat/linuxkpi/common/include/asm/
H A Datomic64.h34 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 Datomic-long.h35 #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 Datomic.h36 #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 …]
/freebsd/sys/contrib/openzfs/module/icp/algs/blake3/
H A Dblake3_impl.c42 uint64_t counter, uint8_t flags);
46 uint64_t counter, uint8_t flags, uint8_t out[64]);
50 uint64_t counter, boolean_t increment_counter, uint8_t flags,
55 uint64_t counter, uint8_t flags) { in blake3_compress_in_place_sse2() argument
57 zfs_blake3_compress_in_place_sse2(cv, block, block_len, counter, in blake3_compress_in_place_sse2()
64 uint64_t counter, uint8_t flags, uint8_t out[64]) { in blake3_compress_xof_sse2() argument
66 zfs_blake3_compress_xof_sse2(cv, block, block_len, counter, flags, in blake3_compress_xof_sse2()
73 uint64_t counter, boolean_t increment_counter, uint8_t flags, in blake3_hash_many_sse2() argument
76 zfs_blake3_hash_many_sse2(inputs, num_inputs, blocks, key, counter, in blake3_hash_many_sse2()
106 uint64_t counter, uint8_t flags);
[all …]
H A Dblake3_generic.c67 uint64_t counter, uint8_t flags) in compress_pre() argument
99 state[12] = counter_low(counter); in compress_pre()
100 state[13] = counter_high(counter); in compress_pre()
115 uint64_t counter, uint8_t flags) in blake3_compress_in_place_generic() argument
118 compress_pre(state, cv, block, block_len, counter, flags); in blake3_compress_in_place_generic()
130 const uint32_t key[8], uint64_t counter, uint8_t flags, in hash_one_generic() argument
141 counter, block_flags); in hash_one_generic()
151 uint64_t counter, uint8_t flags, uint8_t out[64]) in blake3_compress_xof_generic() argument
154 compress_pre(state, cv, block, block_len, counter, flags); in blake3_compress_xof_generic()
175 size_t num_inputs, size_t blocks, const uint32_t key[8], uint64_t counter, in blake3_hash_many_generic() argument
[all …]
/freebsd/usr.sbin/keyserv/
H A Dcrypt_server.c86 short counter; in prepare_key() local
89 for(counter = 0; counter < 256; counter++) in prepare_key()
90 state[counter] = counter; in prepare_key()
95 for(counter = 0; counter < 256; counter++) in prepare_key()
97 index2 = (key_data_ptr[index1] + state[counter] + in prepare_key()
99 swap_byte(&state[counter], &state[index2]); in prepare_key()
111 short counter; in arcfour() local
117 for(counter = 0; counter < buffer_len; counter ++) in arcfour()
125 buffer_ptr[counter] ^= state[xorIndex]; in arcfour()
/freebsd/contrib/wpa/src/eap_common/
H A Deap_psk_common.c38 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()
/freebsd/contrib/llvm-project/llvm/lib/Support/BLAKE3/
H A Dblake3_impl.h143 INLINE uint32_t counter_low(uint64_t counter) { return (uint32_t)counter; }
145 INLINE uint32_t counter_high(uint64_t counter) { in counter_high()
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, boo
142 counter_low(uint64_t counter) counter_low() argument
144 counter_high(uint64_t counter) counter_high() argument
[all...]
H A Dblake3_dispatch.c139 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 …]
H A Dblake3_portable.c39 uint8_t block_len, uint64_t counter, uint8_t flags) { in compress_pre() argument
70 state[12] = counter_low(counter); in compress_pre()
71 state[13] = counter_high(counter); in compress_pre()
86 uint8_t block_len, uint64_t counter, in blake3_compress_in_place_portable() argument
89 compress_pre(state, cv, block, block_len, counter, flags); in blake3_compress_in_place_portable()
102 uint8_t block_len, uint64_t counter, in blake3_compress_xof_portable() argument
105 compress_pre(state, cv, block, block_len, counter, flags); in blake3_compress_xof_portable()
126 const uint32_t key[8], uint64_t counter, in hash_one_portable() argument
136 blake3_compress_in_place_portable(cv, input, BLAKE3_BLOCK_LEN, counter, in hash_one_portable()
147 uint64_t counter, bool increment_counter, in blake3_hash_many_portable() argument
[all …]
/freebsd/crypto/openssl/crypto/dh/
H A Ddh_asn1.c63 BIGNUM *counter; member
76 ASN1_SIMPLE(int_dhvparams, counter, BIGNUM)
119 size_t counter = (size_t)BN_get_word(dhx->vparams->counter); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() local
122 counter); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname()
124 BN_free(dhx->vparams->counter); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname()
143 int counter; in i2d_DHxparams() local
148 ossl_ffc_params_get_validate_params(params, &seed.data, &seedlen, &counter); in i2d_DHxparams()
151 if (counter != -1 && seed.data != NULL && seed.length > 0) { in i2d_DHxparams()
154 dhv.counter = BN_new(); in i2d_DHxparams()
155 if (dhv.counter == NULL) in i2d_DHxparams()
[all …]
/freebsd/crypto/openssl/crypto/chacha/
H A Dchacha_ppc.c19 const unsigned int counter[4]);
22 const unsigned int counter[4]);
25 const unsigned int counter[4]);
28 const unsigned int counter[4]) in ChaCha20_ctr32()
31 ? ChaCha20_ctr32_vsx(out, inp, len, key, counter) in ChaCha20_ctr32()
33 ? ChaCha20_ctr32_vmx(out, inp, len, key, counter) in ChaCha20_ctr32()
34 : ChaCha20_ctr32_int(out, inp, len, key, counter); in ChaCha20_ctr32()
/freebsd/crypto/openssl/crypto/evp/
H A De_chacha20_poly1305.c27 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()
113 if (ctr32 == 0) key->counter[1]++; in chacha_cipher()
119 key->key.d, key->counter); in chacha_cipher()
[all …]
/freebsd/crypto/openssl/providers/implementations/ciphers/
H A Dcipher_chacha20_hw.c35 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()
98 if (ctr32 == 0) ctx->counter[1]++; in chacha20_cipher()
104 ctx->key.d, ctx->counter); in chacha20_cipher()
H A Dcipher_chacha20_poly1305_hw.c37 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()
135 ctx->chacha.counter[0] = 0; in chacha20_poly1305_tls_cipher()
[all …]
/freebsd/contrib/ee/
H A Dee.c541 int counter; in main() local
543 for (counter = 1; counter < 24; counter++) in main()
544 signal(counter, SIG_IGN); in main()
606 counter = 0; in main()
685 int counter; in insert() local
692 counter = len_char('\011', scr_horz); in insert()
693 for (; counter > 0; counter--) in insert()
704 counter = position; in insert()
705 while (counter < curr_line->line_length) /* find end of line */ in insert()
707 counter++; in insert()
[all …]
/freebsd/crypto/openssl/crypto/modes/
H A Dctr128.c27 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()
/freebsd/sys/dev/hwpmc/
H A Dhwpmc_power8.c156 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()
/freebsd/sys/contrib/ck/src/
H A Dck_ec.c38 ck_pr_and_32(&ec->counter, (1U << 31) - 1); in ck_ec32_wake()
39 ops->wake32(ops, &ec->counter); in ck_ec32_wake()
57 ck_pr_and_64(&ec->counter, ~1); in ck_ec64_wake()
58 ops->wake64(ops, &ec->counter); in ck_ec64_wake()
206 uint##W##_t current = ck_pr_load_##W(&ec->counter); \
215 current = ck_pr_load_##W(&ec->counter); \
255 return (ck_pr_cas_##W##_value(&ec->counter, \
281 wait_state->ops->wait32(wait_state, &ec->counter, in ck_ec32_wait_slow_once()
283 return ck_pr_load_32(&ec->counter) != flagged_word; in ck_ec32_wait_slow_once()
300 if (ck_pr_load_64(&ec->counter) != flagged_word) { in ck_ec64_wait_slow_once()
[all …]
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/
H A Dchacha20_dolbeau-avx2.c54 chacha_ivsetup(chacha_ctx *ctx, const uint8_t *iv, const uint8_t *counter) in chacha_ivsetup() argument
56 ctx->input[12] = counter == NULL ? 0 : LOAD32_LE(counter + 0); in chacha_ivsetup()
57 ctx->input[13] = counter == NULL ? 0 : LOAD32_LE(counter + 4); in chacha_ivsetup()
63 chacha_ietf_ivsetup(chacha_ctx *ctx, const uint8_t *iv, const uint8_t *counter) in chacha_ietf_ivsetup() argument
65 ctx->input[12] = counter == NULL ? 0 : LOAD32_LE(counter); in chacha_ietf_ivsetup()
H A Dchacha20_dolbeau-ssse3.c49 chacha_ivsetup(chacha_ctx *ctx, const uint8_t *iv, const uint8_t *counter) in chacha_ivsetup() argument
51 ctx->input[12] = counter == NULL ? 0 : LOAD32_LE(counter + 0); in chacha_ivsetup()
52 ctx->input[13] = counter == NULL ? 0 : LOAD32_LE(counter + 4); in chacha_ivsetup()
58 chacha_ietf_ivsetup(chacha_ctx *ctx, const uint8_t *iv, const uint8_t *counter) in chacha_ietf_ivsetup() argument
60 ctx->input[12] = counter == NULL ? 0 : LOAD32_LE(counter); in chacha_ietf_ivsetup()
/freebsd/sys/contrib/ck/include/
H A Dck_ec.h394 uint32_t counter; member
406 uint64_t counter; member
412 #define CK_EC_INITIALIZER { .counter = 0 }
604 ec->counter = value & ~(1UL << 31); in ck_ec32_init()
610 uint32_t ret = ck_pr_load_32(&ec->counter) & ~(1UL << 31); in ck_ec32_value()
618 return ck_pr_load_32(&ec->counter) & (1UL << 31); in ck_ec32_has_waiters()
660 : "+m"(ec->counter), "=@ccle"(flagged) \ in ck_ec32_inc()
665 : "+m"(ec->counter), "=r"(flagged) \ in ck_ec32_inc()
709 old = ck_pr_faa_32(&ec->counter, delta); in ck_ec32_add_mp()
732 : "+m"(ec->counter), "+r"(old) in ck_ec32_add_sp()
[all …]

12345678910>>...22