Repository navigation
Conversation
sceNetGetSockInfo always reported 0 in recv_queue_length, so a title that reads a socket only when its record shows queued data never reads. The record now carries the host's FIONREAD count; a socket the host refuses FIONREAD for keeps 0, the value a PS4 Pro on firmware 10.71 reports for an empty queue. The datagram difference between hosts and the other measured values of the record are recorded as technical debt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The console shares one descriptor space between the kernel socket calls and libSceNet, and sceNetGetSockInfo on a PS4 Pro (firmware 10.71) describes and lists a socket made with socket() as it does one made with sceNetSocket. AnyPS5 answered EBADF for such a descriptor and left it out of the s < 0 list. libkernel now describes one of its sockets (native handle with its owner, family, type, non-blocking mode) and lists its descriptors; sceNetGetSockInfo reads its own table first and the kernel's otherwise, without adopting the socket into libSceNet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nfo-kernel-sockets
|
I reviewed the descriptor lookup/listing changes and the new The PR reports |
|
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.
|
|
I tested the combined network changes on main The reproducible integration tree is After rebuilding libc, libkernel, libSceNet and the eight test targets:
The tests were guest_net_socket_state, guest_net_protocol, guest_net_buffer_validation, guest_net_boolean_readback, guest_sce_net_keepalive, guest_net_oob_inline, guest_sce_net and guest_net_nodelay_readback. Conventions and whitespace checks pass too. This supplies combined runtime evidence for the agreed ordering, including your kernel-created socket records. It is a focused local integration run; full hosted CI, a title and console hardware were not run. The remaining #6044/#5836 coordination is unchanged. |
MarcZX10
left a comment
There was a problem hiding this comment.
The new integration evidence answers my earlier Linux test request: the reported Windows 8/8 and WSL2 8/8 focused runs include this PR alongside #9932, #9930, #9931 and the other listed network changes, and retain the kernel-created socket record coverage. I also reran current-main whitespace and conventions checks; both pass.\n\nOne remaining integration gap: the branch is 5 commits ahead and 264 behind current main (merge base 895f47f4), while current main has since advanced libSceNet/Export.cpp and docs/dev/debt/libSceNet.md, both files changed here. The PR’s integration run is based on b7a451d, not current main. Please refresh on current main, preserve the already-merged queue-length and network changes in Export.cpp, and rerun the focused socket-info tests on the refreshed head. The KernelDescribeSocket owner lifetime and descriptor listing logic otherwise look sound in this pass; I found no separate defect.
MarcZX10
left a comment
There was a problem hiding this comment.
Please rebase/merge current main and rerun the focused guest_sce_net coverage. The branch is 264 commits behind (merge base 895f47f4), and current main has intervening edits in both libSceNet/Export.cpp and docs/dev/debt/libSceNet.md, which this PR changes. The reported 8/8 Windows + WSL2 integration run is useful and covers the dependency network changes, but used main b7a451d, so it does not validate this PR integrated with today’s sceNetGetSockInfo queue-length and related network updates. Current-main diff-check and conventions pass; this request is specifically for resolving those shared-file updates and retesting the final head.
…unts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nfo-kernel-sockets # Conflicts: # docs/dev/debt/libSceNet.md
|
Thanks for the review. I merged current Thanks also for counting Queuse's Windows and WSL2 integration run as the Linux evidence. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nfo-kernel-sockets # Conflicts: # docs/dev/debt/libSceNet.md
|
Updated to 1d95b47: merged the refreshed #9932 (641b92a, with |
What
On the console the kernel socket calls and libSceNet share one descriptor space:
sceNetGetSockInfodescribes a socket made withsocket()exactly like one made withsceNetSocket, and lists it whensis below 0. AnyPS5 answeredEBADFfor such a descriptor and left it out of the list, because libSceNet only looked in its own table. Knowledge is Power: Decades (CUSA12435) callssceNetGetSockInfoon its PlayLink server socket, which it makes withsocket(), right after binding it, and reads from it only whenrecv_queue_lengthis not 0 (#9932).libkernel now exports two helpers next to
KernelLookupSocketNative_nid_no_patch:KernelDescribeSocket_nid_no_patchreturns one of its sockets' native handle together with the owner that keeps it open, its family, type and non-blocking mode, andKernelListSockets_nid_no_patchlists its descriptors.sceNetGetSockInforeads its own table first and the kernel's otherwise, and merges both into the sorted list. The socket is not adopted into libSceNet's table, so closing it withclose()leaves nothing stale behind. Other sceNet calls on such a socket still answerEBADF; the debt entry says so.sock_buffer_sizenow takes the record's source (native handle and configured sizes) instead of aSock; #8362 calls it with aSockin its newfill_sock_info6, so whichever of the two lands second needs that call adapted.guest_sce_netgains rows for a UDP socket made withsocket_nid_postfixand bound to 127.0.0.1: its record (descriptor, type 2, address, port,SELFflag, buffer sizes), its place in the list, andEBADFafterclose_nid_postfix. With the oldExport.cpp,SocketPoll.hppandUdp.cppthe test aborts at the first new row.Tested
Windows 11, MinGW-w64 GCC (winlibs), Ninja:
guest_sce_netpassed on the final head (659962c,main895f47f),python tools/check_conventions.py --base origin/mainpasses. Measured on a PS4 Pro (firmware 10.71) with a homebrew probe: a bound UDP socket fromsocket()and one fromsceNetSocketboth return 1 with a full record, andsceNetGetSockInfo(-1, NULL, 0, 0)counts both:Not run with a title.
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)