feat(libSceRudp): implement sceRudpNetReceived and sceRudpEnableInternalIOThread2 #7087

Merged
Aryansh1520 merged 3 commits from upstream-pr/7087 into main 2026-10-19 17:49:43 +00:00
Aryansh1520 commented 2026-10-17 10:56:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Aryansh1520 on 2026-10-17T10:56:49Z.


What

  • sceRudpNetReceived now returns RUDP_ERROR_NOT_INITIALIZED before sceRudpInit and 0 after it, the same as sceRudpNetFlush: no packets are ever received offline. It replaces the NotImplemented stub.
  • sceRudpGetOption is declared with (int ctx_id, int option, void* value, uint32_t len), the shape its PPSA06888 call sites use: the plugin's wrappers pass their first three arguments through and set len to 4. It still throws, because the option codes, defaults and error results are unknown.
  • sceRudpEnableInternalIOThread2 takes (uint32_t stack_size, uint32_t priority, uint64_t affinity), from the managed SceRudp.Rudp.EnableInternalIOThread(uint, uint, ulong) in PPSA06888's Unity metadata. Like sceRudpEnableInternalIOThread it returns success after sceRudpInit and RUDP_ERROR_NOT_INITIALIZED before it, without starting a thread.
  • The libSceRudp debt entry records what remains: sceRudpGetRemoteInfo still has no known signature.
  • GuestRudpPump now checks the new sceRudpNetReceived and sceRudpEnableInternalIOThread2 return codes instead of expecting them to throw.

Tested

Linux (CachyOS), full build: libSceRudp and the guest_rudp_status, guest_rudp_context_queries and guest_rudp_pump tests pass (3/3). tools/check_conventions.py --base origin/main passes. tools/pr_overlap.py --branch new-topic reports no overlap. Not run against a title.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (no AGC, shader recompiler or VideoOut change)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4899488964 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7087). Originally posted by [Aryansh1520](https://github.com/Aryansh1520) on 2026-10-17T10:56:49Z. --- ### What - `sceRudpNetReceived` now returns `RUDP_ERROR_NOT_INITIALIZED` before `sceRudpInit` and 0 after it, the same as `sceRudpNetFlush`: no packets are ever received offline. It replaces the `NotImplemented` stub. - `sceRudpGetOption` is declared with `(int ctx_id, int option, void* value, uint32_t len)`, the shape its PPSA06888 call sites use: the plugin's wrappers pass their first three arguments through and set `len` to 4. It still throws, because the option codes, defaults and error results are unknown. - `sceRudpEnableInternalIOThread2` takes `(uint32_t stack_size, uint32_t priority, uint64_t affinity)`, from the managed `SceRudp.Rudp.EnableInternalIOThread(uint, uint, ulong)` in PPSA06888's Unity metadata. Like `sceRudpEnableInternalIOThread` it returns success after `sceRudpInit` and `RUDP_ERROR_NOT_INITIALIZED` before it, without starting a thread. - The libSceRudp debt entry records what remains: `sceRudpGetRemoteInfo` still has no known signature. - `GuestRudpPump` now checks the new `sceRudpNetReceived` and `sceRudpEnableInternalIOThread2` return codes instead of expecting them to throw. ### Tested Linux (CachyOS), full build: `libSceRudp` and the `guest_rudp_status`, `guest_rudp_context_queries` and `guest_rudp_pump` tests pass (3/3). `tools/check_conventions.py --base origin/main` passes. `tools/pr_overlap.py --branch new-topic` reports no overlap. Not run against a title. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a (no AGC, shader recompiler or VideoOut change) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-17 10:57:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T10:57:28Z.


Progress report (a1dfc73 → f533fef)

📈 System libraries: 81.71% (+0.04%, +2 implemented functions)

✅ 2 implemented
Library Name
libSceRudp sceRudpEnableInternalIOThread2
libSceRudp sceRudpNetReceived
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233087076 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7087#issuecomment-6233087076). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T10:57:28Z. --- <!-- progress-report --> ### Progress report (a1dfc73 → f533fef) 📈 **System libraries**: 81.71% (+0.04%, +2 implemented functions) <details> <summary>✅ 2 implemented</summary> | Library | Name | | - | - | | libSceRudp | `sceRudpEnableInternalIOThread2` | | libSceRudp | `sceRudpNetReceived` | </details>
github-actions[bot] commented 2026-10-17 11:21:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T11:21:55Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 7495 docs/dev/debt/libSceRudp.md L12-14

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestRudpPump.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233296256 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7087#issuecomment-6233296256). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T11:21:55Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 7495](https://www.github.com/boykopovar/AnyPS5/pull/7495) | `docs/dev/debt/libSceRudp.md` [L12-14](https://github.com/boykopovar/AnyPS5/blob/3bb15be094789fb52cb69243e458e7f422fae211/docs/dev/debt/libSceRudp.md#L12-L14) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestRudpPump.cpp` |
blawesom commented 2026-10-17 18:53:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-17T18:53:51Z.


Rebase handoff — rebased onto current main (authorship unchanged). One docs-debt conflict, unioned.

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; conventions pass; full suite green apart from the known main regression (agc_driver_tessellation segfault — Mesa, #5444), not this PR.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/7087
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is 61031d813.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6238983658 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7087#issuecomment-6238983658). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-17T18:53:51Z. --- **Rebase handoff** — rebased onto current `main` (authorship unchanged). One docs-debt conflict, unioned. Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): builds; conventions pass; **full suite green apart from the known `main` regression** (`agc_driver_tessellation` segfault — Mesa, #5444), not this PR. **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/7087 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `61031d813`.
blawesom commented 2026-10-17 18:54:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-17T18:54:24Z.


Correction: the first push of rebase/7087 was mid-rebase (one more conflicted commit remained). The complete series is now pushed — all commits, authorship unchanged, head 8c5170aaf, full suite green apart from the known main regression (agc_driver_tessellation, Mesa #5444), conventions pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6238993041 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7087#issuecomment-6238993041). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-17T18:54:24Z. --- Correction: the first push of `rebase/7087` was mid-rebase (one more conflicted commit remained). The complete series is now pushed — all commits, authorship unchanged, head `8c5170aaf`, full suite green apart from the known `main` regression (`agc_driver_tessellation`, Mesa #5444), conventions pass.
adriadam10 commented 2026-10-19 17:51:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T17:51:19Z.


Checked the Rudp changes against sceRudpNetFlush/sceRudpEnableInternalIOThread and the pump test (before and after sceRudpInit). Pushed one commit cleaning docs/dev/debt/libSceRudp.md: a stale entry and three duplicated ones sat after a blank line, now one entry per function. Partial ctest on the rebased tree passes; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6273614058 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7087#issuecomment-6273614058). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T17:51:19Z. --- Checked the Rudp changes against `sceRudpNetFlush`/`sceRudpEnableInternalIOThread` and the pump test (before and after `sceRudpInit`). Pushed one commit cleaning `docs/dev/debt/libSceRudp.md`: a stale entry and three duplicated ones sat after a blank line, now one entry per function. Partial ctest on the rebased tree passes; merged.
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!7087
No description provided.