Explorar o código

feat(aya): Added MIPS bindings

Updated `aya-obj/src/generated/mod.rs` and
`bpf/aya-bpf-bindings/src/lib.rs to use the mips bindings.
Ishan Jain %!s(int64=2) %!d(string=hai) anos
pai
achega
3ff609114e

+ 4 - 0
aya-obj/src/generated/mod.rs

@@ -13,6 +13,8 @@ mod btf_internal_bindings;
 mod linux_bindings_aarch64;
 #[cfg(target_arch = "arm")]
 mod linux_bindings_armv7;
+#[cfg(target_arch = "mips")]
+mod linux_bindings_mips;
 #[cfg(target_arch = "powerpc64")]
 mod linux_bindings_powerpc64;
 #[cfg(target_arch = "riscv64")]
@@ -29,6 +31,8 @@ pub use btf_internal_bindings::{bpf_core_relo, bpf_core_relo_kind, btf_ext_heade
 pub use linux_bindings_aarch64::*;
 #[cfg(target_arch = "arm")]
 pub use linux_bindings_armv7::*;
+#[cfg(target_arch = "mips")]
+pub use linux_bindings_mips::*;
 #[cfg(target_arch = "powerpc64")]
 pub use linux_bindings_powerpc64::*;
 #[cfg(target_arch = "riscv64")]

+ 1 - 1
ebpf/aya-ebpf-bindings/build.rs

@@ -12,5 +12,5 @@ fn main() {
         }
         println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\"");
     }
-    println!("cargo::rustc-check-cfg=cfg(bpf_target_arch, values(\"x86_64\",\"arm\",\"aarch64\",\"riscv64\",\"powerpc64\",\"s390x\"))");
+    println!("cargo::rustc-check-cfg=cfg(bpf_target_arch, values(\"x86_64\",\"arm\",\"aarch64\",\"riscv64\",\"powerpc64\",\"s390x\",\"mips\"))");
 }

+ 5 - 0
ebpf/aya-ebpf-bindings/src/lib.rs

@@ -20,11 +20,16 @@ mod powerpc64;
 #[cfg(bpf_target_arch = "s390x")]
 mod s390x;
 
+#[cfg(bpf_target_arch = "mips")]
+mod mips;
+
 mod gen {
     #[cfg(bpf_target_arch = "aarch64")]
     pub use super::aarch64::*;
     #[cfg(bpf_target_arch = "arm")]
     pub use super::armv7::*;
+    #[cfg(bpf_target_arch = "mips")]
+    pub use super::mips::*;
     #[cfg(bpf_target_arch = "powerpc64")]
     pub use super::powerpc64::*;
     #[cfg(bpf_target_arch = "riscv64")]

+ 3 - 0
ebpf/aya-ebpf-bindings/src/mips/mod.rs

@@ -0,0 +1,3 @@
+#![allow(clippy::all, dead_code)]
+pub mod bindings;
+pub mod helpers;