Contributing Guide
Thank you for your interest in contributing to the eBPF Tutorial project!
How to Contribute
Reporting Issues
- Use GitHub Issues to report bugs or suggest features
- Please search existing issues before creating a new one
- Provide detailed reproduction steps for bugs
Submitting Code
Fork the repository
Clone your fork
bashgit clone https://github.com/YOUR_USERNAME/ebpf-tutorial.git cd ebpf-tutorialCreate a feature branch
bashgit checkout -b feature/your-feature-nameMake your changes
- Follow the existing code style
- Add tests if applicable
- Update documentation as needed
Commit your changes
bashgit commit -m "feat: add your feature description"Push and create a Pull Request
bashgit push origin feature/your-feature-name
Code Style
C Code
- Follow Linux kernel coding style
- Use Chinese comments for explanations
- Keep functions focused and concise
Makefile
- Use Tab for indentation
- Add comments for complex build rules
Documentation
- Write in both Chinese and English when possible
- Use clear, beginner-friendly language
- Include code examples with explanations
Commit Message Convention
We follow Conventional Commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesrefactor:- Code refactoringtest:- Adding testschore:- Build/config changes
Project Structure
ebpf-tutorial/
├── src/ # eBPF example source code
├── docs/ # VitePress documentation
│ ├── guide/ # English tutorials
│ └── zh/guide/ # Chinese tutorials
├── libbpf/ # libbpf submodule
├── bpftool/ # bpftool submodule
└── vmlinux/ # vmlinux headersBuilding
bash
# Build dependencies
make prebuild
# Build all examples
make all
# Build specific example
make <example_name>Questions?
Feel free to open an issue or start a discussion on GitHub.