Browse Source

chore(aya-ebpf-bindings): Rename bpf -> ebpf

Signed-off-by: Dave Tucker <[email protected]>
Dave Tucker 1 year ago
parent
commit
70ac91dc1e
33 changed files with 27 additions and 27 deletions
  1. 4 4
      .github/workflows/ci.yml
  2. 1 1
      Cargo.toml
  3. 1 1
      aya/CHANGELOG.md
  4. 1 1
      ebpf/aya-bpf/Cargo.toml
  5. 1 1
      ebpf/aya-bpf/src/helpers.rs
  6. 1 1
      ebpf/aya-bpf/src/lib.rs
  7. 1 1
      ebpf/aya-bpf/src/maps/hash_map.rs
  8. 1 1
      ebpf/aya-bpf/src/maps/lpm_trie.rs
  9. 1 1
      ebpf/aya-bpf/src/maps/xdp/cpu_map.rs
  10. 1 1
      ebpf/aya-bpf/src/maps/xdp/dev_map.rs
  11. 1 1
      ebpf/aya-bpf/src/maps/xdp/dev_map_hash.rs
  12. 1 1
      ebpf/aya-bpf/src/maps/xdp/mod.rs
  13. 1 1
      ebpf/aya-bpf/src/maps/xdp/xsk_map.rs
  14. 1 1
      ebpf/aya-bpf/src/programs/sk_buff.rs
  15. 1 1
      ebpf/aya-bpf/src/programs/sock_ops.rs
  16. 1 1
      ebpf/aya-ebpf-bindings/Cargo.toml
  17. 0 0
      ebpf/aya-ebpf-bindings/build.rs
  18. 0 0
      ebpf/aya-ebpf-bindings/include/bindings.h
  19. 0 0
      ebpf/aya-ebpf-bindings/src/aarch64/bindings.rs
  20. 0 0
      ebpf/aya-ebpf-bindings/src/aarch64/helpers.rs
  21. 0 0
      ebpf/aya-ebpf-bindings/src/aarch64/mod.rs
  22. 0 0
      ebpf/aya-ebpf-bindings/src/armv7/bindings.rs
  23. 0 0
      ebpf/aya-ebpf-bindings/src/armv7/helpers.rs
  24. 0 0
      ebpf/aya-ebpf-bindings/src/armv7/mod.rs
  25. 0 0
      ebpf/aya-ebpf-bindings/src/lib.rs
  26. 0 0
      ebpf/aya-ebpf-bindings/src/riscv64/bindings.rs
  27. 0 0
      ebpf/aya-ebpf-bindings/src/riscv64/helpers.rs
  28. 0 0
      ebpf/aya-ebpf-bindings/src/riscv64/mod.rs
  29. 0 0
      ebpf/aya-ebpf-bindings/src/x86_64/bindings.rs
  30. 0 0
      ebpf/aya-ebpf-bindings/src/x86_64/helpers.rs
  31. 0 0
      ebpf/aya-ebpf-bindings/src/x86_64/mod.rs
  32. 3 3
      xtask/src/codegen/aya_ebpf_bindings.rs
  33. 5 5
      xtask/src/codegen/mod.rs

+ 4 - 4
.github/workflows/ci.yml

@@ -56,7 +56,7 @@ jobs:
           set -euxo pipefail
           cargo hack miri test --all-targets --feature-powerset \
             --exclude aya-bpf \
-            --exclude aya-bpf-bindings \
+            --exclude aya-ebpf-bindings \
             --exclude aya-log-ebpf \
             --exclude integration-ebpf \
             --exclude integration-test \
@@ -93,7 +93,7 @@ jobs:
           set -euxo pipefail
           cargo hack build --all-targets --feature-powerset \
             --exclude aya-bpf \
-            --exclude aya-bpf-bindings \
+            --exclude aya-ebpf-bindings \
             --exclude aya-log-ebpf \
             --exclude integration-ebpf \
             --workspace
@@ -105,7 +105,7 @@ jobs:
           set -euxo pipefail
           cargo hack test --all-targets --feature-powerset \
             --exclude aya-bpf \
-            --exclude aya-bpf-bindings \
+            --exclude aya-ebpf-bindings \
             --exclude aya-log-ebpf \
             --exclude integration-ebpf \
             --exclude integration-test \
@@ -118,7 +118,7 @@ jobs:
           set -euxo pipefail
           cargo hack test --doc --feature-powerset \
             --exclude aya-bpf \
