Document eBPF program and map types
Summary
Explain the various eBPF program and map types, explain their usage in easily accessible documentation with sample code so that one does not really need to check out the kernel to develop BPF programs.
https://www.gwuah.com/post/intro-to-ebpf/ might be a good starting point
Motivation
This will make it easier for more people to get started with eBPF
Rationale and Alternatives
N/A
Unresolved Questions
What are all of the things we need/want to document. Scoping
I'll put in one vote for improving the upstream Linux tree documentation which generates this page: https://docs.kernel.org/bpf/index.html?highlight=bpf (released versions) / https://www.kernel.org/doc/html/next/bpf/index.html (-next tree).
In general, the upstream Linux tree is where program and map types are defined so I think that developing the documentation there will help to keep the documentation up-to-date with the latest map and program types. This should ideally be in a "reference" form.
I had embarked on a similar effort a couple of years back around the eBPF syscall API, and I think that we could generate documentation from the kernel tree for other symbols in the Linux API in a similar manner.
Beyond that, I think that it would be reasonable to expand upon the reference guide with sample code or tutorials, which may be better presented in other ways such as blogs or as pages on the ebpf.io website.
Yes, sorry if it wasn't clear from my original issue. My idea wasn't to replace the upstream documentation, it was more provide it in other formats that could make it more accessible to different types of people interested in eBPF. I would love to be able to rely upon the upstream docs as much as possible for it.
For example, if you look at the linked blog post above, it gives some of the 201 type definitions to terms that are common in eBPF. It would also be great to expand that with code or tutorials like you said too :)
We had some discussion on this topic as well yesterday with the BSC, and in general I think we're aligned: For now, the implementation is primarily in the Linux kernel, so it makes sense for community members to extend & improve that documentation. Over time, as part of the cross-platform eBPF effort we will begin to standardize some of these APIs as well, and at that point it may make sense to also publish documents on the https://ebpf.foundation website.