From 33f1f3f74c7efc325211699eca3162b60f0cae9d Mon Sep 17 00:00:00 2001 From: Chris Sabotta Date: Tue, 25 Oct 2022 23:31:10 +0000 Subject: [PATCH] Bug: b/255652639 Revert "remove SKIP_IF_EXTENDED_BPF_NOT_SUPPORTED" This reverts commit 319d8468ad90d33307ce764e7f6130587ce81419. Reason for revert: Build breakage, (First bad build: 9217822) Change-Id: I0db2bdb68006f9379bb149f7de9fa81ace501c3d --- staticlibs/native/bpf_headers/include/bpf/BpfUtils.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/staticlibs/native/bpf_headers/include/bpf/BpfUtils.h b/staticlibs/native/bpf_headers/include/bpf/BpfUtils.h index 1eb3aebb47..4429164ee5 100644 --- a/staticlibs/native/bpf_headers/include/bpf/BpfUtils.h +++ b/staticlibs/native/bpf_headers/include/bpf/BpfUtils.h @@ -127,6 +127,12 @@ static inline bool isAtLeastKernelVersion(unsigned major, unsigned minor, unsign GTEST_SKIP() << "Skip: bpf is not supported."; \ } while (0) +#define SKIP_IF_EXTENDED_BPF_NOT_SUPPORTED \ + do { \ + if (!android::bpf::isAtLeastKernelVersion(4, 14, 0)) \ + GTEST_SKIP() << "Skip: extended bpf feature not supported."; \ + } while (0) + #define SKIP_IF_XDP_NOT_SUPPORTED \ do { \ if (!android::bpf::isAtLeastKernelVersion(5, 9, 0)) \