answer the Gx RAA before the work it implies - #62
Merged
Conversation
This was referenced Jul 26, 2026
next-nf
force-pushed
the
async-gate-step5-teardown
branch
from
July 27, 2026 11:44
584827d to
efaa53b
Compare
next-nf
force-pushed
the
async-gate-rar-raa
branch
from
July 27, 2026 11:44
1174ee7 to
d8bd9b6
Compare
next-nf
force-pushed
the
async-gate-step5-teardown
branch
from
July 27, 2026 12:16
efaa53b to
7d593ff
Compare
next-nf
force-pushed
the
async-gate-rar-raa
branch
from
July 27, 2026 12:16
d8bd9b6 to
ff6e8ff
Compare
next-nf
force-pushed
the
async-gate-step5-teardown
branch
from
July 27, 2026 12:23
7d593ff to
e117e67
Compare
next-nf
force-pushed
the
async-gate-rar-raa
branch
from
July 27, 2026 12:23
ff6e8ff to
793815b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes rollout step 5. Architecture §3: a reentrant provoked request is serviced
immediately — "the protocol answer (RAA, PFCP report response) goes out at once. Any
larger bearer procedure the reentrant request implies is queued behind the running
procedure."
The Gx RAR clause was one synchronous block — validate → PFCP modify → Gy charging →
PFCP modify → then
aaa_reply. While a procedure was parked the gate postponed thewhole RAR, so the RAA was delayed by the parked procedure's duration. Not a spec
violation, but the RAA is the PCRF's flow control: per TS 29.212 §4.5.2.0 it "should not
send a new RAR to the PCEF for the same IP-CAN session until the previous RAR has been
acknowledged", so an unacknowledged RAR stalls that session's policy pipeline.
DIAMETER_PENDING_TRANSACTIONdoes not apply — TS 29.213 §8.2 binds only when both peersadvertised the PendingTransaction feature, which next-nf neither implements nor negotiates.
Where the split falls
TS 29.212 §4.5.12 splits failure reporting by stage, and on the PUSH path that maps exactly
onto the existing code:
PCCErrors2fromgx_events_to_pcc_ctx(…, install, …)— pure rulebase validation, no external I/OPCCErrors4fromgy_events_to_pcc_ctx/3— rules left without granted creditSo answering early is not merely permitted: it moves
PCCErrors4from the RAA (where itrides today) to the CCR where §4.5.12 wants it.
What's here
validated
PCC2, and emits{next_event, internal, {gx_rar_apply, PCC0, PCC1, PCC2}}.{gx_rar_apply, …}clause carries the PFCP/Gy work verbatim — this changemoves that code, it does not rewrite it. Converting its two blocking
modify_sessioncalls to
async_mremains part of the separate "~11 blocking sites" work.already used on the establishment path in
smf_gtp_gsn_lib.erl:160-166.{_, 'RAR'}to{gy, 'RAR'}. Gy still queues whole: italready answers early, but runs
triggered_charging_event/4inline, which touches theshared PCtx. The Gy and unknown-session clauses needed no other change — Gy was already
the template this follows.
Ordering with multiple RARs
Committing
PCC2before answering is what makes concurrent RARs safe without any new state.Two RARs can only overlap while a procedure is parked; in that window RAR #2 validates on top
of the
PCC2RAR #1 already committed, so the postponed applies run FIFO and the last writesa
PCC4derived from the newestPCC2. Intermediate applies push superseded rule sets andare overwritten — extra
modify_sessioncalls, converging on the same result the fullyserialized code reaches today. No
rar_apply_pendingflag, no extra gate clause, no new Statefield.
Testing
gx_rar_answers_raa_while_parkedparks a procedure with the UPF held, injects a Gx RAR, andasserts the RAA comes back while still parked and that
async_pendingis still 1. Verifiedred first with
raa_not_answered_while_parked.The ten existing
gx_rar*cases are the regression net for the restructure.gx_rarassertspcc_rulesimmediately after the RAA, which still holds becausePCC2is committed beforeanswering.
gx_invalid_charging_rule/gx_invalid_charging_rulebasecountsmf_aaa_pcf:ccr_updatecalls and assert exactly 1 — checked rather than assumed, and the newCCR-U does not perturb them.
pgw_SUITE137/137;ggsn_SUITE+saegw_s11_SUITE100, 0 failures.Stacked on #61. Merge bottom-up: #45 → #46 → #48 → #56 → #57 → #58 → #59 → #61 → this.