[CRIU] Checkpoint/Restore of BPF Map Data
Anton Protopopov
aspsk2 at gmail.com
Mon Jun 22 20:15:45 MSK 2020
пн, 22 июн. 2020 г. в 13:01, Abhishek Vijeev <abhishek.vijeev at gmail.com>:
>
> + CRIU Mailing List
>
>
> On Mon, Jun 22, 2020 at 10:29 PM Abhishek Vijeev
> <abhishek.vijeev at gmail.com> 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).
More information about the CRIU
mailing list