feat(http2): complete asynchronous sends and reads that pass no kernel queue #11900
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11900"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-27T12:21:35Z.
What
#11630 completes
sceHttp2SendRequestAsyncandsceHttp2ReadDataAsyncwhen the caller passes a kernel-queue option. A nullkqueue_optionstill goes toNotImplemented_nid_no_patch, which edubox left for a follow-up (comment). This is that follow-up.With a null
kqueue_option, both calls now start the same worker and queue the completion forsceHttp2WaitAsync, without triggering a user event. A non-nulloptionstill throws.Crimson Desert (PPSA25286 01.000.568) uses this form. In its relinked
eboot.bin:sceHttp2SendRequestAsync(0x3043c2f) passeskqueue_optionNULL andoptionNULL;sceHttp2ReadDataAsync(0x304591a) passes a 0x2000-byte buffer,kqueue_optionNULL andoptionNULL;sceHttp2WaitAsync(0x304594a).On
main, and on #11630 alone, the title stops 1 s after launch atsceHttp2SendRequestAsync not implemented. That's in all 7 of my runs (details on #11630).How
core/libs/prx/libSceHttp2/Export.cpp(on #11630):CompleteAsynctakes the kqueue option asstd::optional<Http2AsyncOption>and triggerssceKernelTriggerUserEventonly when one was given. The completion is queued under the same per-request lock either way, so retirement andsceHttp2WaitAsyncbehave as in #11630.sceHttp2SendRequestAsyncandsceHttp2ReadDataAsyncrefuse only a non-nulloptionand copy the kqueue option when there is one.docs/dev/debt/libSceHttp2.mdgets a new entry for the queueless form, 542 characters. The existing asynchronous-requests entry is already over the length limit, so the new form gets its own entry.core/libs/tests/GuestHttp2Transport.cppaddsAsyncWithoutQueue, run with and without TLS likeAsync:sceHttp2WaitAsyncmust return the send (event type 0, result 0), then the read (event type 1, 13 bytes, "response body").Tested
Rebased onto #11630's head
501f70bd1f(#11630 rebased ontomain0cd07dc4ab) as3e774e636d. The rebase was clean and the patch is unchanged. Linux (Ubuntu 26.04, GCC 15.2), Release:guest_http2andguest_http2_transportpass 3 of 3 at3e774e636d.The previous rebase, onto
ec16afa08das381b728b72, was also clean with the patch unchanged. Linux (Ubuntu 26.04, GCC 15.2), Release: the sixguest_http2*tests (ctest -R '^guest_http2', transport, cookies, options and teardown included) pass 3 of 3 at this head. On the Windows 11 VM (GT 1030, WinLibs GCC 15.2, Release), the fourguest_http2*test targets I built (six ctest entries) pass 3 of 3 at this head and at its base. I left the teardown target out of that build.Before the rebase:
cmake --build build --target guest_http2_transport_testsandctest -R '^guest_http2_transport' --repeat until-fail:3passed 3 of 3 atbfbc6ef86a(on #11630's3e8c533a37), and so didguest_http2.As a red control, #11630's head with only this PR's
AsyncWithoutQueuescenario fails. The scenario aborts withsceHttp2SendRequestAsync not implemented, the same stop as Crimson Desert.Crimson Desert (release libs of this change on #11630's previous head
908dc81b00, same code change, cold shader cache, my no-network sandbox, RTX 4070 Ti): the title gets past the asynchronous send. It stops 1 s in at the DNS lookup,sceHttp2: DNS failed; console error mapping is unknown not implemented. MXGP 26 stops at the same place in this sandbox (see #11630). On a connected machine I'd expect the lookup to succeed; I can't run that here.Windows (Windows 11 VM, GeForce GT 1030, WinLibs GCC 15.2, Release), merge base
main14332cd8d0against53a47e85d1(this patch, unchanged by the later rebase onto3e8c533a37), 3 runs each:guest_http2_transportandguest_http2pass in every run on both sides. Earlier heads failedguest_http2_transportthere in #11630's ownAsyncscenario. Its 2 s wait was shorter than Windows' ~2.3 s refusal of the::1loopback thatlocalhostresolves to first (details). #11630's9f2b22a27bextends that wait to 10 s.tools/check_conventions.py --base upstream/mainpasses, apart from the pre-existing length warning on the asynchronous-requests entry.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)ec16afa08d)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T12:35:53Z.
Review: COMMENTED
I reviewed the incremental no-kernel-queue path and its transport tests at
9be15dc98515a04842fb7840c6892cd3047ca148. The local Linux build ofguest_http2_transport_testssucceeded. Native execution is blocked by this host CPU guard (E5-1620 v2 lacks AVX2/FMA/LZCNT/BMI); running the exact test binary under QEMU Haswell completed successfully, including the queueless send/read and asynchronous deletion/publication scenarios. Hosted Windows and policy checks pass; hosted Linux is skipped by repository policy. The PR explicitly depends on #11630 and includes its commits in the stack, so this comment reviews the follow-up behavior and test evidence; I am not treating it as approval of the full stack before the prerequisite is reviewed/lands.Pull request closed