Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 669dc4d7 authored by Daniel Borkmann's avatar Daniel Borkmann Committed by David S. Miller
Browse files

bpf: use bpf_get_smp_processor_id_proto instead of raw one



Same motivation as in commit 80b48c44 ("bpf: don't use raw processor
id in generic helper"), but this time for XDP typed programs. Thus, allow
for preemption checks when we have DEBUG_PREEMPT enabled, and otherwise
use the raw variant.

Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2d48c5f9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2551,6 +2551,8 @@ xdp_func_proto(enum bpf_func_id func_id)
	switch (func_id) {
	case BPF_FUNC_perf_event_output:
		return &bpf_xdp_event_output_proto;
	case BPF_FUNC_get_smp_processor_id:
		return &bpf_get_smp_processor_id_proto;
	default:
		return sk_filter_func_proto(func_id);
	}