Home
last modified time | relevance | path

Searched refs:array (Results 1 – 16 of 16) sorted by relevance

/kernel/bpf/
Darraymap.c22 static void bpf_array_free_percpu(struct bpf_array *array) in bpf_array_free_percpu() argument
26 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_free_percpu()
27 free_percpu(array->pptrs[i]); in bpf_array_free_percpu()
32 static int bpf_array_alloc_percpu(struct bpf_array *array) in bpf_array_alloc_percpu() argument
37 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_alloc_percpu()
38 ptr = bpf_map_alloc_percpu(&array->map, array->elem_size, 8, in bpf_array_alloc_percpu()
41 bpf_array_free_percpu(array); in bpf_array_alloc_percpu()
44 array->pptrs[i] = ptr; in bpf_array_alloc_percpu()
87 struct bpf_array *array; in array_map_alloc() local
112 array_size = sizeof(*array); in array_map_alloc()
[all …]
Dreuseport_array.c52 struct reuseport_array *array = reuseport_array(map); in reuseport_array_lookup_elem() local
55 if (unlikely(index >= array->map.max_entries)) in reuseport_array_lookup_elem()
58 return rcu_dereference(array->ptrs[index]); in reuseport_array_lookup_elem()
64 struct reuseport_array *array = reuseport_array(map); in reuseport_array_delete_elem() local
72 if (!rcu_access_pointer(array->ptrs[index])) in reuseport_array_delete_elem()
77 sk = rcu_dereference_protected(array->ptrs[index], in reuseport_array_delete_elem()
82 RCU_INIT_POINTER(array->ptrs[index], NULL); in reuseport_array_delete_elem()
96 struct reuseport_array *array = reuseport_array(map); in reuseport_array_free() local
127 sk = rcu_dereference(array->ptrs[i]); in reuseport_array_free()
137 RCU_INIT_POINTER(array->ptrs[i], NULL); in reuseport_array_free()
[all …]
Dcore.c1836 struct bpf_array *array = container_of(map, struct bpf_array, map); in ___bpf_prog_run() local
1840 if (unlikely(index >= array->map.max_entries)) in ___bpf_prog_run()
1848 prog = READ_ONCE(array->ptrs[index]); in ___bpf_prog_run()
2269 int bpf_prog_array_length(struct bpf_prog_array *array) in bpf_prog_array_length() argument
2274 for (item = array->items; item->prog; item++) in bpf_prog_array_length()
2280 bool bpf_prog_array_is_empty(struct bpf_prog_array *array) in bpf_prog_array_is_empty() argument
2284 for (item = array->items; item->prog; item++) in bpf_prog_array_is_empty()
2290 static bool bpf_prog_array_copy_core(struct bpf_prog_array *array, in bpf_prog_array_copy_core() argument
2297 for (item = array->items; item->prog; item++) { in bpf_prog_array_copy_core()
2310 int bpf_prog_array_copy_to_user(struct bpf_prog_array *array, in bpf_prog_array_copy_to_user() argument
[all …]
Dbtf.c919 const struct btf_array *array; in btf_show_name() local
991 array = btf_type_array(t); in btf_show_name()
994 id = array->type; in btf_show_name()
1843 const struct btf_array *array = NULL; in __btf_resolve_size() local
1875 array = btf_type_array(type); in __btf_resolve_size()
1876 if (nelems && array->nelems > U32_MAX / nelems) in __btf_resolve_size()
1878 nelems *= array->nelems; in __btf_resolve_size()
1879 type = btf_type_by_id(btf, array->type); in __btf_resolve_size()
1900 *elem_id = array ? array->type : 0; in __btf_resolve_size()
2803 const struct btf_array *array = btf_type_array(t); in btf_array_check_meta() local
[all …]
Dcgroup.c38 const struct bpf_prog_array *array; in bpf_prog_run_array_cg() local
46 array = rcu_dereference(cgrp->effective[atype]); in bpf_prog_run_array_cg()
47 item = &array->items[0]; in bpf_prog_run_array_cg()
403 struct bpf_prog_array **array) in compute_effective_progs() argument
441 *array = progs; in compute_effective_progs()
Dhelpers.c1131 struct bpf_array *array = container_of(map, struct bpf_array, map); in bpf_timer_cb() local
1134 idx = ((char *)value - array->value) / array->elem_size; in bpf_timer_cb()
/kernel/trace/
Dtracing_map.h173 #define TRACING_MAP_ARRAY_ELT(array, idx) \ argument
174 (array->pages[idx >> array->entry_shift] + \
175 ((idx & array->entry_mask) << array->entry_size_shift))
177 #define TRACING_MAP_ENTRY(array, idx) \ argument
178 ((struct tracing_map_entry *)TRACING_MAP_ARRAY_ELT(array, idx))
180 #define TRACING_MAP_ELT(array, idx) \ argument
181 ((struct tracing_map_elt **)TRACING_MAP_ARRAY_ELT(array, idx))
Dtrace_probe_tmpl.h137 goto array; in process_fetch_insn_bottom()
141 goto array; in process_fetch_insn_bottom()
145 goto array; in process_fetch_insn_bottom()
184 array: in process_fetch_insn_bottom()
Dring_buffer_benchmark.c139 inc = event->array[0] + 4; in read_page()
151 if (!event->array[0]) { in read_page()
155 inc = event->array[0] + 4; in read_page()
Dtrace_events_synth.c708 const char *prefix = NULL, *field_type = argv[0], *field_name, *array; in parse_synth_field() local
740 array = strchr(field_name, '['); in parse_synth_field()
741 if (array) in parse_synth_field()
742 len -= strlen(array); in parse_synth_field()
756 if (array) in parse_synth_field()
757 len += strlen(array); in parse_synth_field()
770 if (array) in parse_synth_field()
771 seq_buf_puts(&s, array); in parse_synth_field()
779 if (array) in parse_synth_field()
Dbpf_trace.c551 struct bpf_array *array = container_of(map, struct bpf_array, map); in get_map_perf_counter() local
560 if (unlikely(index >= array->map.max_entries)) in get_map_perf_counter()
563 ee = READ_ONCE(array->ptrs[index]); in get_map_perf_counter()
624 struct bpf_array *array = container_of(map, struct bpf_array, map); in __bpf_perf_event_output() local
632 if (unlikely(index >= array->map.max_entries)) in __bpf_perf_event_output()
635 ee = READ_ONCE(array->ptrs[index]); in __bpf_perf_event_output()
804 struct bpf_array *array = container_of(map, struct bpf_array, map); in BPF_CALL_2() local
807 if (unlikely(idx >= array->map.max_entries)) in BPF_CALL_2()
810 cgrp = READ_ONCE(array->ptrs[idx]); in BPF_CALL_2()
Dring_buffer.c170 length = event->array[0]; in rb_event_data_length()
187 return event->array[0] + RB_EVNT_HDR_SIZE; in rb_event_length()
242 if (length > RB_MAX_SMALL_DATA + sizeof(event->array[0])) in ring_buffer_event_length()
243 length -= sizeof(event->array[0]); in ring_buffer_event_length()
257 return (void *)&event->array[0]; in rb_event_data()
259 return (void *)&event->array[1]; in rb_event_data()
282 ts = event->array[0]; in rb_event_time_stamp()
2656 event->array[0] = (BUF_PAGE_SIZE - tail) - RB_EVNT_HDR_SIZE; in rb_reset_tail()
2792 event->array[0] = delta >> TS_SHIFT; in rb_add_time_stamp()
2796 event->array[0] = 0; in rb_add_time_stamp()
[all …]
Dtrace.c998 ring_buffer_write(buffer, event->array[0], &event->array[1]); in __buffer_unlock_commit()
2810 int max_len = PAGE_SIZE - struct_size(entry, array, 1); in trace_event_buffer_lock_reserve()
2833 entry->array[0] = len; in trace_event_buffer_lock_reserve()
/kernel/sched/
Drt.c138 struct rt_prio_array *array; in init_rt_rq() local
141 array = &rt_rq->active; in init_rt_rq()
143 INIT_LIST_HEAD(array->queue + i); in init_rt_rq()
144 __clear_bit(i, array->bitmap); in init_rt_rq()
147 __set_bit(MAX_RT_PRIO, array->bitmap); in init_rt_rq()
1210 struct rt_prio_array *array = &rt_rq->active; in dec_rt_prio() local
1213 sched_find_first_bit(array->bitmap); in dec_rt_prio()
1329 static void __delist_rt_entity(struct sched_rt_entity *rt_se, struct rt_prio_array *array) in __delist_rt_entity() argument
1333 if (list_empty(array->queue + rt_se_prio(rt_se))) in __delist_rt_entity()
1334 __clear_bit(rt_se_prio(rt_se), array->bitmap); in __delist_rt_entity()
[all …]
/kernel/cgroup/
Dcgroup-v1.c330 pid_t *array; in pidlist_array_load() local
346 array = kvmalloc_array(length, sizeof(pid_t), GFP_KERNEL); in pidlist_array_load()
347 if (!array) in pidlist_array_load()
360 array[n++] = pid; in pidlist_array_load()
365 sort(array, length, sizeof(pid_t), cmppid, NULL); in pidlist_array_load()
366 length = pidlist_uniq(array, length); in pidlist_array_load()
370 kvfree(array); in pidlist_array_load()
376 l->list = array; in pidlist_array_load()
/kernel/
Drelay.c69 static void relay_free_page_array(struct page **array) in relay_free_page_array() argument
71 kvfree(array); in relay_free_page_array()