From b8f9a71e65bab25168dcc94441917876f7e55ce6 Mon Sep 17 00:00:00 2001 From: Andre Fredette <afredette@redhat.com> Date: Fri, 5 Aug 2022 11:30:51 -0400 Subject: [PATCH] Add priority value to SchedClassifier attach() call Also modified dependencies in {{project-name}}/Cargo.toml to pull from the aya github main branch to pick up the latest changes. Chages aya-template to work with API change introduced by pr #359 2nd part of change for issue #358 Signed-off-by: Andre Fredette <afredette@redhat.com> --- {{project-name}}/Cargo.toml | 4 ++-- {{project-name}}/src/main.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/{{project-name}}/Cargo.toml b/{{project-name}}/Cargo.toml index 0491123..37a4c3e 100644 --- a/{{project-name}}/Cargo.toml +++ b/{{project-name}}/Cargo.toml @@ -5,8 +5,8 @@ edition = "2021" publish = false [dependencies] -aya = { version = ">=0.11", features=["async_tokio"] } -aya-log = "0.1" +aya = { git = "https://github.com/aya-rs/aya", branch = "main", features=["async_tokio"] } +aya-log = { git = "https://github.com/aya-rs/aya", branch = "main" } {{project-name}}-common = { path = "../{{project-name}}-common", features=["user"] } anyhow = "1.0.42" clap = { version = "3.1", features = ["derive"] } diff --git a/{{project-name}}/src/main.rs b/{{project-name}}/src/main.rs index ed1e90d..832a918 100644 --- a/{{project-name}}/src/main.rs +++ b/{{project-name}}/src/main.rs @@ -115,7 +115,7 @@ async fn main() -> Result<(), anyhow::Error> { let _ = tc::qdisc_add_clsact(&opt.iface); let program: &mut SchedClassifier = bpf.program_mut("{{crate_name}}").unwrap().try_into()?; program.load()?; - program.attach(&opt.iface, TcAttachType::{{direction}})?; + program.attach(&opt.iface, TcAttachType::{{direction}}, 0)?; {%- when "cgroup_skb" -%} let program: &mut CgroupSkb = bpf.program_mut("{{crate_name}}").unwrap().try_into()?; let cgroup = std::fs::File::open(opt.cgroup_path)?;