Skip to content

Commit

Permalink
Try fix test failed. Let's see if that would pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
pdliyan committed Mar 23, 2024
1 parent 628e6a4 commit c68f239
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion {{project-name}}/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ async fn main() -> Result<(), anyhow::Error> {

let prog: &mut SkMsg = bpf.program_mut("{{crate_name}}").unwrap().try_into()?;
prog.load()?;
prog.attach(map_fd)?;
prog.attach(map_fd.into())?;
// insert sockets to the map using sock_map.insert here, or from a sock_ops program
{%- when "xdp" -%}
let program: &mut Xdp = bpf.program_mut("{{crate_name}}").unwrap().try_into()?;
Expand Down Expand Up @@ -186,6 +186,7 @@ async fn main() -> Result<(), anyhow::Error> {
perf_event::perf_sw_ids::PERF_COUNT_SW_CPU_CLOCK as u64,
perf_event::PerfEventScope::AllProcessesOneCpu { cpu },
perf_event::SamplePolicy::Frequency(1),
true,
)?;
}
{%- when "raw_tracepoint" -%}
Expand Down

0 comments on commit c68f239

Please sign in to comment.