-
Notifications
You must be signed in to change notification settings - Fork 411
feat: add TCP option tracing support #10960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
688f5ff to
c2f4480
Compare
server/agent_config/template.yaml
Outdated
| # 配置样例: `tx_hooks: [i40e_xmit_pkts, virtio_xmit_pkts_packed, virtio_xmit_pkts]` | ||
| # upgrade_from: | ||
| tx_hooks: [] | ||
| # type: section |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
放到 kprobe 后面吧:
ebpf:
uprobe: ...
kprobe: ...
sock_ops: ...
tcp_option_trace: ...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
放到ebpf.socket.sock_ops里krope后了
|
|
||
| 注意:该功能依赖 cgroup v2(统一层级)。在 cgroup v1 主机上 SockOps 绑定会失败。 | ||
|
|
||
| 限制:PID 跟踪依赖 `agent/src/ebpf/user/extended/bpf/tcp_option_tracing.bpf.c` 中的 per-CPU syscall map。当 CPU 拥堵或软中断在不同 CPU 上处理 TCP 时,注入的元数据可能缺失或过期。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
相关文件以及前面的定义都在企业版中?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
对的,不过这里可能不需要说明具体的路径?准备删掉这里路径文件名
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
定义在企业版中的话,那就需要把相关配置参数定义到extend-features中?不然开源版编译会有问题,有没有编译验证过?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
github的编译测试应该不含企业版部分?看上去编译通过了
本地目前企业和开源部分放在一起,还没有单独测试
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # injected metadata can be missing or stale. | ||
| # ch: |- | ||
| # 是否开启 TCP Option Tracing SockOps 程序,用于在满足条件的 TCP 连接上注入 DeepFlow 元数据(如进程 PID)。 | ||
| # 注意:该功能依赖 cgroup v2(统一层级)。在 cgroup v1 主机上 SockOps 绑定会失败. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里要说明内核版本要求,注意区分下 arm和x86 框架下的不同要求
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前arm只在高内核版本测试,之前的arm v2升级比较费劲

This PR is for:
Agent
<Feature description (with issue link if any)>
Checklist
Backport to branches