graymon
graymon
If you're talking about dae -> upstream dns, it has nothing to do with netns: packets are originated from host.
Nevermind, it's a different netns with reference to your repro steps... just ignore my last comment.
@mzz2017 匹配 process name 我有一种更简单的做法: ```c struct task_struct *curr_task = (struct task_struct *) bpf_get_current_task(); if (!curr_task) return; bpf_printk("proc %s\n", BPF_CORE_READ(curr_task, comm)); ``` tc bpf 是可以调用 bpf_get_current_task() 的,这样可以直接通过 task->comm 读取进程名字。即,不需要 cgroup/*...
@mzz2017 目前 dae 是通过 `bpf_get_current_task()->mm->{arg_start,arg_end}` 获取进程名的,我们可以在 tc bpf 里用相同的方法吗: https://github.com/daeuniverse/dae/blob/a794c4ca61945a83732abac99b4b4ec276028882/control/kern/tproxy.c#L2163-L2165
@mzz2017 cilium 里用 bpf tailcall 切分大程序来控制复杂度,而且几乎没有性能损失(多了一个 jmp 指令),我们也可以考虑这么做。 这样做的好处是,似乎可以不用管理 cookie -> pid 这个 map,减少查询,代码逻辑复杂度可能也会好一些。
@jdjingdian XDP generic 也可以用 AF_XDP,in XDP_SKB mode. direct 流量不会被重定向到 XSK。
现在最新的 dae 支持 reload 开启 pprof: ``` global { # Set non-zero value to enable pprof. pprof_port: 0 } ``` 可以先检查 goroutine 是否有泄漏: 浏览器打开 http://localhost:$pprof_port/debug/pprof/goroutine?debug=2 然后检查堆对象: ` curl -s http://localhost:/debug/pprof/heap...
Yes very likely. And kernel is also required to be compiled with CONFIG_DEBUG_INFO_BTF.. My personal experience is ubuntu2204 handles everything needed...
/test-backport-1.13
/test-1.17-4.19