|
|
@ -1,5 +1,6 @@
|
|
|
|
#![cfg_attr(target_arch = "bpf", no_std)]
|
|
|
|
#![cfg_attr(target_arch = "bpf", no_std)]
|
|
|
|
#![cfg_attr(target_arch = "bpf", no_main)]
|
|
|
|
#![cfg_attr(target_arch = "bpf", no_main)]
|
|
|
|
|
|
|
|
aya_ebpf::prelude!();
|
|
|
|
|
|
|
|
|
|
|
|
use aya_ebpf::{bindings::xdp_action::XDP_PASS, macros::xdp, programs::XdpContext};
|
|
|
|
use aya_ebpf::{bindings::xdp_action::XDP_PASS, macros::xdp, programs::XdpContext};
|
|
|
|
|
|
|
|
|
|
|
@ -18,14 +19,3 @@ probe!(xdp_cpumap, (map = "cpumap"));
|
|
|
|
probe!(xdp_devmap, (map = "devmap"));
|
|
|
|
probe!(xdp_devmap, (map = "devmap"));
|
|
|
|
probe!(xdp_frags_cpumap, (frags, map = "cpumap"));
|
|
|
|
probe!(xdp_frags_cpumap, (frags, map = "cpumap"));
|
|
|
|
probe!(xdp_frags_devmap, (frags, map = "devmap"));
|
|
|
|
probe!(xdp_frags_devmap, (frags, map = "devmap"));
|
|
|
|
|
|
|
|
|
|
|
|
#[cfg(target_arch = "bpf")]
|
|
|
|
|
|
|
|
#[panic_handler]
|
|
|
|
|
|
|
|
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
|
|
|
|
|
|
|
loop {}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[cfg(not(target_arch = "bpf"))]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
|
|
|
panic!("This should only ever be called from its eBPF entrypoint")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|