Update percpu array from userspace?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Conceptually, what would be the process behind updating a percpu map
from userspace? Looking up elements is fairly simple to digest. (For
example).

-------

int map_fd = bpf_create_map_name(
        BPF_MAP_TYPE_PERCPU_ARRAY,
        "map_name",
        sizeof(__u32),
        sizeof(__u32),
        10,
        0
);

int key = 4;
int values[nr_cpus];

bpf_map_lookup_elem(map_fd, &key, values);

-------

This gets the fifth element for each percpu array.

But how do you update the values in each percpu array from the
"values" array? If you can directly run bpf_map_update_elem() on the
file descriptor, does that mean that the updated value is automatically
replicated across all percpu arrays? What if you wanted to update a
specific percpu array?





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux