pwru icon indicating copy to clipboard operation
pwru copied to clipboard

Add XDP support

Open brb opened this issue 1 year ago • 14 comments

Details TBD.

brb avatar Aug 11 '23 09:08 brb

How about supporting tc-bpf together?

Asphaltt avatar Aug 11 '23 09:08 Asphaltt

Do you mean tracing each individual BPF program? If yes, we are planning to do it for Cilium in the nearest future.

brb avatar Aug 11 '23 09:08 brb

Do you mean tracing each individual BPF program?

Yes.

Recently, I discussed with @jschwinger233 that pwru traces XDP and tc-bpf. I was writing some code at that time.

But, currently, I'm busy fixing a kernel-bpf bug.🤔

Asphaltt avatar Aug 11 '23 10:08 Asphaltt

Martynas, this is the guy @Asphaltt who managed to trace bpf tailcalls using kernel module, as I mentioned this Tuesday. :grin:

jschwinger233 avatar Aug 11 '23 10:08 jschwinger233

Got it, small world :smile:

brb avatar Aug 11 '23 10:08 brb

Yeah, small world 😀

I'm afraid I can not help this issue for some time. I'm planning to do tailcalls tracing things after fixing the kernel-bpf bug.

Asphaltt avatar Aug 11 '23 11:08 Asphaltt

Hi @brb ,

I'm glad to tell you that I just finished the POC of tracing TC bpf programs.

But, it's based on PR #266 and the latest go-ebpf library.

Recently, I'm fixing a tailcall issue of kernel-bpf whose progress is really slow. Then, I'm on this support now.

Asphaltt avatar Oct 14 '23 14:10 Asphaltt

Hi @Asphaltt , thanks for the update!

I just finished the POC of tracing TC bpf programs

Great. I am curious what approach did you take (is it the same as Gray's one)?

brb avatar Oct 17 '23 09:10 brb

is it the same as Gray's one

No. I trace TC bpf programs by listing then filtering all bpf progs.

Would you like to upgrade go-ebpf to latest version?

Asphaltt avatar Oct 17 '23 09:10 Asphaltt

Would you like to upgrade go-ebpf to latest version?

Sure https://github.com/cilium/pwru/pull/269

brb avatar Oct 17 '23 09:10 brb

Hi, is somebody actively working on this issue? If not, I volunteer to help, as I'm interested on this feature as well.

But I may need some assistance on the approach. I have tried to do a similar kind of filtered tracing on XDP programs using fentry/fexit on some personal projects before with no success. The verifier kept rejecting my program for invalid memory access when I tried to access packet data.

mscastanho avatar Jan 24 '24 12:01 mscastanho

@mscastanho Hi, not sure whether @Asphaltt is working on it?

brb avatar Jan 29 '24 09:01 brb

Hi, @brb, I will work on it when my PRs get merged. It'll be nice to work on it without other on-going PRs.

Asphaltt avatar Jan 29 '24 13:01 Asphaltt

It'll be nice to work on it without other on-going PRs.

Sure, I just wanted to clarify whether @mscastanho can take this issue :sweat_smile:

brb avatar Jan 29 '24 13:01 brb