From: Felix Fietkau Date: Mon, 21 Mar 2022 19:14:16 +0000 (+0100) Subject: loader: fix use of deprecated functions X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=91cf440db9e2ebc1f7ce9f532500f3a320e90a1b;p=project%2Fqosify.git loader: fix use of deprecated functions Signed-off-by: Felix Fietkau --- diff --git a/loader.c b/loader.c index 0b9449f..c50e739 100644 --- a/loader.c +++ b/loader.c @@ -30,7 +30,7 @@ static void qosify_fill_rodata(struct bpf_object *obj, uint32_t flags) { struct bpf_map *map = NULL; - while ((map = bpf_map__next(map, obj)) != NULL) { + while ((map = bpf_object__next_map(obj, map)) != NULL) { if (!strstr(bpf_map__name(map), ".rodata")) continue; @@ -58,7 +58,7 @@ qosify_create_program(const char *suffix, uint32_t flags) return -1; } - prog = bpf_object__find_program_by_title(obj, "classifier"); + prog = bpf_object__find_program_by_name(obj, "classify"); if (!prog) { fprintf(stderr, "Can't find classifier prog\n"); return -1; diff --git a/qosify-bpf.c b/qosify-bpf.c index 54a1e38..407485b 100644 --- a/qosify-bpf.c +++ b/qosify-bpf.c @@ -462,7 +462,7 @@ dscp_lookup_class(uint8_t *dscp, bool ingress, struct qosify_class **out_class) return 0; } -SEC("classifier") +SEC("tc") int classify(struct __sk_buff *skb) { bool ingress = module_flags & QOSIFY_INGRESS;