Skip to content
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

咨询cp流量转发的数据处理逻辑 #185

Closed
KevinDu2023 opened this issue Sep 23, 2024 · 1 comment
Closed

咨询cp流量转发的数据处理逻辑 #185

KevinDu2023 opened this issue Sep 23, 2024 · 1 comment

Comments

@KevinDu2023
Copy link

KevinDu2023 commented Sep 23, 2024

CPM1.2.1
PA:cp-0.7.4.X86_64_CENTOS.RPM
cp部署模式:微探针模式,流量转发口跟业务通讯口为同一个网口,在该网口抓包发现:
请求(No.27731)与响应(No.27740)延迟6ms,但是转发出来的vxlan封装的请求(No.27743)与响应(No.27752)延迟小于1ms,由于间隔时间变的很短,导致发送到BPC后,请求(No.2011)和响应(No.2008)乱序了,两张图如下:

所以,理解下cp数据包转发逻辑是怎样的?是抓到包立即转发出去,还是抓包后会缓存一部分数据包再一起转发出去吗?才会导致转发出来的数据包的时间间隔变的很短。

@robbietu
Copy link
Contributor

robbietu commented Sep 24, 2024

CP是单线程,抓到数据包后立即封装然后立即调用socket发送。之后再去处理下一个包

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

No branches or pull requests

2 participants