Skip to content

fix(dfu): buffer 16 pending packets during lazy erase - #76

Merged
jamesarich merged 2 commits into
masterfrom
fix/pending-ring-16
Oct 25, 2026
Merged

jamesarich merged 2 commits into
masterfrom
fix/pending-ring-16

Conversation

@jamesarich

@jamesarich jamesarich commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Checklist

  • PR title specifically describes the change
  • tools/build_all.py (or CI's board matrix) passes

Description of Change

Android streams 244 B packets with PRN 10, so up to 2440 B can be in flight while a page erases, more than the 8-slot ring holds on paper. This doubles the ring, RAM only (about 2.2 KB of .bss).

Measured, the 8-slot ring copes today: the Meshtastic Android app (2.8.4) updated a Wio Tracker L1 3 of 3 times on master's 8-slot ring and 3 of 3 on this 16-slot ring, both at about 9.6 KB/s with no NO_MEM, error notification or retry; a Linux client at 4.3 KB/s was clean on both as well. So this is headroom for a faster client or a slower erase, not a fix for an observed failure.

Summary by CodeRabbit

  • Improvements
    • OTAFIX 2.6 can now buffer up to 16 packets during lazy erase, up from 8, providing more capacity for packet handling.
    • The increased buffer uses approximately 2 KB of additional memory.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d93b4d82-b392-4791-b305-ac579bc88f76
Commits

Reviewing files that changed from the base of the PR and between 8890345 and e29ea03.

Files selected for processing: 2
  • changelog.md
  • lib/sdk11/components/drivers_nrf/pstorage/pstorage_raw.c

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8d6e316c-035d-42ba-a300-b6b25f8b1477
Commits

Reviewing files that changed from the base of the PR and between d4f5dda and 8890345.

Files selected for processing: 2
  • changelog.md
  • lib/sdk11/components/drivers_nrf/pstorage/pstorage_raw.c

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The lazy-erase packet buffer capacity increases from 8 to 16 packets. Its comment describes the client PRN interval requirement, and the changelog notes an approximate additional 2 KB .bss cost.

Changes: Lazy-erase packet capacity

Layer / File(s) Summary
Buffer capacity and documentation
lib/sdk11/components/drivers_nrf/pstorage/pstorage_raw.c, changelog.md
PENDING_PACKET_COUNT changes from 8 to 16. Its comment describes the client PRN interval requirement and gives Android and Apple examples. The changelog records the new capacity and approximate .bss cost.

Priority: Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Feature

Suggested reviewers: oltaco, rcarteraz

Merge Risk: Minimal · up to 88903

The 16-packet buffer change is ready to merge with no identified correctness or operational risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: increasing the DFU lazy-erase pending-packet buffer to 16 packets.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the packet store,
Sixteen wait beside the door.
The erase moves at a gentle pace,
More packets find a holding place.
Two kilobytes join the .bss lore,
Then hops away to review once more.

Comment @coderabbitai help to get the list of available commands.

@jamesarich

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@jamesarich

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@jamesarich

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@jamesarich
jamesarich added this pull request to the merge queue Oct 25, 2026
Merged via the queue into master with commit 6ea35ec Oct 25, 2026
23 checks passed
@jamesarich
jamesarich deleted the fix/pending-ring-16 branch October 25, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant