Skip to content

Commit fe5b53d

Browse files
authored
Add User ring post (eunomia-bpf#93)
* update * update ci * update link to eunomia.dev * Update documents
1 parent deee286 commit fe5b53d

File tree

40 files changed

+541
-20
lines changed

40 files changed

+541
-20
lines changed

.github/workflows/test-libbpf.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ jobs:
6161
run: |
6262
make -C src/30-sslsniff
6363
sudo timeout -s 2 3 src/30-sslsniff/sslsniff || if [ $? = 124 ]; then exit 0; else exit $?; fi
64+
- name: test 35-user-ringbuf
65+
run: |
66+
make -C src/35-user-ringbuf
67+
sudo timeout -s 2 3 src/35-user-ringbuf/user_ringbuf || if [ $? = 124 ]; then exit 0; else exit $?; fi

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ Android:
7979
- [使用 eBPF 替换任意程序读取或写入的文本](src/27-replace/README.md)
8080
- [BPF 的生命周期:使用 Detached 模式在用户态应用退出后持续运行 eBPF 程序](src/28-detach/README.md)
8181
- [eBPF 运行时的安全性与面临的挑战](src/18-further-reading/ebpf-security.zh.md)
82-
- [用户空间 eBPF 运行时:深度解析与应用实践](src\36-userspace-ebpf\README.md)
82+
83+
其他高级特性:
84+
85+
- [eBPF开发实践:使用 user ring buffer 向内核异步发送信息](src/35-user-ringbuf/README.md)
86+
- [用户空间 eBPF 运行时:深度解析与应用实践](src/36-userspace-ebpf/README.md)
8387

8488
持续更新中...
8589

README_en.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ Security:
6767
- [Adding sudo users using eBPF](src/26-sudo/README_en.md)
6868
- [Replacing text read or written by any program using eBPF](src/27-replace/README_en.md)
6969
- [BPF lifecycle: Running eBPF programs continuously in Detached mode after user-mode applications exit](src/28-detach/README_en.md)
70-
- [Userspace eBPF Runtimes: Overview and Applications](src\36-userspace-ebpf\README_en.md)
70+
71+
Other:
72+
73+
- [Using user ring buffer to send information to the kernel](src/35-user-ringbuf/README.md)
74+
- [Userspace eBPF Runtimes: Overview and Applications](src/36-userspace-ebpf/README.md)
7175

7276
Continuously updating...
7377

src/0-introduce/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,5 @@ eunomia-bpf 由一个编译工具链和一个运行时库组成, 对比传统的
168168
- eunomia-bpf:<https://github.com/eunomia-bpf/eunomia-bpf>
169169

170170
您还可以访问我们的教程代码仓库 <https://github.com/eunomia-bpf/bpf-developer-tutorial> 或网站 <https://eunomia.dev/zh/tutorials/> 以获取更多示例和完整的教程源代码。我们会继续分享更多有关 eBPF 开发实践的内容,帮助您更好地理解和掌握 eBPF 技术。
171+
172+
> 原文地址:<https://eunomia.dev/zh/tutorials/0-introduce/> 转载请注明

src/1-helloworld/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,5 @@ eBPF 程序的开发和使用流程可以概括为如下几个步骤:
191191
需要注意的是,BPF 程序的执行是在内核空间进行的,因此需要使用特殊的工具和技术来编写、编译和调试 BPF 程序。eunomia-bpf 是一个开源的 BPF 编译器和工具包,它可以帮助开发者快速和简单地编写和运行 BPF 程序。
192192

193193
您还可以访问我们的教程代码仓库 <https://github.com/eunomia-bpf/bpf-developer-tutorial> 以获取更多示例和完整的教程,全部内容均已开源。我们会继续分享更多有关 eBPF 开发实践的内容,帮助您更好地理解和掌握 eBPF 技术。
194+
195+
> 原文地址:<https://eunomia.dev/zh/tutorials/1-helloworld/> 转载请注明出处。

src/10-hardirqs/README_en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,5 @@ In this chapter (eBPF Tutorial by Example Ten: Capturing Interrupt Events in eBP
258258
By studying the content of this chapter, you should have mastered the methods of capturing interrupt events with hardirqs or softirqs in eBPF, as well as how to analyze these events to identify performance issues and other problems related to interrupt handling in the kernel. These skills are crucial for analyzing and optimizing the performance of the Linux kernel.
259259

260260
To better understand and practice eBPF programming, we recommend reading the official documentation of eunomia-bpf: <https://github.com/eunomia-bpf/eunomia-bpf>. In addition, we provide a complete tutorial and source code for you to view and learn from at <https://github.com/eunomia-bpf/bpf-developer-tutorial>.
261+
262+
> The original link of this article: <https://eunomia.dev/tutorials/10-hardirqs/>

src/11-bootstrap/README_en.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,4 +628,6 @@ If you would like to learn more about eBPF knowledge and practices, please refer
628628
## Reference
629629

630630
- [Building BPF applications with libbpf-bootstrap](https://nakryiko.com/posts/libbpf-bootstrap/)
631-
- <https://github.com/libbpf/libbpf-bootstrap>
631+
- <https://github.com/libbpf/libbpf-bootstrap>
632+
633+
> The original link of this article: <https://eunomia.dev/tutorials/11-bootstrap>

src/12-profile/README_en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,3 +330,5 @@ Through this introductory tutorial on eBPF, we have learned how to use eBPF prog
330330
If you want to learn more about eBPF knowledge and practices, please refer to the official documentation of eunomia-bpf: <https://github.com/eunomia-bpf/eunomia-bpf>. You can also visit our tutorial code repository <https://github.com/eunomia-bpf/bpf-developer-tutorial> or website <https://eunomia.dev/tutorials/> for more examples and complete tutorials.
331331
332332
The next tutorial will further explore advanced features of eBPF. We will continue to share more content about eBPF development practices to help you better understand and master eBPF technology. We hope these contents will be helpful for your learning and practice on the eBPF development journey.
333+
334+
> The original link of this article: <https://eunomia.dev/tutorials/12-profile>

src/13-tcpconnlat/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ PID COMM IP SADDR DADDR DPORT LAT(ms)
582582
222774 ssh 4 192.168.88.15 1.15.149.151 22 25.31
583583
```
584584

585-
源代码:<https://github.com/eunomia-bpf/bpf-developer-tutorial/tree/main/src/13-tcpconnlat>
585+
源代码:<https://github.com/eunomia-bpf/bpf-developer-tutorial/tree/main/src/13-tcpconnlat> 关于如何安装依赖,请参考:<https://eunomia.dev/tutorials/11-bootstrap/>
586586

587587
参考资料:
588588

src/13-tcpconnlat/README_en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,3 +567,5 @@ In user-space, we introduced the usage of libbpf library APIs, such as perf_buff
567567
If you are interested in learning more about eBPF and its practical applications, please refer to the official documentation of eunomia-bpf: [https://github.com/eunomia-bpf/eunomia-bpf](https://github.com/eunomia-bpf/eunomia-bpf). You can also visit our tutorial code repository at [https://github.com/eunomia-bpf/bpf-developer-tutorial](https://github.com/eunomia-bpf/bpf-developer-tutorial) for more examples and complete tutorials.
568568

569569
In the upcoming tutorials, we will dive deeper into advanced features of eBPF, such as tracing the path of network packets and fine-grained system performance monitoring. We will continue to share more content on eBPF development practices to help you better understand and master eBPF technology. We hope these resources will be valuable in your learning and practical journey with eBPF.
570+
571+
> The original link of this article: <https://eunomia.dev/tutorials/13-tcpconnect>

0 commit comments

Comments
 (0)