loader: fix use of deprecated functions
authorFelix Fietkau <nbd@nbd.name>
Mon, 21 Mar 2022 19:14:16 +0000 (20:14 +0100)
committerFelix Fietkau <nbd@nbd.name>
Mon, 21 Mar 2022 19:16:04 +0000 (20:16 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
loader.c
qosify-bpf.c

index 0b9449f1afae6db1634ad4dd6ada204b6d373519..c50e739056199b56e983c89b64df621b3a83eecd 100644 (file)
--- 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;
index 54a1e38e266842a716fbf3858d1fb16dd3912b49..407485bb055797d614f7633e08668088298d378d 100644 (file)
@@ -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;