]> git.baikalelectronics.ru Git - kernel.git/commit
bpftool: fix percpu maps updating
authorPaolo Abeni <pabeni@redhat.com>
Mon, 21 Jan 2019 11:36:12 +0000 (12:36 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 23 Jan 2019 08:56:20 +0000 (09:56 +0100)
commite4142dcf7d3839e095ff0a92bdc866249c0eb5d3
treecbd286bce867ca0512e1e78f732f9c4040892229
parent716ffc499411b7d591949990ceb6e01a5e0d6ef9
bpftool: fix percpu maps updating

When updating a percpu map, bpftool currently copies the provided
value only into the first per CPU copy of the specified value,
all others instances are left zeroed.

This change explicitly copies the user-provided bytes to all the
per CPU instances, keeping the sub-command syntax unchanged.

v2 -> v3:
 - drop unused argument, as per Quentin's suggestion
v1 -> v2:
 - rename the helper as per Quentin's suggestion

Fixes: 9ffb478b4d49 ("tools: bpf: add bpftool")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/map.c