Commit ab1973d3 authored by Alexei Starovoitov's avatar Alexei Starovoitov Committed by David S. Miller

bpf: let kprobe programs use bpf_get_smp_processor_id() helper

It's useful to do per-cpu histograms.
Suggested-by: default avatarDaniel Wagner <daniel.wagner@bmw-carit.de>
Signed-off-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0756ea3e
......@@ -181,6 +181,8 @@ static const struct bpf_func_proto *kprobe_prog_func_proto(enum bpf_func_id func
return &bpf_get_current_comm_proto;
case BPF_FUNC_trace_printk:
return bpf_get_trace_printk_proto();
case BPF_FUNC_get_smp_processor_id:
return &bpf_get_smp_processor_id_proto;
default:
return NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment