bpf: perf_map: fix type error

pull/1/head
Alessandro Decina 4 years ago
parent 8e6f447e9b
commit 4febbc3fae

@ -41,7 +41,9 @@ impl<T> PerfMap<T> {
data: &T, data: &T,
flags: u32, flags: u32,
) { ) {
let index = index.map(|i| (i as u64) << 32).unwrap_or(BPF_F_CURRENT_CPU); let index = index
.map(|i| (i as u64) << 32)
.unwrap_or(BPF_F_CURRENT_CPU.into());
let flags = index | flags as u64; let flags = index | flags as u64;
unsafe { unsafe {
bpf_perf_event_output( bpf_perf_event_output(

Loading…
Cancel
Save