This is great, thank you Anton. Will check it out! On Mon, Jun 22, 2020 at 10:45 PM Anton Protopopov <aspsk2@xxxxxxxxx> wrote: > > пн, 22 июн. 2020 г. в 13:01, Abhishek Vijeev <abhishek.vijeev@xxxxxxxxx>: > > > > + CRIU Mailing List > > > > > > On Mon, Jun 22, 2020 at 10:29 PM Abhishek Vijeev > > <abhishek.vijeev@xxxxxxxxx> wrote: > > > > > > Hi, > > > > > > I've been working with the CRIU project to enable CRIU to checkpoint > > > and restore BPF map files. > > > (https://github.com/checkpoint-restore/criu/issues/777). > > > > > > A key component of the solution involves dumping the data contained in > > > BPF maps. However, I have > > > been unable to do this due to the following reason - as far as I'm > > > aware, Linux does not provide an > > > interface to directly retrieve the key-value pairs stored in a BPF map > > > without prior knowledge about > > > the nature of data stored in it. > > Try BPF_MAP_LOOKUP_BATCH, here is an example: > https://github.com/iovisor/bcc/blob/master/libbpf-tools/syscount.c#L193 > (the bpf_map_lookup_and_delete_batch is used there, but > bpf_map_lookup_batch case should be the same).