Repository navigation
fix(core): always send PFCP responses; treat datapath delete ENOENT as success - #650
Conversation
|
Hi @zhangerfei-dp, Thanks for this PR. In general the idea is clear and implemented well. I'd recommend to process The second point is that you have to apply fix for delete operations in If you agree to move |
a9441a7 to
5daf001
Compare
|
Thanks for the review, Alex! Addressed in the rewritten branch (force-updated, single commit):
Checked: |
|
Now error handling is perfectly incapsulated in Looks like this changes were OK. -- BR, Alex |
5daf001 to
91be046
Compare
|
Restored the Re-verified on the updated branch: |
…apOperations Handle() returned early when a handler reported an error and silently dropped the response message the handler had built. The visible case: a Session Deletion Response was never transmitted when the datapath cleanup hit "delete: key does not exist" (measured rx=21 vs tx=8 within one workload), so the CP function (open5gs SMF) saw no response and timed out its PFCP transaction — on some open5gs versions that aborts the whole SMF process (open5gs/open5gs#4833). Changes: - Handle(): always transmit the handler's response when non-nil; a send error is logged and only propagated when the handler succeeded. - mapOperations (cmd/ebpf): delete operations now treat "key absent" (ebpf.ErrKeyNotExist / ENOENT) as success via isKeyAbsent(), so calling code does not have to care about this error — the desired end state of a delete is that the entry is absent. This uniformly covers every delete call site, including HandlePfcpSessionModificationRequest. - DeleteUrr() is split: ReadUrr() explicitly returns the URR usage data, and DeleteUrr() follows the conventional error-only signature. Verified with a patched build on a session-churn workload: all deletion requests answered (rx=7/tx=7, RequestAccepted), and no "Error handling PFCP" warnings in the log. Fixes edgecomllc#647 Signed-off-by: frank <[email protected]>
91be046 to
18d1ad7
Compare
|
Thanks for the careful reviews and the guidance through the iterations, @pirog-spb — much appreciated! This one came out of a real PFCP-session-churn scenario in our test rig, so it's great to see the fix land here. If anything else helps before merge (rebase, extra test evidence, etc.), just let me know — happy to assist. |
…s success (#650) Signed-off-by: frank <[email protected]> (cherry picked from commit bc686b3) Signed-off-by: pirog-spb <[email protected]>
…s success (#650) Signed-off-by: frank <[email protected]> (cherry picked from commit bc686b3) Signed-off-by: pirog-spb <[email protected]>
Fixes #647.
(Branch rewritten per review: the ENOENT handling moved into
mapOperations(cmd/ebpf),ReadUrris extracted, andHandlePfcpSessionModificationRequestis covered by the same change.)What
Handle()— always transmit the handler's response when non-nil. A send error is logged, and only propagated when the handler itself succeeded.mapOperations(cmd/ebpf) — delete operations absorb "key absent" (ebpf.ErrKeyNotExist/ENOENT) as success viaisKeyAbsent(), so no caller needs to care about this error: the desired end state of a delete is that the entry is absent. This uniformly covers every delete call site, includingHandlePfcpSessionModificationRequest(RemoveFAR / RemoveQER / RemoveURR).DeleteUrr()split —ReadUrr()now explicitly returns the URR usage data;DeleteUrr()has the conventional error-only signature (as suggested in review). The deletion/modification handlers read first, then delete.Why
Measured on a session-churn workload:
13 deletion requests received no response at all: the handler returned
(failure-response, err)afterCan't delete GTP PDR: delete: key does not exist, andHandle()returned before sending the response it had built. The CP side (open5gs SMF) then timed out its PFCP transaction — on some open5gs versions that even aborts the whole SMF process (related: open5gs/open5gs#4833).Verification
Patched build, same workload afterwards:
rx = 7 / tx = 7, all requests answered withRequestAccepted, noError handling PFCPwarnings in the log.go build ./...andgo vet ./cmd/...(tests included) are clean, and the touched files are gofmt-clean.