Skip to content

Can a tc prog understand and load the BTF section? #721

Answered by florianl
RenjiaWang asked this question in Q&A
Discussion options

You must be logged in to vote

Without more detail is it hard to tell the differences in your BTF loader. As attaching to XDP, to a tracepoint and TC (traffic control) is independent of loading a eBPF program and optional its BTF, I think there is a different problem.

Taking a look at existing examples github.com/cilium/ebpf/examples/xdp for XDP or github.com/florianl/go-tc/example_gteq_1.16_test.go for TC the sequence of loading and attaching is following similar steps:

  1. Load eBPF program (optional with BTF)
    This is happening here for the XDP example and here for the TC example.
  2. Attach eBPF program
    This is happening here for the XDP example and here for the TC example.

So to speak, eBPF prgrams of type SchedCLS that …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RenjiaWang
Comment options

Answer selected by RenjiaWang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants