bpfloader - minor fixups asked for by reviewer
As requested by Bernie on previous commit. Bug: 190519702 Test: atest, TreeHugger - existing bpf programs load examination of bpfloader logs Signed-off-by: Maciej Żenczykowski <maze@google.com> Original-Change: https://android-review.googlesource.com/1754722 Merged-In: I4f5181f371d31dcf52768217ffd2b1b5b772103d Change-Id: I4f5181f371d31dcf52768217ffd2b1b5b772103d
This commit is contained in:
parent
355b8df7f5
commit
d521e47d30
2 changed files with 4 additions and 4 deletions
|
@ -514,14 +514,14 @@ static int createMaps(const char* elfPath, ifstream& elfFile, vector<unique_fd>&
|
|||
if (BPFLOADER_VERSION < md[i].bpfloader_min_ver) {
|
||||
ALOGI("skipping map %s which requires bpfloader min ver 0x%05x\n", mapNames[i].c_str(),
|
||||
md[i].bpfloader_min_ver);
|
||||
mapFds.push_back(std::move(fd)); // -1
|
||||
mapFds.push_back(unique_fd());
|
||||
continue;
|
||||
}
|
||||
|
||||
if (BPFLOADER_VERSION >= md[i].bpfloader_max_ver) {
|
||||
ALOGI("skipping map %s which requires bpfloader max ver 0x%05x\n", mapNames[i].c_str(),
|
||||
md[i].bpfloader_max_ver);
|
||||
mapFds.push_back(std::move(fd)); // -1
|
||||
mapFds.push_back(unique_fd());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
#endif
|
||||
|
||||
// These are the values used if these fields are missing
|
||||
#define DEFAULT_BPFLOADER_MIN_VER 0u // v0.0
|
||||
#define DEFAULT_BPFLOADER_MAX_VER 0x10000u // v1.0
|
||||
#define DEFAULT_BPFLOADER_MIN_VER 0u // v0.0 (this is inclusive ie. >= v0.0)
|
||||
#define DEFAULT_BPFLOADER_MAX_VER 0x10000u // v1.0 (this is exclusive ie. < v1.0)
|
||||
#define DEFAULT_SIZEOF_BPF_MAP_DEF 32 // v0.0 struct: enum + alignment padding + 7 uint
|
||||
#define DEFAULT_SIZEOF_BPF_PROG_DEF 20 // v0.0 struct: 4 uint + bool + alignment padding
|
||||
|
||||
|
|
Loading…
Reference in a new issue