Lines Matching +full:512 +full:- +full:bytes
1 // SPDX-License-Identifier: GPL-2.0
16 const unsigned int data_sizes[] = {16, 32, 64, 96, 128, 192, 256, 512, 1024, 2048, 4096};
19 const unsigned int percpu_data_sizes[] = {8, 16, 32, 64, 96, 128, 192, 256, 512};
27 char data[_size - sizeof(void *)]; \
74 old = bpf_kptr_xchg(&value->data, new); in batch_alloc()
96 old = bpf_kptr_xchg(&value->data, NULL); in batch_free()
119 /* per-cpu allocator may not be able to refill in time */ in batch_percpu_alloc()
124 old = bpf_kptr_xchg(&value->data, new); in batch_percpu_alloc()
147 old = bpf_kptr_xchg(&value->data, NULL); in batch_percpu_free()
172 /* kptr doesn't support bin_data_8 which is a zero-sized array */
180 DEFINE_ARRAY_WITH_KPTR(512);
193 DEFINE_ARRAY_WITH_PERCPU_KPTR(512);
201 /* Alloc 128 16-bytes objects in batch to trigger refilling, in test_batch_alloc_free()
202 * then free 128 16-bytes objects in batch to trigger freeing. in test_batch_alloc_free()
211 CALL_BATCH_ALLOC_FREE(512, 64, 7); in test_batch_alloc_free()
225 /* Alloc 128 16-bytes objects in batch to trigger refilling, in test_free_through_map_free()
235 CALL_BATCH_ALLOC(512, 64, 7); in test_free_through_map_free()
249 /* Alloc 128 8-bytes per-cpu objects in batch to trigger refilling, in test_batch_percpu_alloc_free()
250 * then free 128 8-bytes per-cpu objects in batch to trigger freeing. in test_batch_percpu_alloc_free()
260 CALL_BATCH_PERCPU_ALLOC_FREE(512, 64, 8); in test_batch_percpu_alloc_free()
271 /* Alloc 128 8-bytes per-cpu objects in batch to trigger refilling, in test_percpu_free_through_map_free()
282 CALL_BATCH_PERCPU_ALLOC(512, 64, 8); in test_percpu_free_through_map_free()