-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NETOBSERV-1995: Use global map, spinlock, split maps (#469)
* NETOBSERV-1987: split maps Split BPF maps to avoid having one huge map for flows. This should move us farther from the "stack size limit" that potentially shows up when adding new features. This is also a pre-req for later being able to move away from per-cpu maps, which is wasting memory by duplicating flows across CPUs Also: - remove MAC and eth_protocol from map key (they're moved to flow metrics ie. map values) - in every hook, we don't try anymore to create the flow it it didn't exist. We assume it should exist. Note that, previously, we were adding bytes/packet counters from hooks, which doesn't seem correct as counting bytes/packets is the role of the TC hook only - else it can lead to overcounts - remove code that sets MIN_RTT on TCP flows (not sure why we had that) - small refactoring of the "Accumulate" functions to adapt to new model Use global map & spinlock regen .o Remove packing attributes Packed attributes make linter unhappy with the spin-lock Also, turns out it improves quite a lot the performances to remove that: my tests show another 20% gain Remove low value test for binary read TestRecordBinaryEncoding only tests ReadFrom which... basically is a simple call to binary.Read. So we basically testing the encoding/binary standard lib. Avoid unnecessary indirections & copies of MAC Move DNS to secondary map, revert types.h reorg Fix DNS issue - retry in case of concurrent write Also add an error counter for DNS map updates * Address review comments (renamings) * Make BpfFlowMetrics a pointer in records * Reinsert binary encoding test * Remove unnecessary checks Checking for zero-values made sense only with per-cpu maps * update architecture doc * kernel space mermaid arch * Update architecture.md
- Loading branch information
Showing
44 changed files
with
1,409 additions
and
972 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.