Skip to content

Commit 63d8d4d

Browse files
authored
Merge pull request #528 from dave-tucker/rename-all-the-things
Rename Bpf -> Ebpf across all crates for consistency
2 parents a4e68eb + 715e62d commit 63d8d4d

File tree

200 files changed

+13192
-13243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+13192
-13243
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ jobs:
5555
run: |
5656
set -euxo pipefail
5757
cargo hack miri test --all-targets --feature-powerset \
58-
--exclude aya-bpf \
59-
--exclude aya-bpf-bindings \
58+
--exclude aya-ebpf \
59+
--exclude aya-ebpf-bindings \
6060
--exclude aya-log-ebpf \
6161
--exclude integration-ebpf \
6262
--exclude integration-test \
@@ -92,8 +92,8 @@ jobs:
9292
run: |
9393
set -euxo pipefail
9494
cargo hack build --all-targets --feature-powerset \
95-
--exclude aya-bpf \
96-
--exclude aya-bpf-bindings \
95+
--exclude aya-ebpf \
96+
--exclude aya-ebpf-bindings \
9797
--exclude aya-log-ebpf \
9898
--exclude integration-ebpf \
9999
--workspace
@@ -104,8 +104,8 @@ jobs:
104104
run: |
105105
set -euxo pipefail
106106
cargo hack test --all-targets --feature-powerset \
107-
--exclude aya-bpf \
108-
--exclude aya-bpf-bindings \
107+
--exclude aya-ebpf \
108+
--exclude aya-ebpf-bindings \
109109
--exclude aya-log-ebpf \
110110
--exclude integration-ebpf \
111111
--exclude integration-test \
@@ -117,15 +117,15 @@ jobs:
117117
run: |
118118
set -euxo pipefail
119119
cargo hack test --doc --feature-powerset \
120-
--exclude aya-bpf \
121-
--exclude aya-bpf-bindings \
120+
--exclude aya-ebpf \
121+
--exclude aya-ebpf-bindings \
122122
--exclude aya-log-ebpf \
123123
--exclude init \
124124
--exclude integration-ebpf \
125125
--exclude integration-test \
126126
--workspace
127127
128-
build-test-aya-bpf:
128+
build-test-aya-ebpf:
129129
strategy:
130130
fail-fast: false
131131
matrix:
@@ -158,7 +158,7 @@ jobs:
158158
CARGO_CFG_BPF_TARGET_ARCH: ${{ matrix.arch }}
159159
run: |
160160
set -euxo pipefail
161-
cargo hack build --package aya-bpf --package aya-log-ebpf \
161+
cargo hack build --package aya-ebpf --package aya-log-ebpf \
162162
--feature-powerset \
163163
--target ${{ matrix.target }} \
164164
-Z build-std=core
@@ -170,7 +170,7 @@ jobs:
170170
run: |
171171
set -euxo pipefail
172172
cargo hack test --doc \
173-
--package aya-bpf \
173+
--package aya-ebpf \
174174
--package aya-log-ebpf \
175175
--feature-powerset
176176
@@ -305,7 +305,7 @@ jobs:
305305
needs:
306306
- lint
307307
- build-test-aya
308-
- build-test-aya-bpf
308+
- build-test-aya-ebpf
309309
- run-integration-test
310310
runs-on: ubuntu-latest
311311
steps:

.mergify.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pull_request_rules:
5252

5353
- name: add labels for aya-bpf PRs
5454
conditions:
55-
- files~=^(aya-bpf-macros|bpf/aya-bpf(-(cty|bindings))?)/
55+
- files~=^(aya-ebpf-macros|ebpf/aya-ebpf(-(cty|bindings))?)/
5656
actions:
5757
label:
5858
add:
@@ -68,7 +68,7 @@ pull_request_rules:
6868

6969
- name: add labels for aya-log-ebpf PRs
7070
conditions:
71-
- files~=^(aya-log-common|bpf/aya-log-ebpf)/
71+
- files~=^(aya-log-common|ebpf/aya-log-ebpf)/
7272
actions:
7373
label:
7474
add:

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ members = [
1111
"xtask",
1212

1313
# macros
14-
"aya-bpf-macros",
14+
"aya-ebpf-macros",
1515
"aya-log-ebpf-macros",
1616

1717
# ebpf crates
18-
"bpf/aya-bpf",
19-
"bpf/aya-bpf-bindings",
20-
"bpf/aya-log-ebpf",
18+
"ebpf/aya-ebpf",
19+
"ebpf/aya-ebpf-bindings",
20+
"ebpf/aya-log-ebpf",
2121
"test/integration-ebpf",
2222
]
2323

