Re: eBPF map - Control and Data plane concurrency #bcc

Andrii Nakryiko

On Tue, May 12, 2020 at 2:19 AM <simonemagnani.96@...> wrote:

Thanks for the suggestion, now I feel more confident about this solution.

However, I have still problems with the map-in-map type: is it possible to use a map which has as key the 4 tcp-session identifier {srcIp, dstIp, srcPort, dstPort} and as value a BPF_ARRAY which is a list of some packets' headers belonging to that session?
As far as I undestood, a BPF_HASH_OF_MAPS key is coded as integer, and the value retrieved with lookup is the inner table fileDescriptor. Although, how do you initialize those inner arrays? I've tried to insert something, but what should I put as value? The inner map's fileDescriptor (how do I know it)?
No, HASH_OF_MAPS allows arbitrary-sized keys, just like normal
HASHMAP. Libbpf recently got a support for nicer map-in-map
declaration and initialization, you might want to check it out: [0].


Join to automatically receive all group messages.