Commit Graph

1504 Commits (dd4ee87d36e026e346b39c2f706f036d5875e71b)
 

Author SHA1 Message Date
pdliyan dd4ee87d36 format
pdliyan b8c43a05dc Use argument results to decide whether or not to read stack_argument.
pdliyan 21f63e052f Merge branch 'main' into new_sarg
pdliyan 0347daeef1 fix build error.
Tamir Duberstein 0cd620a9da
Merge pull request from tamird/deflake-xdp
integration/xdp: increase timeout to 60 seconds
Tamir Duberstein 81268b7ac1
integration/xdp: increase timeout to 60 seconds
There's absolutely no reason to have a short timeout here. This has
resulted in at least one flake:
https://github.com/aya-rs/bpf-linker/actions/runs/6384472390/job/17327196576.
Tamir Duberstein 062ebfdc68
integration/xdp: use kernel-allocated port
Tamir Duberstein 64d9799efc
integration/xdp: reduce repetition
ajwerner c547dd7bcc
Merge pull request from ajwerner/deflake-loaded-at-take-2
integration-test: deflake test_loaded_at
Andrew Werner da832e479d integration-test: deflake test_loaded_at
The test could fail due to the lack of clock monotonicity. This PR
deflakes the test by adding retries.

See
https://github.com/aya-rs/aya/actions/runs/6340369670/job/17221591723.
Tamir Duberstein 4bb52ad34c
Merge pull request from aya-rs/kill-kernel-on-soft-lockup
xtask: terminate QEMU on "BUG: soft lockup"
Tamir Duberstein 5392f9821d
xtask: terminate QEMU on "BUG: soft lockup"
See
https://github.com/aya-rs/aya/actions/runs/6329828507/job/17190931752.

Unlike on kernel panic this message prints periodically so it is
permitted to print twice before QEMU is killed.
pdliyan c627cde89c try fix Cargo.toml
pdliyan da29228da3 fix.
pdliyan f9861aa8cd add riscv support.
pdliyan 59e8098d94 Merge branch 'main' into new_sarg
pdliyan 581225277e add further annotation.
Tamir Duberstein 373fb7bf06
Merge pull request from aya-rs/rustfmt-group-imports
rustfmt: group_imports = "StdExternalCrate"
Tamir Duberstein d16e607fd4
rustfmt: group_imports = "StdExternalCrate"
High time we stop debating this; let the robots do the work.
Tamir Duberstein 67863833ca
Merge pull request from nrxus/fix-kernel-code-on-submode-gt-255
aya: Fix program loading on kernels with a patch > 255
Tamir Duberstein 9eb0419baa
Merge pull request from aya-rs/integration-ebpf-bpf-arch
integration-test: fix when host != target
Tamir Duberstein 15de14383d
integration-test: build eBPF for the proper arch
Prior to this change we neglected to build integration-ebpf for the
correct target architecture, resulting in test failures on arm64.
Tamir Duberstein ad460879ef
integration-test: replace macro with function
There's just no need for a macro here.
Tamir Duberstein 8cee3f8b01
integration-test: distinguish between success and noop
These tests previously produced the same result on certain failures as
they did on success.
Andrés Medina 0a6a2674fa aya: Fix program loading on kernels with a patch > 255
Tamir Duberstein 2f9c67c735
Merge pull request from aya-rs/clippy
appease clippy
Tamir Duberstein fe13b2eb41
xtask: remove useless copy
/tmp/initrd.img is unused.
Tamir Duberstein cbe9cd9133
xtask: appease new clippy warning
```
warning: unnecessary hashes around raw string literal
  --> xtask/src/docs.rs:70:17
   |
70 |           indoc! {r#"
   |  _________________^
71 | |     User-Agent:*
72 | |     Disallow: /
73 | |     "#},
   | |______^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
   = note: `#[warn(clippy::needless_raw_string_hashes)]` on by default
help: remove all the hashes around the literal
   |
70 ~         indoc! {r"
71 |     User-Agent:*
72 |     Disallow: /
73 ~     "},
   |
```

This false negative was fixed in
https://github.com/rust-lang/rust-clippy/pull/11518 (the title
incorrectly says false positive).
Tamir Duberstein 6720e127b6
Merge pull request from aya-rs/fix-ci
Remove 6.4.x kernels from CI
Tamir Duberstein f01845a379
.github: run tests nightly
This should help us catch breakages more quickly.
Tamir Duberstein 6190696346
.github: remove 6.4.x kernel tests
These images keep getting pulled, better to get off the treadmill.
pdliyan 31fb700ad5 fix.
pdliyan b24978955e remove unused struct.
pdliyan 5ed278a766 Merge branch 'main' into new_sarg
pdliyan b3b8d44b91 fix stack_argument test.
dependabot[bot] 8ae5b0d967
Merge pull request from aya-rs/dependabot/cargo/dialoguer-0.11
dependabot[bot] 9680f50c08
build(deps): update dialoguer requirement from 0.10 to 0.11
Updates the requirements on [dialoguer](https://github.com/console-rs/dialoguer) to permit the latest version.
- [Changelog](https://github.com/console-rs/dialoguer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/console-rs/dialoguer/compare/v0.10.0...v0.10.4)

---
updated-dependencies:
- dependency-name: dialoguer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Alessandro Decina 7f9ce062f4
Merge pull request from Tuetuopay/xdpmaps
Implement XDP map types
Tuetuopay 0edc13b4d4 bpf: add a shared try_redirect_map function for XDP maps
Tuetuopay 579e3cee22 aya, bpf: misc fixes following review comments
Andrew Stoycos c130500f18
Merge pull request from astoycos/fix-loaded-at
fix load time
astoycos dffff1ce6b integration-test: fix load time and add test
Time since boot is defined as the UNIX_EPOCH plus the duration
since boot. which is realtime - boottime NOT boottime - realtime.

Add a integration test to ensure this doesn't happen again.

Signed-off-by: astoycos <astoycos@redhat.com>
Tuetuopay 46551de3e7 xtask: bless public-api
Tuetuopay 00dc7a5bd4 maps/xdp: make maps work on kernels not supporting ProgIds
On startup, the kernel is probed for support of chained program ids for
CpuMap, DevMap and DevMapHash, and will patch maps at load time to have
the proper size. Then, at runtime, the support is checked and will error
out if a program id is passed when the kernel does not support it.
Tuetuopay 63ce2f013a bpf/devmap: don't expose `bpf_devmap_value`
Use our own type that:
- is stable as not from bindgen
- does not have an union inside
Tuetuopay c6754c614e maps/xdp: use ProgramFd instead of impl AsRawFd
Not having a generic here allows to pass `None` without specifying the
actual type you don't care about.
Tuetuopay 9ed1d3d281 bpf: add documentation for XDP maps
Tuetuopay db49633073 bpf: make xdp maps functions safe
Values in those map are small enough to return copied values instead of
reference to values.
Tuetuopay f7fbbcd0e5 aya: fix docstring missing trailing period
Tuetuopay 0647927e32 xdp: add support for chained xdp programs in {cpu,dev}map
set/insert functions can now take an optional bpf program fd to run once
the packet has been redirected from the main probe