Skip to content

Conversation

@qlndzt
Copy link
Collaborator

@qlndzt qlndzt commented Dec 8, 2025

This PR is for:

Agent

<Feature description (with issue link if any)>

Checklist

  • Added unit test.

Backport to branches

@CLAassistant
Copy link

CLAassistant commented Dec 8, 2025

CLA assistant check
All committers have signed the CLA.

@qlndzt qlndzt force-pushed the feat/tcp_option_tracing branch from 688f5ff to c2f4480 Compare December 8, 2025 07:30
# 配置样例: `tx_hooks: [i40e_xmit_pkts, virtio_xmit_pkts_packed, virtio_xmit_pkts]`
# upgrade_from:
tx_hooks: []
# type: section
Copy link
Member

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: ...

Copy link
Collaborator Author

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 时,注入的元数据可能缺失或过期。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

相关文件以及前面的定义都在企业版中?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对的,不过这里可能不需要说明具体的路径?准备删掉这里路径文件名

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

定义在企业版中的话,那就需要把相关配置参数定义到extend-features中?不然开源版编译会有问题,有没有编译验证过?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github的编译测试应该不含企业版部分?看上去编译通过了
本地目前企业和开源部分放在一起,还没有单独测试

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我说的是下图中添加的这部分,能确定开源版本单独编译没问题?
image

# injected metadata can be missing or stale.
# ch: |-
# 是否开启 TCP Option Tracing SockOps 程序,用于在满足条件的 TCP 连接上注入 DeepFlow 元数据(如进程 PID)。
# 注意:该功能依赖 cgroup v2(统一层级)。在 cgroup v1 主机上 SockOps 绑定会失败.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里要说明内核版本要求,注意区分下 arm和x86 框架下的不同要求

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前arm只在高内核版本测试,之前的arm v2升级比较费劲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants