Skip to content

Commit 9b74ebb

Browse files
netoptimizerborkmann
authored andcommitted
cpumap: Use non-locked version __ptr_ring_consume_batched
Commit 7736182 ("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: 7736182 ("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
1 parent 59632b2 commit 9b74ebb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/bpf/cpumap.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static int cpu_map_kthread_run(void *data)
259259
* kthread CPU pinned. Lockless access to ptr_ring
260260
* consume side valid as no-resize allowed of queue.
261261
*/
262-
n = ptr_ring_consume_batched(rcpu->queue, frames, CPUMAP_BATCH);
262+
n = __ptr_ring_consume_batched(rcpu->queue, frames, CPUMAP_BATCH);
263263

264264
for (i = 0; i < n; i++) {
265265
void *f = frames[i];

0 commit comments

Comments
 (0)