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>
pull/57/head
Andre Fredette 3 years ago
parent 37410be032
commit b8f9a71e65

@ -5,8 +5,8 @@ edition = "2021"
publish = false publish = false
[dependencies] [dependencies]
aya = { version = ">=0.11", features=["async_tokio"] } aya = { git = "https://github.com/aya-rs/aya", branch = "main", features=["async_tokio"] }
aya-log = "0.1" aya-log = { git = "https://github.com/aya-rs/aya", branch = "main" }
{{project-name}}-common = { path = "../{{project-name}}-common", features=["user"] } {{project-name}}-common = { path = "../{{project-name}}-common", features=["user"] }
anyhow = "1.0.42" anyhow = "1.0.42"
clap = { version = "3.1", features = ["derive"] } clap = { version = "3.1", features = ["derive"] }

@ -115,7 +115,7 @@ async fn main() -> Result<(), anyhow::Error> {
let _ = tc::qdisc_add_clsact(&opt.iface); let _ = tc::qdisc_add_clsact(&opt.iface);
let program: &mut SchedClassifier = bpf.program_mut("{{crate_name}}").unwrap().try_into()?; let program: &mut SchedClassifier = bpf.program_mut("{{crate_name}}").unwrap().try_into()?;
program.load()?; program.load()?;
program.attach(&opt.iface, TcAttachType::{{direction}})?; program.attach(&opt.iface, TcAttachType::{{direction}}, 0)?;
{%- when "cgroup_skb" -%} {%- when "cgroup_skb" -%}
let program: &mut CgroupSkb = bpf.program_mut("{{crate_name}}").unwrap().try_into()?; let program: &mut CgroupSkb = bpf.program_mut("{{crate_name}}").unwrap().try_into()?;
let cgroup = std::fs::File::open(opt.cgroup_path)?; let cgroup = std::fs::File::open(opt.cgroup_path)?;

Loading…
Cancel
Save