summaryrefslogtreecommitdiffstats
path: root/kernel/bpf
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2020-07-14 15:56:34 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2020-07-16 17:00:31 +0200
commit9b74ebb2b0f259474da65fa0178c657e5fa5c640 (patch)
tree7b9bb6908c13b0ab5e7eee616cff9c2762db5c78 /kernel/bpf
parentnet: ipv6: drop duplicate word in comment (diff)
downloadlinux-9b74ebb2b0f259474da65fa0178c657e5fa5c640.tar.xz
linux-9b74ebb2b0f259474da65fa0178c657e5fa5c640.zip
cpumap: Use non-locked version __ptr_ring_consume_batched
Commit 77361825bb01 ("bpf: cpumap use ptr_ring_consume_batched") changed away from using single frame ptr_ring dequeue (__ptr_ring_consume) to consume a batched, but it uses a locked version, which as the comment explain isn't needed. Change to use the non-locked version __ptr_ring_consume_batched. Fixes: 77361825bb01 ("bpf: cpumap use ptr_ring_consume_batched") Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/a9c7d06f9a009e282209f0c8c7b2c5d9b9ad60b9.1594734381.git.lorenzo@kernel.org
Diffstat (limited to 'kernel/bpf')
-rw-r--r--kernel/bpf/cpumap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c
index bd8658055c16..323c91c4fab0 100644
--- a/kernel/bpf/cpumap.c
+++ b/kernel/bpf/cpumap.c
@@ -259,7 +259,7 @@ static int cpu_map_kthread_run(void *data)
* kthread CPU pinned. Lockless access to ptr_ring
* consume side valid as no-resize allowed of queue.
*/
- n = ptr_ring_consume_batched(rcpu->queue, frames, CPUMAP_BATCH);
+ n = __ptr_ring_consume_batched(rcpu->queue, frames, CPUMAP_BATCH);
for (i = 0; i < n; i++) {
void *f = frames[i];