Skip to content

sameehj/ebpf-mcp-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✅ Good next steps — let’s:


📊 Analysis of the Current Results vs Project Needs

Your project goal (as I understood from earlier conversations) is:

To build a reliable, data-driven eBPF program compatibility matrix across multiple Linux kernels, identify which kernels are best suited for deployment, and detect potential verifier/feature incompatibilities for AI-assisted tooling.

🔍 What the data shows:

Kernel Success Rate Notes
4.18 ~23% Expected: very old, no BTF/CO-RE support
5.4 100% Great stability, first LTS with BTF/CO-RE
5.15 ~6.9% Known verifier regressions
6.1 100% Excellent: modern, LTS
6.8 100% Excellent: most recent

Meets Needs?

  • You can now clearly recommend kernels 5.4, 6.1, and 6.8 for best compatibility.
  • You can use the collected .json data as a knowledge base for AI agents to understand per-program issues and suggest fixes.
  • The analyzer’s ability to compile with correct kernel headers is crucial for realistic verification.

📝 README Update: Usage Instructions

Here’s a draft README.md snippet you can drop in or append:


eBPF-MCP Docs: Multi-Kernel Analyzer

This project collects, analyzes, and reports compatibility of eBPF programs across multiple Linux kernel versions. It helps identify which kernels provide the best support for modern eBPF features like BTF and CO-RE.


🚀 Quickstart

📦 Prerequisites

  • Python ≥3.8
  • Clang/LLVM (with BPF target)
  • bpftool
  • Git
  • A Linux host with /sys/fs/bpf mounted.

🔄 Collect kernel sources & programs

Run the collector to clone the kernels and extract programs:

python3 -m pipeline.multi_kernel

This will: ✅ Clone Linux sources (only if missing) ✅ Extract samples/bpf/*.c from each supported kernel ✅ Parse and save JSON metadata into data/kernel-<version>/programs/*.json


🧪 Run the Analyzer

Run the analyzer to evaluate program compatibility per kernel:

python3 -m analysis.enhanced_analyzer

This will: ✅ Read the programs/*.json ✅ Attempt recompilation using the matching kernel headers ✅ Check verifier logs and parse errors ✅ Produce:

  • Detailed per-program JSON results
  • data/detailed_compatibility_report.json
  • Summary & recommendations printed to console

📈 Output

  • data/kernel-<version>/programs/*.json: per-program metadata
  • data/detailed_compatibility_report.json: full report
  • data/compatibility_matrix.json: (optional) success matrix

💡 Recommendations

  • Deploy on kernels: 5.4, 6.1, or 6.8 (best compatibility)
  • Avoid 4.18 and 5.15 for CO-RE/BTF programs

🧹 Cleanup

To remove downloaded sources and data:

rm -rf sources/ data/

If you’d like I can also: ✅ Write a Makefile with make collect, make analyze, make clean ✅ Add a CLI wrapper script (bin/ebpf-mcp-analyze) ✅ Generate an HTML/CSV summary report for sharing

Just say the word! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages