linux/samples
Lorenzo Bianconi 0608288c6c samples/bpf: xdp_redirect_cpu: Set MAX_CPUS according to NR_CPUS
[ Upstream commit 6a09815428 ]

xdp_redirect_cpu is currently failing in bpf_prog_load_xattr()
allocating cpu_map map if CONFIG_NR_CPUS is less than 64 since
cpu_map_alloc() requires max_entries to be less than NR_CPUS.
Set cpu_map max_entries according to NR_CPUS in xdp_redirect_cpu_kern.c
and get currently running cpus in xdp_redirect_cpu_user.c

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/374472755001c260158c4e4b22f193bdd3c56fb7.1589300442.git.lorenzo@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-30 15:36:55 -04:00
..
auxdisplay
binderfs
bpf samples/bpf: xdp_redirect_cpu: Set MAX_CPUS according to NR_CPUS 2020-06-30 15:36:55 -04:00
configfs
connector
hidraw
hw_breakpoint
kdb
kfifo
kobject
kprobes
livepatch
mei
mic/mpssd
pidfd
pktgen
qmi
rpmsg
seccomp
timers
trace_events
trace_printk
uhid
v4l
vfio-mdev vmalloc: fix remap_vmalloc_range() bounds checks 2020-04-29 16:33:14 +02:00
vfs
watchdog
Kconfig
Makefile