summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAnay Wadhera <awadhera@berkeley.edu>2021-05-20 21:55:49 -0700
committerMichael Bestas <mkbestas@lineageos.org>2022-04-19 00:49:43 +0300
commit23e6e6ae2fe1086a796e42ba907c17181daac9d0 (patch)
treefcdf98b5f292d4937833948022c5662a4402df39 /lib
parent58c5030c405c4c26ef80c7f263555468f3c20885 (diff)
Revert "bpf: introduce BPF_JIT_ALWAYS_ON config"
This reverts commit 28c486744e6de4d882a1d853aa63d99fcba4b7a6. Change-Id: I0e65abce457093a6c05d971b750228d99d5de131
Diffstat (limited to 'lib')
-rw-r--r--lib/test_bpf.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index 1a0d1e771e6c..69aee608ddec 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -5325,8 +5325,9 @@ static struct bpf_prog *generate_filter(int which, int *err)
return NULL;
}
}
+ /* We don't expect to fail. */
if (*err) {
- pr_cont("FAIL to prog_create err=%d len=%d\n",
+ pr_cont("FAIL to attach err=%d len=%d\n",
*err, fprog.len);
return NULL;
}
@@ -5345,11 +5346,7 @@ static struct bpf_prog *generate_filter(int which, int *err)
fp->type = BPF_PROG_TYPE_SOCKET_FILTER;
memcpy(fp->insnsi, fptr, fp->len * sizeof(struct bpf_insn));
- *err = bpf_prog_select_runtime(fp);
- if (*err) {
- pr_cont("FAIL to select_runtime err=%d\n", *err);
- return NULL;
- }
+ bpf_prog_select_runtime(fp);
break;
}
@@ -5542,8 +5539,8 @@ static __init int test_bpf(void)
pass_cnt++;
continue;
}
- err_cnt++;
- continue;
+
+ return err;
}
pr_cont("jited:%u ", fp->jited);