-            --exclude aya-bpf-bindings \
+            --exclude aya-ebpf-bindings \
             --exclude aya-log-ebpf \
             --exclude init \
             --exclude integration-ebpf \

+ 1 - 1
Cargo.toml

@@ -16,7 +16,7 @@ members = [
 
     # ebpf crates
     "ebpf/aya-bpf",
-    "ebpf/aya-bpf-bindings",
+    "ebpf/aya-ebpf-bindings",
     "ebpf/aya-log-ebpf",
     "test/integration-ebpf",
 ]

+ 1 - 1
aya/CHANGELOG.md

@@ -2032,7 +2032,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
     - Don't error out parsing padded map sections ([`b657930`](https://github.com/aya-rs/aya/commit/b657930a3ee61f88ada0630afdac6b1c77459244))
     - Added support for armv7-unknown-linux-gnueabi and armv7-unknown-linux-gnueabihf ([`8311abf`](https://github.com/aya-rs/aya/commit/8311abfdcbbe70da6abdd67b78b831d53998aad5))
     - Tc: make qdisc_add_clsact return io::Error ([`9c8e78b`](https://github.com/aya-rs/aya/commit/9c8e78b7d4192b376ec2e532d9ddcf81c3c5182e))
-    - Aya, aya-bpf-bindings: regenerate bindings ([`122a530`](https://github.com/aya-rs/aya/commit/122a5306e72c7560629bcef160e7f676b84eabd7))
+    - Aya, aya-ebpf-bindings: regenerate bindings ([`122a530`](https://github.com/aya-rs/aya/commit/122a5306e72c7560629bcef160e7f676b84eabd7))
     - Kprobe: remove pid argument ([`08c71df`](https://github.com/aya-rs/aya/commit/08c71dfeb19b2b4358d75baf5b95f8d4e6521935))
     - Add missing load() in kprobe example ([`bb15e82`](https://github.com/aya-rs/aya/commit/bb15e82c1d8373700dda52f69d6c4bf6f5489a03))
     - Support both bpf_map_def layout variants ([`d8d3117`](https://github.com/aya-rs/aya/commit/d8d311738c974f3b6fad22006ab2b827d0925ce8))

+ 1 - 1
ebpf/aya-bpf/Cargo.toml

@@ -11,7 +11,7 @@ edition.workspace = true
 [dependencies]
 aya-ebpf-cty = { path = "../aya-ebpf-cty" }
 aya-bpf-macros = { path = "../../aya-bpf-macros" }
-aya-bpf-bindings = { path = "../aya-bpf-bindings" }
+aya-ebpf-bindings = { path = "../aya-ebpf-bindings" }
 const-assert = { workspace = true, optional = true }
 
 [build-dependencies]

+ 1 - 1
ebpf/aya-bpf/src/helpers.rs

@@ -9,7 +9,7 @@
 
 use core::mem::{self, MaybeUninit};
 
-pub use aya_bpf_bindings::helpers as gen;
+pub use aya_ebpf_bindings::helpers as gen;
 #[doc(hidden)]
 pub use gen::*;
 

+ 1 - 1
ebpf/aya-bpf/src/lib.rs

@@ -19,7 +19,7 @@
 #![warn(clippy::cast_lossless, clippy::cast_sign_loss)]
 #![no_std]
 
-pub use aya_bpf_bindings::bindings;
+pub use aya_ebpf_bindings::bindings;
 
 mod args;
 pub use args::PtRegs;

+ 1 - 1
ebpf/aya-bpf/src/maps/hash_map.rs

@@ -1,6 +1,6 @@
 use core::{cell::UnsafeCell, marker::PhantomData, mem, ptr::NonNull};
 
-use aya_bpf_bindings::bindings::bpf_map_type::{
+use aya_ebpf_bindings::bindings::bpf_map_type::{
     BPF_MAP_TYPE_LRU_HASH, BPF_MAP_TYPE_LRU_PERCPU_HASH, BPF_MAP_TYPE_PERCPU_HASH,
 };
 use aya_ebpf_cty::{c_long, c_void};

+ 1 - 1
ebpf/aya-bpf/src/maps/lpm_trie.rs

@@ -1,6 +1,6 @@
 use core::{cell::UnsafeCell, marker::PhantomData, mem, ptr::NonNull};
 
-use aya_bpf_bindings::bindings::BPF_F_NO_PREALLOC;
+use aya_ebpf_bindings::bindings::BPF_F_NO_PREALLOC;
 use aya_ebpf_cty::{c_long, c_void};
 
 use crate::{

+ 1 - 1
ebpf/aya-bpf/src/maps/xdp/cpu_map.rs

@@ -1,6 +1,6 @@
 use core::{cell::UnsafeCell, mem};
 
-use aya_bpf_bindings::bindings::bpf_cpumap_val;
+use aya_ebpf_bindings::bindings::bpf_cpumap_val;
 
 use super::try_redirect_map;
 use crate::{

+ 1 - 1
ebpf/aya-bpf/src/maps/xdp/dev_map.rs

@@ -1,6 +1,6 @@
 use core::{cell::UnsafeCell, mem, num::NonZeroU32, ptr::NonNull};
 
-use aya_bpf_bindings::bindings::bpf_devmap_val;
+use aya_ebpf_bindings::bindings::bpf_devmap_val;
 use aya_ebpf_cty::c_void;
 
 use super::try_redirect_map;

+ 1 - 1
ebpf/aya-bpf/src/maps/xdp/dev_map_hash.rs

@@ -1,6 +1,6 @@
 use core::{cell::UnsafeCell, mem, num::NonZeroU32, ptr::NonNull};
 
-use aya_bpf_bindings::bindings::bpf_devmap_val;
+use aya_ebpf_bindings::bindings::bpf_devmap_val;
 use aya_ebpf_cty::c_void;
 
 use super::{dev_map::DevMapValue, try_redirect_map};

+ 1 - 1
ebpf/aya-bpf/src/maps/xdp/mod.rs

@@ -5,7 +5,7 @@ mod xsk_map;
 
 use core::cell::UnsafeCell;
 
-use aya_bpf_bindings::{
+use aya_ebpf_bindings::{
     bindings::{bpf_map_def, xdp_action::XDP_REDIRECT},
     helpers::bpf_redirect_map,
 };

+ 1 - 1
ebpf/aya-bpf/src/maps/xdp/xsk_map.rs

@@ -1,6 +1,6 @@
 use core::{cell::UnsafeCell, mem, ptr::NonNull};
 
-use aya_bpf_bindings::bindings::bpf_xdp_sock;
+use aya_ebpf_bindings::bindings::bpf_xdp_sock;
 use aya_ebpf_cty::c_void;
 
 use super::try_redirect_map;

+ 1 - 1
ebpf/aya-bpf/src/programs/sk_buff.rs

@@ -3,7 +3,7 @@ use core::{
     mem::{self, MaybeUninit},
 };
 
-use aya_bpf_bindings::helpers::{
+use aya_ebpf_bindings::helpers::{
     bpf_clone_redirect, bpf_get_socket_uid, bpf_l3_csum_replace, bpf_l4_csum_replace,
     bpf_skb_adjust_room, bpf_skb_change_proto, bpf_skb_change_type, bpf_skb_load_bytes,
     bpf_skb_pull_data, bpf_skb_store_bytes,

+ 1 - 1
ebpf/aya-bpf/src/programs/sock_ops.rs

@@ -1,6 +1,6 @@
 use core::ffi::c_void;
 
-use aya_bpf_bindings::helpers::bpf_sock_ops_cb_flags_set;
+use aya_ebpf_bindings::helpers::bpf_sock_ops_cb_flags_set;
 
 use crate::{bindings::bpf_sock_ops, BpfContext};
 

+ 1 - 1
ebpf/aya-bpf-bindings/Cargo.toml → ebpf/aya-ebpf-bindings/Cargo.toml

@@ -1,5 +1,5 @@
 [package]
-name = "aya-bpf-bindings"
+name = "aya-ebpf-bindings"
 version = "0.1.0"
 description = "Bindings for Linux Kernel eBPF types and helpers"
 authors.workspace = true

+ 0 - 0
ebpf/aya-bpf-bindings/build.rs → ebpf/aya-ebpf-bindings/build.rs


+ 0 - 0
ebpf/aya-bpf-bindings/include/bindings.h → ebpf/aya-ebpf-bindings/include/bindings.h


+ 0 - 0
ebpf/aya-bpf-bindings/src/aarch64/bindings.rs → ebpf/aya-ebpf-bindings/src/aarch64/bindings.rs


+ 0 - 0
ebpf/aya-bpf-bindings/src/aarch64/helpers.rs → ebpf/aya-ebpf-bindings/src/aarch64/helpers.rs


+ 0 - 0
ebpf/aya-bpf-bindings/src/aarch64/mod.rs → ebpf/aya-ebpf-bindings/src/aarch64/mod.rs


+ 0 - 0
ebpf/aya-bpf-bindings/src/armv7/bindings.rs → ebpf/aya-ebpf-bindings/src/armv7/bindings.rs


+ 0 - 0
ebpf/aya-bpf-bindings/src/armv7/helpers.rs → ebpf/aya-ebpf-bindings/src/armv7/helpers.rs


+ 0 - 0
ebpf/aya-bpf-bindings/src/armv7/mod.rs → ebpf/aya-ebpf-bindings/src/armv7/mod.rs


+ 0 - 0
ebpf/aya-bpf-bindings/src/lib.rs → ebpf/aya-ebpf-bindings/src/lib.rs


+ 0 - 0
ebpf/aya-bpf-bindings/src/riscv64/bindings.rs → ebpf/aya-ebpf-bindings/src/riscv64/bindings.rs


+ 0 - 0
ebpf/aya-bpf-bindings/src/riscv64/helpers.rs → ebpf/aya-ebpf-bindings/src/riscv64/helpers.rs


+ 0 - 0
ebpf/aya-bpf-bindings/src/riscv64/mod.rs → ebpf/aya-ebpf-bindings/src/riscv64/mod.rs


+ 0 - 0
ebpf/aya-bpf-bindings/src/x86_64/bindings.rs → ebpf/aya-ebpf-bindings/src/x86_64/bindings.rs


+ 0 - 0
ebpf/aya-bpf-bindings/src/x86_64/helpers.rs → ebpf/aya-ebpf-bindings/src/x86_64/helpers.rs


+ 0 - 0
ebpf/aya-bpf-bindings/src/x86_64/mod.rs → ebpf/aya-ebpf-bindings/src/x86_64/mod.rs


+ 3 - 3
xtask/src/codegen/aya_bpf_bindings.rs → xtask/src/codegen/aya_ebpf_bindings.rs

@@ -19,18 +19,18 @@ pub fn codegen(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<(), anyhow::E
         riscv64_sysroot,
     } = opts;
 
-    let dir = PathBuf::from("bpf/aya-bpf-bindings");
+    let dir = PathBuf::from("bpf/aya-ebpf-bindings");
 
     let builder = || {
         let mut bindgen = bindgen::bpf_builder()
             .header(&*dir.join("include/bindings.h").to_string_lossy())
             // aya-tool uses aya_bpf::cty. We can't use that here since aya-bpf
-            // depends on aya-bpf-bindings so it would create a circular dep.
+            // depends on aya-ebpf-bindings so it would create a circular dep.
             .ctypes_prefix("::aya_ebpf_cty")
             .clang_args(&["-I", &*libbpf_dir.join("include/uapi").to_string_lossy()])
             .clang_args(&["-I", &*libbpf_dir.join("include").to_string_lossy()])
             .clang_args(&["-I", &*libbpf_dir.join("src").to_string_lossy()])
-            // open aya-bpf-bindings/.../bindings.rs and look for mod
+            // open aya-ebpf-bindings/.../bindings.rs and look for mod
             // _bindgen, those are anonymous enums
             .constified_enum("BPF_F_.*")
             .constified_enum("BPF_REG_.*")

+ 5 - 5
xtask/src/codegen/mod.rs

@@ -1,5 +1,5 @@
 mod aya;
-mod aya_bpf_bindings;
+mod aya_ebpf_bindings;
 mod helpers;
 
 use std::path::{Path, PathBuf};
@@ -82,8 +82,8 @@ pub struct Options {
 enum Command {
     #[command(name = "aya")]
     Aya,
-    #[command(name = "aya-bpf-bindings")]
-    AyaBpfBindings,
+    #[command(name = "aya-ebpf-bindings")]
+    AyaEbpfBindings,
 }
 
 pub fn codegen(opts: Options, libbpf_dir: &Path) -> Result<(), anyhow::Error> {
@@ -94,11 +94,11 @@ pub fn codegen(opts: Options, libbpf_dir: &Path) -> Result<(), anyhow::Error> {
     match command {
         Some(command) => match command {
             Command::Aya => aya::codegen(&sysroot_options, libbpf_dir),
-            Command::AyaBpfBindings => aya_bpf_bindings::codegen(&sysroot_options, libbpf_dir),
+            Command::AyaEbpfBindings => aya_ebpf_bindings::codegen(&sysroot_options, libbpf_dir),
         },
         None => {
             aya::codegen(&sysroot_options, libbpf_dir)?;
-            aya_bpf_bindings::codegen(&sysroot_options, libbpf_dir)
+            aya_ebpf_bindings::codegen(&sysroot_options, libbpf_dir)
         }
     }
 }