Commit 451c4260 authored by Alexei Starovoitov's avatar Alexei Starovoitov
Browse files

Merge branch 'libbpf: deprecate some setter and getter APIs'



Andrii Nakryiko says:

====================

Another batch of simple deprecations. One of the last few, hopefully, as we
are getting close to deprecating all the planned APIs/features. See
individual patches for details.

v1->v2:
  - rebased on latest bpf-next, fixed Closes: reference.
====================

Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parents 74bb0f0c 23fcfcf8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -413,7 +413,7 @@ static void fixup_map(struct bpf_object *obj)
		for (i = 0; i < NR_TESTS; i++) {
			if (!strcmp(test_map_names[i], name) &&
			    (check_test_flags(i))) {
				bpf_map__resize(map, num_map_entries);
				bpf_map__set_max_entries(map, num_map_entries);
				continue;
			}
		}
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ static void print_avail_progs(struct bpf_object *obj)

	printf(" Programs to be used for -p/--progname:\n");
	bpf_object__for_each_program(pos, obj) {
		if (bpf_program__is_xdp(pos)) {
		if (bpf_program__type(pos) == BPF_PROG_TYPE_XDP) {
			if (!strncmp(bpf_program__name(pos), "xdp_prognum",
				     sizeof("xdp_prognum") - 1))
				printf(" %s\n", bpf_program__name(pos));
+1 −1
Original line number Diff line number Diff line
@@ -1218,7 +1218,7 @@ int sample_setup_maps(struct bpf_map **maps)
		default:
			return -EINVAL;
		}
		if (bpf_map__resize(sample_map[i], sample_map_count[i]) < 0)
		if (bpf_map__set_max_entries(sample_map[i], sample_map_count[i]) < 0)
			return -errno;
	}
	sample_map[MAP_DEVMAP_XMIT_MULTI] = maps[MAP_DEVMAP_XMIT_MULTI];
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ static inline char *safe_strncpy(char *dst, const char *src, size_t size)

#define __attach_tp(name)                                                      \
	({                                                                     \
		if (!bpf_program__is_tracing(skel->progs.name))                \
		if (bpf_program__type(skel->progs.name) != BPF_PROG_TYPE_TRACING)\
			return -EINVAL;                                        \
		skel->links.name = bpf_program__attach(skel->progs.name);      \
		if (!skel->links.name)                                         \
+1 −1
Original line number Diff line number Diff line
@@ -378,7 +378,7 @@ static void codegen_attach_detach(struct bpf_object *obj, const char *obj_name)
				int prog_fd = skel->progs.%2$s.prog_fd;		    \n\
			", obj_name, bpf_program__name(prog));

		switch (bpf_program__get_type(prog)) {
		switch (bpf_program__type(prog)) {
		case BPF_PROG_TYPE_RAW_TRACEPOINT:
			tp_name = strchr(bpf_program__section_name(prog), '/') + 1;
			printf("\tint fd = bpf_raw_tracepoint_open(\"%s\", prog_fd);\n", tp_name);
Loading