feat(libSceRudp): report disconnected context queue state #3467

Merged
MarcZX10 merged 1 commit from upstream-pr/3467 into main 2026-10-11 11:51:11 +00:00
MarcZX10 commented 2026-10-11 11:02:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T11:02:49Z.


What

Related to #3073. The current-main import audit for Demon Slayer lists sceRudpGetNumberOfPacketsToRead, sceRudpGetSizeWritable and sceRudpGetSizeReadable among the missing libSceRudp exports. This PR implements these three per-context queries using the console measurements linked in the issue.

  • Before initialization, the calls return 0x80770001 (NOT_INITIALIZED).
  • With an initialized library, a negative context ID returns 0x80770004 (INVALID_ARGUMENT); an unknown or ended context returns 0x80770003 (INVALID_CONTEXT_ID).
  • A valid disconnected context reports 0 packets; readable and writable size queries return 0x80770011 (NOT_ACCEPTABLE).

Tested

  • Linux x86-64, GCC 12.2, Release: built guest_rudp_context_queries_tests; guest_rudp_context_queries passed three consecutive runs.
  • Negative control: the regression test fails with the pre-fix implementation at the negative-context assertion.
  • python3 tools/check_conventions.py --base upstream/main and git diff --check passed.
  • Windows runtime and PS5 were not run locally; the disconnected-context results and error distinctions are based on the PS5 measurements linked in #3073.

Checklist

  • Based on current main (0f863c10); no open PR implements these same exports
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4818576500 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3467). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-11T11:02:49Z. --- ### What Related to #3073. The current-main import audit for Demon Slayer lists `sceRudpGetNumberOfPacketsToRead`, `sceRudpGetSizeWritable` and `sceRudpGetSizeReadable` among the missing `libSceRudp` exports. This PR implements these three per-context queries using the console measurements linked in the issue. - Before initialization, the calls return `0x80770001` (`NOT_INITIALIZED`). - With an initialized library, a negative context ID returns `0x80770004` (`INVALID_ARGUMENT`); an unknown or ended context returns `0x80770003` (`INVALID_CONTEXT_ID`). - A valid disconnected context reports 0 packets; readable and writable size queries return `0x80770011` (`NOT_ACCEPTABLE`). ### Tested - Linux x86-64, GCC 12.2, Release: built `guest_rudp_context_queries_tests`; `guest_rudp_context_queries` passed three consecutive runs. - Negative control: the regression test fails with the pre-fix implementation at the negative-context assertion. - `python3 tools/check_conventions.py --base upstream/main` and `git diff --check` passed. - Windows runtime and PS5 were not run locally; the disconnected-context results and error distinctions are based on the PS5 measurements linked in #3073. ### Checklist - [x] Based on current `main` (`0f863c10`); no open PR implements these same exports - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-11 11:03:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T11:03:14Z.


Progress report (0f863c1 → 58bf763)

📈 System libraries: 85.76% (+0.02%, +3 implemented functions)

✅ 3 implemented
Library Name
libSceRudp sceRudpGetNumberOfPacketsToRead
libSceRudp sceRudpGetSizeReadable
libSceRudp sceRudpGetSizeWritable
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108342995 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3467#issuecomment-6108342995). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T11:03:14Z. --- <!-- progress-report --> ### Progress report (0f863c1 → 58bf763) 📈 **System libraries**: 85.76% (+0.02%, +3 implemented functions) <details> <summary>✅ 3 implemented</summary> | Library | Name | | - | - | | libSceRudp | `sceRudpGetNumberOfPacketsToRead` | | libSceRudp | `sceRudpGetSizeReadable` | | libSceRudp | `sceRudpGetSizeWritable` | </details>
adriadam10 commented 2026-10-11 11:50:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T11:50:47Z.


Checked the three exports against the PS5 measurements in #3073 (not-initialized, -1, unknown/ended id, created-but-disconnected context): all rows match. Build and ctest of core/libs green, guest_rudp_context_queries passes and doesn't link without the change; PR checks green. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108718498 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3467#issuecomment-6108718498). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T11:50:47Z. --- Checked the three exports against the PS5 measurements in #3073 (not-initialized, -1, unknown/ended id, created-but-disconnected context): all rows match. Build and ctest of `core/libs` green, `guest_rudp_context_queries` passes and doesn't link without the change; PR checks green. Merging.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!3467
No description provided.