From d4a4f33902a8efeb9e33068a187e6bc2761aa6b6 Mon Sep 17 00:00:00 2001 From: William Findlay Date: Tue, 21 Dec 2021 12:18:28 -0500 Subject: [PATCH] ebpf: use new SkBuffContext instead of SkSkbContext --- {{project-name}}-ebpf/src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/{{project-name}}-ebpf/src/main.rs b/{{project-name}}-ebpf/src/main.rs index 76f50c4..ec64a1b 100644 --- a/{{project-name}}-ebpf/src/main.rs +++ b/{{project-name}}-ebpf/src/main.rs @@ -129,35 +129,35 @@ unsafe fn try_{{crate_name}}(_ctx: XdpContext) -> Result { {%- when "classifier" %} use aya_bpf::{ macros::classifier, - programs::SkSkbContext, + programs::SkBuffContext, }; #[classifier(name="{{crate_name}}")] -pub fn {{crate_name}}(ctx: SkSkbContext) -> i32 { +pub fn {{crate_name}}(ctx: SkBuffContext) -> i32 { match unsafe { try_{{crate_name}}(ctx) } { Ok(ret) => ret, Err(ret) => ret, } } -unsafe fn try_{{crate_name}}(_ctx: SkSkbContext) -> Result { +unsafe fn try_{{crate_name}}(_ctx: SkBuffContext) -> Result { Ok(0) } {%- when "cgroup_skb" %} use aya_bpf::{ macros::cgroup_skb, - programs::SkSkbContext, + programs::SkBuffContext, }; #[cgroup_skb(name="{{crate_name}}")] -pub fn {{crate_name}}(ctx: SkSkbContext) -> i32 { +pub fn {{crate_name}}(ctx: SkBuffContext) -> i32 { match unsafe { try_{{crate_name}}(ctx) } { Ok(ret) => ret, Err(ret) => ret, } } -unsafe fn try_{{crate_name}}(_ctx: SkSkbContext) -> Result { +unsafe fn try_{{crate_name}}(_ctx: SkBuffContext) -> Result { Ok(0) } {%- when "tracepoint" %}