Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tutorial: advanced BTF example#49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
netoptimizer wants to merge9 commits intomain
base:main
Choose a base branch
Loading
fromtutorial27-advanced-btf

Conversation

@netoptimizer
Copy link
Member

It didn't merge this branch with BTF examples as it failed...

It believe it now actually works, as it was a issue in libbpf that caused the BTF code to get rejected on load.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
When loading with libbpf I'm getting some BTF loading errors.Adding this doesn't solve the problem, but is looks likeI should add it anyhow.Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
This is still getting rejected when loading BTF.Last error is:  [12] Invalid kind:13Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
@netoptimizernetoptimizer self-assigned thisJun 5, 2019
@tohojo
Copy link
Member

tohojo commentedJun 6, 2019 via email

Jesper Dangaard Brouer <notifications@github.com> writes:
It didn't merge this branch with BTF examples as it failed... It believe it now actually works, as it was a issue in libbpf that caused the BTF code to get rejected on load. You can view, comment on, or merge this pull request online at:
So no issue on the kernel side? We are currently recommending people touse 4.20 or higher when running the tutorial...

@netoptimizer
Copy link
MemberAuthor

BTF in the kernel tree have moved away fromBPF_ANNOTATE_KV_PAIR define system (which is used in this PR branch)

In kernel v5.5 it will be placed in:tools/testing/selftests/bpf/bpf_legacy.h

We should instead have a tutorial that uses the new BTF method... but AFAIK it depends on LLVM version 9, which is not adopted by many distros ...yet.

@tohojo
Copy link
Member

Yeah, the lack of LLVM9 is a problem; we also want to use the new BTF syntax for map pinning. Should we just tell people to install it? :)

@anakryiko
Copy link

@tohojo, with LLVM9 you also won't need pahole for BTF generation, so that's a double win: you can get rid of a good chunk of sample Makefile ;)

@netoptimizer
Copy link
MemberAuthor

In lack of places to put this, let melink a really advanced example by@chaudron
https://lore.kernel.org/bpf/78D7857B-82E4-42BC-85E1-E3D7C97BF840@redhat.com/

We unfortunately have to wait for a LLVM release to use this in the tutorial...

@netoptimizer
Copy link
MemberAuthor

My plan is to drop this PR, and create a new one based on LLVM9 and use the new ELF-maps style as an example. I also want to detect the LLVM version, to give users a more clear expectations when compiling the example.

@tohojo
Copy link
Member

tohojo commentedDec 6, 2019 via email

Jesper Dangaard Brouer <notifications@github.com> writes:
My plan is to drop this PR, and create a new one based on LLVM9 and use the new ELF-maps style as an example. I also want to detect the LLVM version, to give users a more clear expectations when compiling the example.
SGTM

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@netoptimizernetoptimizer

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@netoptimizer@tohojo@anakryiko

[8]ページ先頭

©2009-2025 Movatter.jp