feat(libSceNet): support SO_KEEPALIVE #9523
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9523"
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 Queuse on 2026-10-22T00:13:47Z.
What
Implement
SO_KEEPALIVEinsceNetSetsockoptandsceNetGetsockopt: TCP configures the host socket; non-stream sockets retain the flag without probes. Readback returns the FreeBSD flag bit (8) and truncates to the supplied output length.Semantics follow FreeBSD 11.4 sosetopt/sogetopt and the Windows SO_KEEPALIVE contract. Host timer differences and unverified console behavior remain in library debt.
Tested
Windows 11 x86-64, WinLibs MinGW-w64 GCC 15.2.0-r7, Ninja, Release. Head
01b7dbaa7fincludes mainb4d8e8bb3b.guest_sce_net_keepalive,guest_net_protocol,guest_net_nodelay_readbackandguest_net_buffer_validation: 4/4 pass, no skips.19fe176ddcare clean. Its later closed-stream polling, IPv6 text and unrelated libc/kernel changes are outside these option paths; the local runtime results above belong to the stated head/base.Integration order remains #9523 → #9542 → #9515 → #9578 and #9525 → #9543. #9930 and #9931 are now merged, so their former prerequisites for #9932/#9948 are satisfied; #9948 still follows #9932. #6044 was closed without merging the test relocation. #10097 follows #9523 as its author confirmed. The #5836 peer/broadcast order remains a proposal. The #9525/#10949 intersection concerns CMake test registration, with no option-behavior dependency; the author of #10949 confirmed #9525-first and declared
Depends on: #9525.Canonical overlap snapshot
7e4f6e0440: confirmed intersections with #10097. 7 comparisons remain incomplete because those branches conflict with the base: #5836, #7201, #9727, #9733, #9932, #9948, #10502. Manual inspection covers peer/broadcast transport mapping, macOS paths, argument validation, socket records and diagnostic output. Preserve every option path, field, canonical declaration, fixture and debt entry during integration; these checks do not establish a combined runtime pass with the conflicting branches.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T00:28:12Z.
Review: APPROVED
The implementation tracks the guest boolean and applies it to host TCP sockets, while preserving per-socket readback for non-stream sockets; the bit-valued readback and short-buffer behavior follow the cited FreeBSD model. The author-reported Windows test covers IPv4/IPv6 TCP/UDP, host TCP option state, accepted-socket inheritance, invalid arguments and socket isolation. The existing resolver timeout is reported on both main and this change. Current eligibility, conventions, intake, labels and report checks pass; hosted product/relinker jobs are skipped. I did not run a local test. I also checked that this PR and #9525 merge together cleanly.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T04:18:56Z.
Review: DISMISSED
My earlier implementation review and reported Windows coverage remain applicable, but the refreshed overlap report flags shared CMakeLists.txt, Export.cpp, and debt-file paths with #9506, #9525, #9542, #9543 and #9544, plus additional conflicted-base comparisons. The prior direct merge check with #9525 does not clear the newly reported candidates. Please compare the exact hunks, coordinate order with affected authors where required, record prerequisites in Depends on, and rerun the overlap check after rebasing. I’m requesting changes for the repository’s overlap/coordination rule; this is not a new behavior finding. Policy checks pass, product jobs are skipped, and I did not rerun local tests.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:41:19Z.
Current-head recheck: this branch is 2 ahead / 119 behind today’s
main(basea6dcea927); its individual merge, diff-check and conventions pass. Pairwise merges are clean with #9525, #9543, #9544, #9506 and #8362; #9542 conflicts inExport.cpp, and #9542 correctly declaresDepends on: #9523. Please preserve that order, finish the remaining overlap coordination from the current scanner report, and refresh this branch onto currentmainbefore rerunning the focused keepalive test. The Windows test and baseline timeout are author-reported; I did not run local network tests.Imported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-22T13:24:58Z.
Review: COMMENTED
Checked against main
830ccd121f, FreeBSD 11.4sogetopt/sosetopt(sys/kern/uipc_socket.c), and main's libkernelGuestSockets::GetSocketLevelOption/SetSocketLevelOption:GuestKeepAlivehandling: readback is bit8, short buffers are truncated, and the flag is stored without host probes on non-stream sockets. Since inheritance on accepted sockets comes from the host socket, there's no need to copy the newkeepalivefield insceNetAccept.SO_KEEPALIVEdebt bullet lands under### Unknown function infoindocs/dev/debt/libSceNet.md(line 27, just above### Functional). That heading is for unknown or assumed signatures (seedocs/dev/TechnicalDebt.md). Could it move to### Functional, next to theTCP_NODELAYandSO_ONESBCASTentries, where #9525 puts itsSO_TYPE/SO_ACCEPTCONNentry?git merge-file, this branch merges cleanly onto current main, and cleanly together with #9525.Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.