• Home
  • Raw
  • Download

Lines Matching +full:path +full:- +full:map

1 /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
6 * Copyright (C) 2013-2015 Alexei Starovoitov <ast@kernel.org>
72 * - for object open from file, this will override setting object
73 * name from file path's base name;
74 * - for object open from memory buffer, this will specify an object
75 * name and will override default "<addr>-<buf-size>" name;
78 /* parse map definitions non-strictly, allowing extra attributes/data */
80 /* DEPRECATED: handle CO-RE relocations non-strictly, allowing failures.
81 * Value is ignored. Relocations always are processed non-strictly.
82 * Non-relocatable instructions are replaced with invalid ones to
88 * auto-pinned to that path on load; defaults to "/sys/fs/bpf".
99 LIBBPF_API struct bpf_object *bpf_object__open(const char *path);
101 bpf_object__open_file(const char *path, const struct bpf_object_open_opts *opts);
119 /* pin_maps and unpin_maps can both be called with a NULL path, in which case
120 * they will use the pin_path attribute of each map (and ignore all maps that
123 LIBBPF_API int bpf_object__pin_maps(struct bpf_object *obj, const char *path);
125 const char *path);
127 const char *path);
129 const char *path);
130 LIBBPF_API int bpf_object__pin(struct bpf_object *object, const char *path);
214 const char *path,
217 const char *path,
219 LIBBPF_API int bpf_program__pin(struct bpf_program *prog, const char *path);
220 LIBBPF_API int bpf_program__unpin(struct bpf_program *prog, const char *path);
225 LIBBPF_API struct bpf_link *bpf_link__open(const char *path);
228 LIBBPF_API int bpf_link__pin(struct bpf_link *link, const char *path);
270 LIBBPF_API struct bpf_link *bpf_map__attach_struct_ops(struct bpf_map *map);
293 * - bpf_program_prep_t:
300 * - bpf_program__set_prep:
304 * - bpf_program__nth_fd:
328 * - prog: The bpf_program being loaded.
329 * - n: Index of instance being generated.
330 * - insns: BPF instructions array.
331 * - insns_cnt:Number of instructions in insns.
332 * - res: Output parameter, result of transformation.
335 * - Zero: pre-processing success.
336 * - Non-zero: pre-processing error, stop loading.
395 * would trigger a -Wpacked warning message, and lead to an error
396 * if -Werror is set.
424 bpf_map__next(const struct bpf_map *map, const struct bpf_object *obj);
432 bpf_map__prev(const struct bpf_map *map, const struct bpf_object *obj);
434 /* get/set map FD */
435 LIBBPF_API int bpf_map__fd(const struct bpf_map *map);
436 LIBBPF_API int bpf_map__reuse_fd(struct bpf_map *map, int fd);
437 /* get map definition */
438 LIBBPF_API const struct bpf_map_def *bpf_map__def(const struct bpf_map *map);
439 /* get map name */
440 LIBBPF_API const char *bpf_map__name(const struct bpf_map *map);
441 /* get/set map type */
442 LIBBPF_API enum bpf_map_type bpf_map__type(const struct bpf_map *map);
443 LIBBPF_API int bpf_map__set_type(struct bpf_map *map, enum bpf_map_type type);
444 /* get/set map size (max_entries) */
445 LIBBPF_API __u32 bpf_map__max_entries(const struct bpf_map *map);
446 LIBBPF_API int bpf_map__set_max_entries(struct bpf_map *map, __u32 max_entries);
447 LIBBPF_API int bpf_map__resize(struct bpf_map *map, __u32 max_entries);
448 /* get/set map flags */
449 LIBBPF_API __u32 bpf_map__map_flags(const struct bpf_map *map);
450 LIBBPF_API int bpf_map__set_map_flags(struct bpf_map *map, __u32 flags);
451 /* get/set map NUMA node */
452 LIBBPF_API __u32 bpf_map__numa_node(const struct bpf_map *map);
453 LIBBPF_API int bpf_map__set_numa_node(struct bpf_map *map, __u32 numa_node);
454 /* get/set map key size */
455 LIBBPF_API __u32 bpf_map__key_size(const struct bpf_map *map);
456 LIBBPF_API int bpf_map__set_key_size(struct bpf_map *map, __u32 size);
457 /* get/set map value size */
458 LIBBPF_API __u32 bpf_map__value_size(const struct bpf_map *map);
459 LIBBPF_API int bpf_map__set_value_size(struct bpf_map *map, __u32 size);
460 /* get map key/value BTF type IDs */
461 LIBBPF_API __u32 bpf_map__btf_key_type_id(const struct bpf_map *map);
462 LIBBPF_API __u32 bpf_map__btf_value_type_id(const struct bpf_map *map);
463 /* get/set map if_index */
464 LIBBPF_API __u32 bpf_map__ifindex(const struct bpf_map *map);
465 LIBBPF_API int bpf_map__set_ifindex(struct bpf_map *map, __u32 ifindex);
468 LIBBPF_API int bpf_map__set_priv(struct bpf_map *map, void *priv,
470 LIBBPF_API void *bpf_map__priv(const struct bpf_map *map);
471 LIBBPF_API int bpf_map__set_initial_value(struct bpf_map *map,
473 LIBBPF_API bool bpf_map__is_offload_neutral(const struct bpf_map *map);
474 LIBBPF_API bool bpf_map__is_internal(const struct bpf_map *map);
475 LIBBPF_API int bpf_map__set_pin_path(struct bpf_map *map, const char *path);
476 LIBBPF_API const char *bpf_map__get_pin_path(const struct bpf_map *map);
477 LIBBPF_API bool bpf_map__is_pinned(const struct bpf_map *map);
478 LIBBPF_API int bpf_map__pin(struct bpf_map *map, const char *path);
479 LIBBPF_API int bpf_map__unpin(struct bpf_map *map, const char *path);
481 LIBBPF_API int bpf_map__set_inner_map_fd(struct bpf_map *map, int fd);
564 LIBBPF_PERF_EVENT_ERROR = -1,
565 LIBBPF_PERF_EVENT_CONT = -2,
582 * max_entries of given PERF_EVENT_ARRAY map)
587 /* if cpu_cnt > 0, map_keys specify map keys to set per-CPU FDs for */
662 * write(f, info_linear, sizeof(*info_linear) + info_linear->data_len);
704 * per-CPU maps. Negative errno is returned on failure.
720 struct bpf_map **map; member