diff options
| -rw-r--r-- | recipes-kernel/linux/files/0001-selftest-bpf-Use-CHECK-macro-instead-of-RET_IF.patch | 46 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-raspberrypi_4.19.bb | 4 |
2 files changed, 49 insertions, 1 deletions
diff --git a/recipes-kernel/linux/files/0001-selftest-bpf-Use-CHECK-macro-instead-of-RET_IF.patch b/recipes-kernel/linux/files/0001-selftest-bpf-Use-CHECK-macro-instead-of-RET_IF.patch new file mode 100644 index 0000000..7d96514 --- /dev/null +++ b/recipes-kernel/linux/files/0001-selftest-bpf-Use-CHECK-macro-instead-of-RET_IF.patch | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | From 552084d4da41833a97d19d12f5ee5c3ba02e400a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 14 Mar 2020 07:31:34 -0700 | ||
| 4 | Subject: [PATCH V2] selftest/bpf: Use CHECK macro instead of RET_IF | ||
| 5 | |||
| 6 | backporting 634efb750435d0a489dc58477d4fcb88b2692942 causes build | ||
| 7 | failures because RET_IF is defined in 7ee0d4e97b889c0478af9c1a6e5af658b181423f | ||
| 8 | but that is not backported | ||
| 9 | |||
| 10 | Upstream-Status: Submitted | ||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | Cc: Jakub Sitnicki <jakub@cloudflare.com> | ||
| 13 | Cc: Alexei Starovoitov <ast@kernel.org> | ||
| 14 | --- | ||
| 15 | v2: Add return on check to get complete logic of RET_IF | ||
| 16 | |||
| 17 | tools/testing/selftests/bpf/test_select_reuseport.c | 10 ++++++---- | ||
| 18 | 1 file changed, 6 insertions(+), 4 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/tools/testing/selftests/bpf/test_select_reuseport.c b/tools/testing/selftests/bpf/test_select_reuseport.c | ||
| 21 | index cdbbdab2725f..093ef8547abb 100644 | ||
| 22 | --- a/tools/testing/selftests/bpf/test_select_reuseport.c | ||
| 23 | +++ b/tools/testing/selftests/bpf/test_select_reuseport.c | ||
| 24 | @@ -616,13 +616,15 @@ static void cleanup_per_test(void) | ||
| 25 | |||
| 26 | for (i = 0; i < NR_RESULTS; i++) { | ||
| 27 | err = bpf_map_update_elem(result_map, &i, &zero, BPF_ANY); | ||
| 28 | - RET_IF(err, "reset elem in result_map", | ||
| 29 | - "i:%u err:%d errno:%d\n", i, err, errno); | ||
| 30 | + if (CHECK(err, "reset elem in result_map", | ||
| 31 | + "i:%u err:%d errno:%d\n", i, err, errno)) | ||
| 32 | + return; | ||
| 33 | } | ||
| 34 | |||
| 35 | err = bpf_map_update_elem(linum_map, &zero, &zero, BPF_ANY); | ||
| 36 | - RET_IF(err, "reset line number in linum_map", "err:%d errno:%d\n", | ||
| 37 | - err, errno); | ||
| 38 | + if (CHECK(err, "reset line number in linum_map", "err:%d errno:%d\n", | ||
| 39 | + err, errno)) | ||
| 40 | + return; | ||
| 41 | |||
| 42 | for (i = 0; i < REUSEPORT_ARRAY_SIZE; i++) | ||
| 43 | close(sk_fds[i]); | ||
| 44 | -- | ||
| 45 | 2.25.1 | ||
| 46 | |||
diff --git a/recipes-kernel/linux/linux-raspberrypi_4.19.bb b/recipes-kernel/linux/linux-raspberrypi_4.19.bb index a17df84..4b1098c 100644 --- a/recipes-kernel/linux/linux-raspberrypi_4.19.bb +++ b/recipes-kernel/linux/linux-raspberrypi_4.19.bb | |||
| @@ -5,4 +5,6 @@ SRCREV = "2fab54c74bf956951e61c6d4fe473995e8d07010" | |||
| 5 | 5 | ||
| 6 | require linux-raspberrypi_4.19.inc | 6 | require linux-raspberrypi_4.19.inc |
| 7 | 7 | ||
| 8 | SRC_URI += "file://0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch" | 8 | SRC_URI += "file://0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch \ |
| 9 | file://0001-selftest-bpf-Use-CHECK-macro-instead-of-RET_IF.patch \ | ||
| 10 | " | ||
