deepflowio / deepflow

:sparkles: Zero-code distributed tracing and profiling, observability via eBPF :rocket:
https://deepflow.io
Apache License 2.0
2.54k stars 281 forks source link

[QA] The algorithm principles of fastpath in the agent #6248

Open john1127 opened 2 months ago

john1127 commented 2 months ago

最近在看deepflow源码,对于fastpath索引ACL的算法不太理解,是否有相关的说明文档呢? 主要如何生成查询表以及如何利用查询表查询,涉及的数据结构vector和MatchFiled各表示什么意思呢?

john1127 commented 2 months ago

补充: 我理解的是ACL MatchField集合就是ACL src_ips, dst_ips, src_ports, dst_ports的排列组合, 每个MatchField是18字节(144 bits);

  1. Vector是对平台所有acl MatchField取掩码,那Vector是不是最多需要144bits即可?generateDdbsTable中level的作用是什么?
  2. generateSortTable函数意义何在?
sharang commented 1 month ago

D2BS-BaohuaYang.pdf

We used the algorithm from this paper for reference.