Implement LibSsl2, Net_1_Http2 and NetGetMemoryPoolStats #2028
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!2028
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2028/head"
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?
@Ekt0re on GitHub · 2026-10-31 19:11 UTC · original
Ekt0re:Implement-LibSsl2,-Net_1_Http2-and-NetGetMemoryPoolStats→main· +258 −77 · 3 files · 2 commits · closed without mergingImplement missing
Http2,SslandNetimports (sceHttp2AbortRequest,sceHttp2SetResolveRetry,sceHttp2GetMemoryPoolStats,sceSslGetMemoryPoolStats,sceNetGetMemoryPoolStats)Summary
This PR adds five missing
libSceNet-family exports and registers theSsllibrary under theSsl_v2.1version, which the game imports.IZ-qjhRqvjksceHttp2AbortRequestLibHttp2::Http2AbortRequestotUQuZa-mv0sceHttp2GetMemoryPoolStatsLibHttp2::Http2GetMemoryPoolStatsGcjh+CisAZMsceHttp2SetResolveRetryLibHttp2::Http2SetResolveRetry-PoIzr3PEk0sceSslGetMemoryPoolStatsLibSsl::SslGetMemoryPoolStatsrMyh97BU5pYsceNetGetMemoryPoolStatsLibNet::NetGetMemoryPoolStatsIssues:
Background
HOT WHEELS™ Infinite Rush (PPSA22408) stops at the logo screen because of these unresolved imports (build KytyPS5-2026-10-31-0261891):
All five functions also exist in shadPS4 (
http.cpp,http2.cpp,ssl.cpp,net.cpp). The behavior was taken from there and adapted to KytyPS5's existing code. Where shadPS4 only has a stub, this PR does a little more where the existing state allows it.Changes
Net (
src/libs/libNet.cpp,src/libs/network.cpp)Network::PoolGetSize(int memid, int* size), which looks up a pool under the network mutex.Net::NetGetMemoryPoolStats(int memid, NetMemoryPoolStats* stats):stats == nullptr→NET_ERROR_EINVALNET_ERROR_EBADFpool_sizewith the pool size and setsmax_inuse_size,current_inuse_sizeandreservedto0.LibNet::NetGetMemoryPoolStatswrapper (FinishNetCall) and registered NIDrMyh97BU5pY.Ssl (
src/libs/libNet.cpp)SslGetMemoryPoolStats(int ssl_ctx_id, void* stats). The pool is not tracked, so it zeroes the output structure (if provided) and returnsOK.-PoIzr3PEk0in the existingSslv1 module.LibSsl2module (LIB_VERSION("Ssl", 1, "Ssl", 2, 1)), withInitNet_2_Sslcalled fromInitNet_1. It registers the same four existing Ssl functions (SslInit,SslTerm,SslGetCaCerts,SslFreeCaCerts) plusSslGetMemoryPoolStats, so the game'sSsl_v2.1imports resolve.Http2 (
src/libs/libNet.cpp)Http2SetResolveRetry(int id, int32_t retry): added aresolve_retryfield toHttp2Optionsand stores the value. ReturnsHTTP2_ERROR_INVALID_IDfor an unknown id. The value is stored but not yet used by the resolver.Http2AbortRequest(int req_id):send_resultandasync_resulttoHTTP2_ERROR_TIMEOUTand returns0;Network::Http::HttpAbortRequest, the same fallback as shadPS4.Http2GetMemoryPoolStats(int ctx_id, void* stats): fillspool_sizefrom the matching HTTP/2 context (or0if the context is unknown), zeroes the other fields and returns0.IZ-qjhRqvjk,otUQuZa-mv0andGcjh+CisAZMinInitNet_1_Http2.Differences from shadPS4
sceNetGetMemoryPoolStatschecksstats == nullptrbefore the pool lookup, so a null pointer with an invalid pool returnsEINVAL, while shadPS4 returnsEBADF.sceHttp2SetResolveRetryandsceHttp2GetMemoryPoolStatskeep some state here; shadPS4 implements both as plain stubs.sceHttp2GetMemoryPoolStatsreturns0even when the context id is unknown.sceSslGetMemoryPoolStatsis a stub that only zeroes the output, like shadPS4's stub.Known limitations
max_inuse_sizeandcurrent_inuse_sizeare always0.Http2AbortRequestonly updates the stored results of an HTTP/2 request. It does not cancel an in-flight transfer.resolve_retryis stored but not applied.Formatting
The diff also contains whitespace-only changes in
libNet.cppandnetwork.cpp(alignment and line wrapping from the formatter). They do not change behavior.Testing
@coderabbitai[bot] on GitHub · 2026-10-31 19:15 UTC · original · edited 2026-10-31 21:39 UTC
No actionable comments were generated in the recent review.
fd20de67-e273-49e9-81c1-72464e80e32eReviewing files that changed from the base of the PR and between
1d56d0303aande9fed6bbd2.src/libs/libNet.cppsrc/libs/network.cppsrc/libs/network.hIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Walkthrough
The change adds network memory-pool statistics and exposes them through the Net library. It adds SSL memory-pool statistics for SSL versions 1 and 2, and registers SSL version 2 initialization. It also adds HTTP/2 resolve-retry configuration, abort handling, and memory-pool statistics. The remaining code changes reformat existing declarations and expressions or add byte-order marks.
Suggested reviewers:
nmzikChange: Feature
Merge Risk:
Minimal · up to
e9fedThis change adds missing network, SSL and HTTP/2 statistics, retry and abort exports, and the SSL v2 module registration. No concrete merge-blocking risk remains in the supplied context. The size of the Net statistics structure in the guest ABI has not been confirmed.
Pre-merge checks:
4 ·
1
Full details: Docstring Coverage
Explanation
Docstring coverage is 3.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 30 functions across 3 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
@coderabbitai[bot] on GitHub · 2026-10-31 19:15 UTC · original · edited 2026-10-31 21:34 UTC
On
src/libs/libNet.cppline 298 (outdated):Report the configured SSL pool size.
Network::SslInitstores a nonzero pool size, but this function reports zero for every SSL context. It also returnsOKfor a terminated or unknown context. Look upssl_ctx_id, returnSSL_ERROR_INVALID_IDwhen it is invalid, and report its stored size when it is valid. (raw.githubusercontent.com)✅ Addressed in commit
e9fed6b@coderabbitai[bot] on GitHub · 2026-10-31 19:15 UTC · original · edited 2026-10-31 21:34 UTC
On
src/libs/libNet.cppline 1532 (outdated):Keep HTTP/2 abort errors in the HTTP/2 error domain.
If
req_idis not a tracked HTTP/2 request, this call returns an HTTP error for an unknown ID. It can also return success for an unrelated, valid HTTP request ID without changing the HTTP/2 request state. ReturnHTTP2_ERROR_INVALID_IDfor an untracked HTTP/2 ID, or translate the delegated result if cross-library IDs are intentional. (raw.githubusercontent.com)✅ Addressed in commit
e9fed6b@ -1420,6 +1450,29 @@ int KYTY_SYSV_ABI NetPoolDestroy(int memid) {return OK;}int KYTY_SYSV_ABI NetGetMemoryPoolStats(int memid, Net::NetMemoryPoolStats* stats) {@coderabbitai[bot] on GitHub · 2026-10-31 19:15 UTC · original · edited 2026-10-31 21:35 UTC
Declare the Net statistics type and function before using them.
At the reviewed revision,
src/libs/network.hcontains neitherNet::NetMemoryPoolStatsnor a declaration ofNet::NetGetMemoryPoolStats. This definition cannot compile because the parameter type is unknown. The new wrapper insrc/libs/libNet.cppalso needs both declarations. Add the shared struct and function declaration tosrc/libs/network.h. (raw.githubusercontent.com)✅ Addressed in commit
e9fed6b@coderabbitai[bot] on GitHub · 2026-10-31 19:16 UTC · original · reviewed
Actionable comments posted: 3
39ea61fa-14b8-48ef-b830-b759bc6ec82eReviewing files that changed from the base of the PR and between
026189166fand1d56d0303a.src/libs/libNet.cppsrc/libs/network.cppsrc/libs/network.hIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
@Nmzik on GitHub · 2026-11-04 01:22 UTC · original
Merged only Http2GetMemoryPoolStats
Pull request closed