Skip to content

Commit

Permalink
Fix BPF_PERCPU_ARRAY description (iovisor#2527)
Browse files Browse the repository at this point in the history
Fixed the BPF_PERCPU_ARRAY description in reference_guide.md to include information about maximum element size. This is in regards to iovisor#2519 .
  • Loading branch information
willfindlay authored and yonghong-song committed Sep 24, 2019
1 parent f8c5654 commit 867c3e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/reference_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,9 @@ Syntax: ```BPF_PERCPU_ARRAY(name [, leaf_type [, size]])```

Creates NUM_CPU int-indexed arrays which are optimized for fastest lookup and update, named ```name```, with optional parameters. Each CPU will have a separate copy of this array. The copies are not kept synchronized in any way.

Note that due to limits defined in the kernel (in linux/mm/percpu.c), the ```leaf_type``` cannot have a size of more than 32KB.
In other words, ```BPF_PERCPU_ARRAY``` elements cannot be larger than 32KB in size.


Defaults: ```BPF_PERCPU_ARRAY(name, leaf_type=u64, size=10240)```

Expand Down

0 comments on commit 867c3e3

Please sign in to comment.