bpf - move to v0.1 .o struct formatting
We cannot submit this as long as we want current mainline releases bpf .o objects to be loaded by images with bpfloader v0.0. Bug: 190519702 Test: atest, TreeHugger - existing bpf programs load examination of bpfloader logs Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I157458a4f798e455fb563fad569e20bfde5248fd
This commit is contained in:
parent
a21256dcf1
commit
0bf9219e07
2 changed files with 6 additions and 2 deletions
|
|
@ -108,6 +108,8 @@ static int (*bpf_map_delete_elem_unsafe)(const struct bpf_map_def* map,
|
|||
.uid = (usr), \
|
||||
.gid = (grp), \
|
||||
.mode = (md), \
|
||||
.bpfloader_min_ver = DEFAULT_BPFLOADER_MIN_VER, \
|
||||
.bpfloader_max_ver = DEFAULT_BPFLOADER_MAX_VER, \
|
||||
}; \
|
||||
\
|
||||
static inline __always_inline __unused TypeOfValue* bpf_##the_map##_lookup_elem( \
|
||||
|
|
@ -157,6 +159,8 @@ static unsigned long long (*bpf_get_smp_processor_id)(void) = (void*) BPF_FUNC_g
|
|||
.min_kver = (min_kv), \
|
||||
.max_kver = (max_kv), \
|
||||
.optional = (opt), \
|
||||
.bpfloader_min_ver = DEFAULT_BPFLOADER_MIN_VER, \
|
||||
.bpfloader_max_ver = DEFAULT_BPFLOADER_MAX_VER, \
|
||||
}; \
|
||||
SEC(SECTION_NAME) \
|
||||
int the_prog
|
||||
|
|
|
|||
|
|
@ -42,9 +42,9 @@
|
|||
* *
|
||||
******************************************************************************/
|
||||
|
||||
// For now we default to v0.0 format
|
||||
// We currently default to v0.1 format
|
||||
#ifndef BPFLOADER_VERSION
|
||||
#define BPFLOADER_VERSION 0u
|
||||
#define BPFLOADER_VERSION 1u
|
||||
#endif
|
||||
|
||||
// These are the values used if these fields are missing
|
||||
|
|
|
|||
Loading…
Reference in a new issue