commit | 7d7af8b3d8c6b89bd9c5be11b3566c4e1c1c399e | [log] [tgz] |
---|---|---|
author | Maciej Żenczykowski <maze@google.com> | Thu Jan 21 04:43:34 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Jan 21 04:43:34 2021 +0000 |
tree | f4c7a19ce1284bb01a50c4d3ca7379f224819b8d | |
parent | a973c0badf958e1b09663073db38b0b130338540 [diff] | |
parent | a36bed395f014aa69f08ae6dadb6f9684e448275 [diff] |
add SKIP_IF_XDP_NOT_SUPPORTED macro am: a36bed395f Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1555041 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I6031e2218630aea6143b5eb2d922d7f6e92a2dd7
diff --git a/libbpf_android/include/bpf/BpfUtils.h b/libbpf_android/include/bpf/BpfUtils.h index bb097bf..e67f664 100644 --- a/libbpf_android/include/bpf/BpfUtils.h +++ b/libbpf_android/include/bpf/BpfUtils.h
@@ -57,6 +57,15 @@ } \ } while (0) +#define SKIP_IF_XDP_NOT_SUPPORTED \ + do { \ + if (!android::bpf::isAtLeastKernelVersion(5, 9, 0)) { \ + GTEST_LOG_(INFO) << "This test is skipped since xdp" \ + << "not supported\n"; \ + return; \ + } \ + } while (0) + } // namespace bpf } // namespace android