Commit Graph

193 Commits (44c1f66b7ea932bf2e649969992b897c8996323d)
 

Author SHA1 Message Date
Xiaobo Liu 44c1f66b7e ebpf: merge rust-analyzer settings
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Xiaobo Liu 04b631eb7c ebpf: consolidate rust-analyzer settings
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Tamir Duberstein 91518b64b3 Build on ubuntu-22.04
This matches the version used in the bpf-linker binstall job. Otherwise
we fail with:
```
  = note: bpf-linker: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by bpf-linker)
          bpf-linker: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by bpf-linker)
          bpf-linker: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bpf-linker)
```

Add a nightly build so we catch these earlier.
Zero King 0afbca858c
chore: remove Cargo.lock from .gitignore ()
Fixes 
Zero King 79b73bf2ef fix: emacs directory locals
- Emacs vectors do not have "," separator.
- The .dir-locals.el list is checked against major mode names, but
  lsp-mode could be a minor mode. Use the generic prog-mode instead.
Sandeep Nambiar d3435676f7
feat: add emacs directory locals to configure rust-analyzer ()
.dir-locals.el is the emacs equivalent of .vim directory in the project here.

This PR adds a simple configuration to map the same rust-analyzer
configuration variable as the vim version to make use of new aya
projects seamless with emacs projects that use emacs-lsp + rust analyzer.
catalin-h a006355e62
lsp: support rust-analyzer on helix editor ()
This patch allows the helix editor to correctly initialize the
rust-analyzer when opening a source file from {{project-name}}-ebpf.

To find the Cargo.toml the helix editor must be launched from
the {{project-name}}-ebpf directory or provide the workspace path
as follows:

hx -w <path to {{project-name}}-ebpf> [relative path in {{project-name}}-ebpf]

The patch was tested using helix version 23.10.
Chris Pick 2ad877309a build: Set `resolver = "2"` at the workspace's Cargo.toml
This is the default resolver for the 2021 edition, but needs to be set
manually in virtual workspaces.

https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html#detail
Chris Pick d9ce1b7169 ebpf: use TC_ACT_PIPE in classifier
Demonstrate using the correct constant instead of a magic number.
wanjunlei 7c143de8af
add a build command ()
Add a new command to build ebpf and userspace programs without running.

```
cargo xtask build
```

Co-authored-by: Michal Rostecki <vadorovsky@protonmail.com>
Michal Rostecki f642921fee chore: Use `aya`, `aya-ebpf` and `aya-log` from crates.io
Michal Rostecki 97e817d110
chore: Rename aya-bpf to aya-ebpf ()
aya-bpf crate got renamed to aya-ebpf. Reflect this change
in the template.
blacker1230 1185fd49d2 Fix sk_msg.
pdliyan 3bee1bcc0f Reverse of sk_msg.
pdliyan 17fe98c37c Have no idea about this failed.
pdliyan 5d04aef980 Try fix the usage of fd().
pdliyan c68f239ad0 Try fix test failed. Let's see if that would pass.
pdliyan 628e6a4f81 Fix unchanged Bpf reference. Would check sock_map latter.
pdliyan bc61bdeeba Rename aya-bpf to aya-ebpf.
pdliyan dce5317f2c Rename aya-bpf to aya-ebpf.
dependabot[bot] 9dc5296e47
Merge pull request from aya-rs/dependabot/github_actions/actions/checkout-4
dependabot[bot] 6abd727868
Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Tamir Duberstein 1247fdea1d socket_filter: fix build
The signature of attach changed in
https://github.com/aya-rs/aya/pull/723.
Dave Tucker 599ba4bdf9
Merge pull request from dave-tucker/new-names
Dave Tucker 162599934c ci: Use taiki-e/install-action
This should binstall cargo-generate to save CI time

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Dave Tucker bccd6d3cb6 ebpf: Don't use name in macros
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Tamir Duberstein afdb45341f Remove branch specifications
The branch should be dictated by the repository.
Alessandro Decina d65e6d2bb6
Merge pull request from liyan-ah/main
Allow process to lock memory for eBPF resources.
liyan 288919127c
Update main.rs
liyan 2aeba1b85d
Update {{project-name}}/src/main.rs
Co-authored-by: Alessandro Decina <alessandro.d@gmail.com>
liyan c6ece63d97
Update main.rs
pdliyan 506ce7ec3d make warn info more informative.
pdliyan 0f4584ef7a remove whitespace.
pdliyan d22827603d remove white line.
pdliyan f3eb374c3e remove rlimit use.
pdliyan bc2db6b112 use libc instead of rlimit.
pdliyan f8639db35a add memlock remove.
dependabot[bot] d0e4a02fe2
Merge pull request from aya-rs/dependabot/github_actions/actions/checkout-3
dependabot[bot] 1a1d2b625e
Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Tamir Duberstein b14a75f692 github: add dependabot
Tamir Duberstein 0c06a47bc2 Remove redundant instructions
We just need to install bpf-linker; the rest of this is already encoded
in rust-toolchain.toml.

Fixes .
Tamir Duberstein d6334c269a
github: add rust-cache
Fixes .
Alessandro Decina 69ea57ac54
Merge pull request from aya-rs/fix-tests
Fix sk_msg tests
Tamir Duberstein 3013ab506d
Fix sk_msg tests
These were broken by  which pulled in
https://github.com/aya-rs/aya/pull/397 and other changes which were not
reflected in the templates.
Arindam Das b45787c353
fix: fixes aya and aya-log version mismatch ()
Fixes aya and aya-log version mismatch between {{project-name}}-epbf and {{project-name}} crates.

Fixes https://github.com/aya-rs/aya/issues/565.
Alessandro Decina 8e92b72545
Merge pull request from tamird/actions-rs
Replace actions-rs/toolchain with dtolnay/rust-toolchain
Tamir Duberstein 37654a088e
Replace actions-rs/toolchain with dtolnay/rust-toolchain
See https://github.com/actions-rs/toolchain/issues/216; actions-rs seems
to be unmaintained.
Alessandro Decina 4ce0e28314
Merge pull request from dmitris/nightly-text
sync rustup nightly install directions with Book
Dmitry Savintsev 732b7ea930 sync run nightly install directions with Book
Signed-off-by: Dmitry Savintsev <dsavints@gmail.com>
vadorovsky b00519ff0d
Merge pull request from dmitris/deps-upd
upgrade deps: tokio and anyhow