Commit fb22955
authored
Optimization with reducing copies and eliminating buffer grows (#77)
* Optimized build and disable kanal async
* adds packet store for optimized packet processing
* adapt packet_store for optimized packet processing
* Fix lint
* refactor: replace Mutex with RwLock for latest packet storage
* use THREAD_BUFFER in packet_store
* add branches as dependency
* fix ipv6 bug + adds unlikely branches
* use PacketStore directly inside egress and ingress for much better performance than any channel
* reuse string buffer instead of allocating new one each time
* adds reusable display buffer for packets
* optimize the packet_store even more (insomnia edition)
* fix fmt
* adds get and write_range_into optimized implementations
* add cacheguard dependency and refactor PacketStore to use CacheGuard for atomic operations to improve cpu cache hits
* optimize alert and synflood detection, add rustc-hash for FxHashmap
* optimize alert packet counting
* rollback link.rs change
* gracefully handle out-of-bounds access in packet_store methods
* add stack allocated ArrayVec optimization for packet_store
* fix: correct packet_index handling in Inspection::render
* clear alerts on next time frame
* strict range of write_range_into for packet display buffer to avoid over copy when data is being written at realtime1 parent 17a2577 commit fb22955
File tree
23 files changed
+758
-344
lines changed- oryx-ebpf
- src
- oryx-tui
- src
- ebpf
- filter
- packet
- section
- alert/threat
23 files changed
+758
-344
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
| 24 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
197 | | - | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| |||
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
230 | | - | |
| 231 | + | |
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
| |||
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
263 | | - | |
| 264 | + | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| |||
389 | 390 | | |
390 | 391 | | |
391 | 392 | | |
392 | | - | |
| 393 | + | |
393 | 394 | | |
394 | 395 | | |
395 | 396 | | |
| |||
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
404 | | - | |
| 405 | + | |
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 3 | + | |
8 | 4 | | |
9 | 5 | | |
10 | 6 | | |
11 | 7 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 8 | + | |
19 | 9 | | |
20 | 10 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 11 | + | |
| 12 | + | |
24 | 13 | | |
25 | | - | |
26 | | - | |
27 | 14 | | |
28 | 15 | | |
29 | 16 | | |
| |||
40 | 27 | | |
41 | 28 | | |
42 | 29 | | |
43 | | - | |
44 | 30 | | |
45 | 31 | | |
46 | 32 | | |
| |||
50 | 36 | | |
51 | 37 | | |
52 | 38 | | |
53 | | - | |
| 39 | + | |
54 | 40 | | |
55 | 41 | | |
56 | | - | |
57 | 42 | | |
58 | 43 | | |
59 | 44 | | |
60 | 45 | | |
61 | 46 | | |
62 | 47 | | |
63 | 48 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 49 | + | |
69 | 50 | | |
70 | 51 | | |
71 | 52 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 53 | | |
94 | 54 | | |
95 | 55 | | |
| |||
193 | 153 | | |
194 | 154 | | |
195 | 155 | | |
196 | | - | |
197 | 156 | | |
198 | 157 | | |
199 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
103 | | - | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
0 commit comments