Compare commits

..

No commits in common. '0780eef640bf5a245f3d86d4a8f6e0fc9236ba29' and '28ae4b9826b57671d7e748a90fc3a5d7687cda53' have entirely different histories.

@ -32,7 +32,7 @@ jobs:
- run: git ls-files -- '*.c' '*.h' | xargs clang-format --dry-run --Werror - run: git ls-files -- '*.c' '*.h' | xargs clang-format --dry-run --Werror
- uses: DavidAnson/markdownlint-cli2-action@v22 - uses: DavidAnson/markdownlint-cli2-action@v21
- run: taplo fmt --check - run: taplo fmt --check
@ -47,7 +47,7 @@ jobs:
if: ${{ !(github.event_name == 'schedule' && github.repository == 'aya-rs/aya') }} if: ${{ !(github.event_name == 'schedule' && github.repository == 'aya-rs/aya') }}
- run: cargo xtask public-api --bless - run: cargo xtask public-api --bless
if: ${{ (github.event_name == 'schedule' && github.repository == 'aya-rs/aya') }} if: ${{ (github.event_name == 'schedule' && github.repository == 'aya-rs/aya') }}
- uses: peter-evans/create-pull-request@v8 - uses: peter-evans/create-pull-request@v7
if: ${{ (github.event_name == 'schedule' && github.repository == 'aya-rs/aya') }} if: ${{ (github.event_name == 'schedule' && github.repository == 'aya-rs/aya') }}
with: with:
# GitHub actions aren't allowed to trigger other actions to prevent # GitHub actions aren't allowed to trigger other actions to prevent
@ -351,7 +351,7 @@ jobs:
--git https://github.com/aya-rs/bpf-linker.git bpf-linker \ --git https://github.com/aya-rs/bpf-linker.git bpf-linker \
--no-default-features --features "llvm-21,${LLVM_LINK_FEATURE}" --force --no-default-features --features "llvm-21,${LLVM_LINK_FEATURE}" --force
- uses: actions/cache@v5 - uses: actions/cache@v4
with: with:
path: test/.tmp path: test/.tmp
key: ${{ runner.arch }}-${{ runner.os }}-test-cache-${{ matrix.download-kernel-images }} key: ${{ runner.arch }}-${{ runner.os }}-test-cache-${{ matrix.download-kernel-images }}

@ -42,7 +42,7 @@ jobs:
working-directory: xtask/libbpf working-directory: xtask/libbpf
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- uses: peter-evans/create-pull-request@v8 - uses: peter-evans/create-pull-request@v7
if: ${{ github.repository == 'aya-rs/aya' }} if: ${{ github.repository == 'aya-rs/aya' }}
with: with:
# GitHub actions aren't allowed to trigger other actions to prevent # GitHub actions aren't allowed to trigger other actions to prevent

@ -231,14 +231,18 @@ async fn ring_buf_async_with_drops() {
// Make sure that there is nothing else in the ring_buf. // Make sure that there is nothing else in the ring_buf.
assert_matches!(async_fd.into_inner().next(), None); assert_matches!(async_fd.into_inner().next(), None);
let max_dropped: u64 = let max_dropped: u64 = u64::try_from(
u64::try_from(data.len().saturating_sub(RING_BUF_MAX_ENTRIES - 1)).unwrap(); data.len()
.checked_sub(RING_BUF_MAX_ENTRIES - 1)
.unwrap_or_default(),
)
.unwrap();
let max_seen = u64::try_from(data.iter().filter(|v| *v % 2 == 0).count()).unwrap(); let max_seen = u64::try_from(data.iter().filter(|v| *v % 2 == 0).count()).unwrap();
let max_rejected = u64::try_from(data.len()).unwrap() - max_seen; let max_rejected = u64::try_from(data.len()).unwrap() - max_seen;
let Registers { dropped, rejected } = regs.get(&0, 0).unwrap().iter().sum(); let Registers { dropped, rejected } = regs.get(&0, 0).unwrap().iter().sum();
let total = u64::try_from(data.len()).unwrap(); let total = u64::try_from(data.len()).unwrap();
let min_seen = max_seen.saturating_sub(max_dropped); let min_seen = max_seen.checked_sub(max_dropped).unwrap_or_default();
let min_rejected = max_rejected.saturating_sub(dropped); let min_rejected = max_rejected.checked_sub(dropped).unwrap_or_default();
let facts = format!( let facts = format!(
"seen={seen}, rejected={rejected}, dropped={dropped}, total={total}, max_seen={max_seen}, \ "seen={seen}, rejected={rejected}, dropped={dropped}, total={total}, max_seen={max_seen}, \
max_rejected={max_rejected}, max_dropped={max_dropped}", max_rejected={max_rejected}, max_dropped={max_dropped}",

Loading…
Cancel
Save