This change implements the kernel side of the "type matches" support, just calling the previously added core logic in relo_core.c. Signed-off-by: Daniel Müller <deso@xxxxxxxxxx> --- kernel/bpf/btf.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 2e2066..8923b5 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -7442,6 +7442,15 @@ int bpf_core_types_are_compat(const struct btf *local_btf, __u32 local_id, MAX_TYPES_ARE_COMPAT_DEPTH); } +#define MAX_TYPES_MATCH_DEPTH 2 + +int bpf_core_types_match(const struct btf *local_btf, u32 local_id, + const struct btf *targ_btf, u32 targ_id) +{ + return __bpf_core_types_match(local_btf, local_id, targ_btf, targ_id, false, + MAX_TYPES_MATCH_DEPTH); +} + static bool bpf_core_is_flavor_sep(const char *s) { /* check X___Y name pattern, where X and Y are not underscores */ -- 2.30.2