@@ -35,7 +35,7 @@ default-members = [
3535
# tests, and that doesn't work unless they've been built with `cargo xtask`.
3636
"xtask",
3737

38-
"aya-bpf-macros",
38+
"aya-ebpf-macros",
3939
"aya-log-ebpf-macros",
4040

4141
# ebpf crates are omitted; they must be built with:

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ use a `BPF_PROG_TYPE_CGROUP_SKB` program with aya:
7474

7575
```rust
7676
use std::fs::File;
77-
use aya::Bpf;
77+
use aya::Ebpf;
7878
use aya::programs::{CgroupSkb, CgroupSkbAttachType};
7979

8080
// load the BPF code
81-
let mut bpf = Bpf::load_file("bpf.o")?;
81+
let mut ebpf = Ebpf::load_file("ebpf.o")?;
8282

83-
// get the `ingress_filter` program compiled into `bpf.o`.
84-
let ingress: &mut CgroupSkb = bpf.program_mut("ingress_filter")?.try_into()?;
83+
// get the `ingress_filter` program compiled into `ebpf.o`.
84+
let ingress: &mut CgroupSkb = ebpf.program_mut("ingress_filter")?.try_into()?;
8585

8686
// load the program into the kernel
8787
ingress.load()?;

aya-bpf-macros/Cargo.toml renamed to aya-ebpf-macros/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "aya-bpf-macros"
2+
name = "aya-ebpf-macros"
33
version = "0.1.0"
4-
description = "Proc macros used by aya-bpf"
4+
description = "Proc macros used by aya-ebpf"
55
authors.workspace = true
66
license.workspace = true
77
repository.workspace = true
@@ -18,4 +18,4 @@ quote = { workspace = true }
1818
syn = { workspace = true, default-features = true, features = ["full"] }
1919

2020
[dev-dependencies]
21-
aya-bpf = { path = "../bpf/aya-bpf", version = "0.1.0", default-features = false }
21+
aya-ebpf = { path = "../ebpf/aya-ebpf", version = "0.1.0", default-features = false }
File renamed without changes.

aya-bpf-macros/src/btf_tracepoint.rs renamed to aya-ebpf-macros/src/btf_tracepoint.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl BtfTracePoint {
3434
#[no_mangle]
3535
#[link_section = #section_name]
3636
#fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 {
37-
let _ = #fn_name(::aya_bpf::programs::BtfTracePointContext::new(ctx));
37+
let _ = #fn_name(::aya_ebpf::programs::BtfTracePointContext::new(ctx));
3838
return 0;
3939

4040
#item
@@ -65,7 +65,7 @@ mod tests {
6565
#[no_mangle]
6666
#[link_section = "tp_btf"]
6767
fn foo(ctx: *mut ::core::ffi::c_void) -> i32 {
68-
let _ = foo(::aya_bpf::programs::BtfTracePointContext::new(ctx));
68+
let _ = foo(::aya_ebpf::programs::BtfTracePointContext::new(ctx));
6969
return 0;
7070

7171
fn foo(ctx: BtfTracePointContext) -> i32 {
@@ -92,7 +92,7 @@ mod tests {
9292
#[no_mangle]
9393
#[link_section = "tp_btf/some_func"]
9494
fn foo(ctx: *mut ::core::ffi::c_void) -> i32 {
95-
let _ = foo(::aya_bpf::programs::BtfTracePointContext::new(ctx));
95+
let _ = foo(::aya_ebpf::programs::BtfTracePointContext::new(ctx));
9696
return 0;
9797

9898
fn foo(ctx: BtfTracePointContext) -> i32 {

aya-bpf-macros/src/cgroup_device.rs renamed to aya-ebpf-macros/src/cgroup_device.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ impl CgroupDevice {
2323
Ok(quote! {
2424
#[no_mangle]
2525
#[link_section = "cgroup/dev"]
26-
#fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::bpf_cgroup_dev_ctx) -> i32 {
27-
return #fn_name(::aya_bpf::programs::DeviceContext::new(ctx));
26+
#fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_cgroup_dev_ctx) -> i32 {
27+
return #fn_name(::aya_ebpf::programs::DeviceContext::new(ctx));
2828

2929
#item
3030
}
@@ -53,8 +53,8 @@ mod tests {
5353
let expected = quote! {
5454
#[no_mangle]
5555
#[link_section = "cgroup/dev"]
56-
fn foo(ctx: *mut ::aya_bpf::bindings::bpf_cgroup_dev_ctx) -> i32 {
57-
return foo(::aya_bpf::programs::DeviceContext::new(ctx));
56+
fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_cgroup_dev_ctx) -> i32 {
57+
return foo(::aya_ebpf::programs::DeviceContext::new(ctx));
5858

5959
fn foo(ctx: DeviceContext) -> i32 {
6060
0

aya-bpf-macros/src/cgroup_skb.rs renamed to aya-ebpf-macros/src/cgroup_skb.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ impl CgroupSkb {
3737
Ok(quote! {
3838
#[no_mangle]
3939
#[link_section = #section_name]
40-
#fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
41-
return #fn_name(::aya_bpf::programs::SkBuffContext::new(ctx));
40+
#fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
41+
return #fn_name(::aya_ebpf::programs::SkBuffContext::new(ctx));
4242

4343
#item
4444
}
@@ -67,8 +67,8 @@ mod tests {
6767
let expected = quote! {
6868
#[no_mangle]
6969
#[link_section = "cgroup/skb"]
70-
fn foo(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
71-
return foo(::aya_bpf::programs::SkBuffContext::new(ctx));
70+
fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
71+
return foo(::aya_ebpf::programs::SkBuffContext::new(ctx));
7272

7373
fn foo(ctx: SkBuffContext) -> i32 {
7474
0
@@ -93,8 +93,8 @@ mod tests {
9393
let expected = quote! {
9494
#[no_mangle]
9595
#[link_section = "cgroup_skb/egress"]
96-
fn foo(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
97-
return foo(::aya_bpf::programs::SkBuffContext::new(ctx));
96+
fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
97+
return foo(::aya_ebpf::programs::SkBuffContext::new(ctx));
9898

9999
fn foo(ctx: SkBuffContext) -> i32 {
100100
0
@@ -119,8 +119,8 @@ mod tests {
119119
let expected = quote! {
120120
#[no_mangle]
121121
#[link_section = "cgroup_skb/ingress"]
122-
fn foo(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
123-
return foo(::aya_bpf::programs::SkBuffContext::new(ctx));
122+
fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
123+
return foo(::aya_ebpf::programs::SkBuffContext::new(ctx));
124124

125125
fn foo(ctx: SkBuffContext) -> i32 {
126126
0
@@ -145,8 +145,8 @@ mod tests {
145145
let expected = quote! {
146146
#[no_mangle]
147147
#[link_section = "cgroup_skb/egress"]
148-
fn foo(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
149-
return foo(::aya_bpf::programs::SkBuffContext::new(ctx));
148+
fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
149+
return foo(::aya_ebpf::programs::SkBuffContext::new(ctx));
150150

151151
fn foo(ctx: SkBuffContext) -> i32 {
152152
0
@@ -171,8 +171,8 @@ mod tests {
171171
let expected = quote! {
172172
#[no_mangle]
173173
#[link_section = "cgroup_skb/egress"]
174-
pub fn foo(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
175-
return foo(::aya_bpf::programs::SkBuffContext::new(ctx));
174+
pub fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
175+
return foo(::aya_ebpf::programs::SkBuffContext::new(ctx));
176176

177177
pub fn foo(ctx: SkBuffContext) -> i32 {
178178
0
@@ -197,8 +197,8 @@ mod tests {
197197
let expected = quote! {
198198
#[no_mangle]
199199
#[link_section = "cgroup_skb/egress"]
200-
pub(crate) fn foo(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
201-
return foo(::aya_bpf::programs::SkBuffContext::new(ctx));
200+
pub(crate) fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
201+
return foo(::aya_ebpf::programs::SkBuffContext::new(ctx));
202202

203203
pub(crate) fn foo(ctx: SkBuffContext) -> i32 {
204204
0

aya-bpf-macros/src/cgroup_sock.rs renamed to aya-ebpf-macros/src/cgroup_sock.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ impl CgroupSock {
3535
Ok(quote! {
3636
#[no_mangle]
3737
#[link_section = #section_name]
38-
#fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::bpf_sock) -> i32 {
39-
return #fn_name(::aya_bpf::programs::SockContext::new(ctx));
38+
#fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 {
39+
return #fn_name(::aya_ebpf::programs::SockContext::new(ctx));
4040

4141
#item
4242
}
@@ -65,8 +65,8 @@ mod tests {
6565
let expected = quote! {
6666
#[no_mangle]
6767
#[link_section = "cgroup/post_bind4"]
68-
fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock) -> i32 {
69-
return foo(::aya_bpf::programs::SockContext::new(ctx));
68+
fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 {
69+
return foo(::aya_ebpf::programs::SockContext::new(ctx));
7070

7171
fn foo(ctx: SockContext) -> i32 {
7272
0
@@ -91,8 +91,8 @@ mod tests {
9191
let expected = quote! {
9292
#[no_mangle]
9393
#[link_section = "cgroup/post_bind6"]
94-
fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock) -> i32 {
95-
return foo(::aya_bpf::programs::SockContext::new(ctx));
94+
fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 {
95+
return foo(::aya_ebpf::programs::SockContext::new(ctx));
9696

9797
fn foo(ctx: SockContext) -> i32 {
9898
0
@@ -116,8 +116,8 @@ mod tests {
116116
let expected = quote! {
117117
#[no_mangle]
118118
#[link_section = "cgroup/sock_create"]
119-
fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock) -> i32 {
120-
return foo(::aya_bpf::programs::SockContext::new(ctx));
119+
fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 {
120+
return foo(::aya_ebpf::programs::SockContext::new(ctx));
121121

122122
fn foo(ctx: SockContext) -> i32 {
123123
0
@@ -141,8 +141,8 @@ mod tests {
141141
let expected = quote! {
142142
#[no_mangle]
143143
#[link_section = "cgroup/sock_release"]
144-
fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock) -> i32 {
145-
return foo(::aya_bpf::programs::SockContext::new(ctx));
144+
fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 {
145+
return foo(::aya_ebpf::programs::SockContext::new(ctx));
146146

147147
fn foo(ctx: SockContext) -> i32 {
148148
0

0 commit comments

Comments
 (0)