libbpf-rs icon indicating copy to clipboard operation
libbpf-rs copied to clipboard

Missing support for BPF_PROG_RUN

Open danobi opened this issue 2 years ago • 3 comments

BPF_PROG_RUN is quite useful for "unit testing" (integration testing if you're being pedantic). It looks like Program is missing support for it.

danobi avatar Jul 31 '23 22:07 danobi

Makes sense to me. Please feel free to open a pull request if you have something working.

danielocfb avatar Aug 01 '23 16:08 danielocfb

Each prog type has a different context. I'm wondering if we should provide definitions for all of them or just take a T: Sized. When I did this for cilium/ebpf we did the interface{} approach, as ctx definitions get quite hairy.

I suppose we could start with a T: Sized approach and also provide a few defs. That way we have some baked in forward compat.

WDYT?

danobi avatar Aug 02 '23 14:08 danobi

I suppose we could start with a T: Sized approach and also provide a few defs. That way we have some baked in forward compat.

That sounds good to me.

danielocfb avatar Aug 02 '23 17:08 danielocfb