Comments (1)
I'm adding some more details, I think this is somehow interesting:
I finally solved the issue, this is my final analysis with the fix that makes the code working just fine:
The problem was inside the key itself. It is a struct with char[] fields.
In fact the BPF_MAP_TYPE_HASH consider as unique key the whole char[] content, INCLUDING the part following the '\0' termination charcter (and this is just obvious, my fault).
On the other hand, the user-space program reads keys as String, so the meaningful part of the key is just the one before the '\0' character.
I use PER_CPU_ARRAY to store keys (to overcome the 512 bytes limit). So the actual memory area is initialized to 0, but it gets dirty after the first usage.
This causes that multiple keys with the same meaningful part of the string gives a clash of keys.
e.g.
key1[] {'f', 'o', 'o', '\0', 'Q', 'z', '3' .....}
key2[] {'f', 'o', 'o', '\0', 'F', '3', '?' .....}
The solution is initializing the whole char[] to all zeros all the time before updating the my_bpf_hash_map_counter
from bumblebee.
Related Issues (20)
- Change the default port for Prometheus endpoint (9091)
- update doc for joining Slack HOT 2
- How to run using Podman (rootless mode by default)? HOT 3
- Issue with tcpconnect.c Example: Error Creating Ring Buffer Map HOT 1
- `builder/build.sh`: Trivial fix
- have CLI print help message if invalid number of args passsed
- Bumblebee build fails HOT 2
- Add Container Signing to Bumblebee HOT 1
- CNCF TAG-Runtime Discussion/Presentation? HOT 7
- Add an option to output results as logs (preferably in a structured format like json) HOT 2
- Bumblebee Installation Issue HOT 9
- shopt not found when running install script HOT 1
- Few requests I heard from ossummit HOT 1
- Extend installation script to work for machines with ARM processor HOT 4
- Fail installation on ARM and document supported architecture
- bpf_map_delete_elem is not reflecting its action to userspace (and prometheus) HOT 7
- missing opensnoop image on github registry HOT 1
- Cannot run tcpconnlat example HOT 1
- Size of ipv6 in documentation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bumblebee.