From 91cf440db9e2ebc1f7ce9f532500f3a320e90a1b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 21 Mar 2022 20:14:16 +0100 Subject: [PATCH] loader: fix use of deprecated functions Signed-off-by: Felix Fietkau --- loader.c | 4 ++-- qosify-bpf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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; -- 2.30.2