Re: Question about BPF map type BPF_MAP_TYPE_PERCPU_HASH


Yonghong Song
 

On Thu, Jan 31, 2019 at 12:09 AM Raga lahari <ragalahari.potti@...> wrote:

Hi everyone,


I am using BPF_MAP_TYPE_HASH in BPF map definition and my program is working as expected.

I have read eBPF-map type BPF_MAP_TYPE_PERCPU_HASH allows for lock free uses of hash-tables in eBPF for high performance needs.

I am trying to modify BPF map type from BPF_MAP_TYPE_HASH to BPF_MAP_TYPE_PERCPU_HASH. But, when I run the program, I am getting issues in BPF map iteration (using bpf_map_get_next_key)


Can someone help me to know any points need to consider to use BPF_MAP_TYPE_PERCPU_HASH map type .
You can take a look at bcc/tests/cc/{test_array_table.cc,
test_hash_table.cc, test_bpf_table.cc}.
There are a few examples there testing percpu maps.




Thanks,

Ragalahari

Join iovisor-dev@lists.iovisor.org to automatically receive all group messages.