UCS/NETLINK: Expire kernel route cache entries #12424
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 283 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.338
Real PR Conversation Timeline
1 comments
"Review active on #12424"
general
weight: 0.35
tvegas1
What?
Expire the entries of the kernel route lookup cache used by
UCX_IB_ROCE_REACHABILITY_MODE=kernel, after a new global optionUCX_NETLINK_ROUTE_CACHE_TTL(default1s). As withUCX_IB_AH_CACHE_TTL,infnever expires cached results and0disables the cache.Why?
ucs_netlink_route_get()keptUCS_OKandUCS_ERR_UNREACHABLEresults for the lifetime of the process. A process that once gotUNREACHABLEkept failingucp_ep_create()after the route was added back, while a newly started process connected. Likewise, a cachedUCS_OKsurvived deletion of the route. A long-lived process could therefore not fail over to a path that came back without restarting.How?
0, the lookup goes to the kernel directly, without using the cache.EACCES), the answer is cached asUCS_ERR_UNREACHABLEfor the TTL. When a lookup gets no answer, e.g. because no netlink socket can be created, the previous result is kept and the lookup is done again at the next call. Other kernel errors are not cached.UCS_ERR_NO_RESOURCEwhen they cannot be sent or their reply cannot be received, to tell them apart from kernel error replies, which remainUCS_ERR_IO_ERROR.test_netlink_route_cache.route_changeadds and deletes a route in an unprivileged user and network namespace, and skips where user namespaces are not available, e.g. in CI containers.test_netlink_route_cache.failed_lookupneeds no privileges: it limits the open files of a child process so that lookups fail, and checks that cached results are kept and that a TTL of0bypasses the cache.GTEST_LOG_LEVEL, which Coverity reports since this PR adds a checked call ofucs_global_opts_set_value().