UPF: Add minimal Nupf_EventExposure (EES) with USER_DATA_USAGE_MEASURES; refactor aligned to v1.2.7#79
UPF: Add minimal Nupf_EventExposure (EES) with USER_DATA_USAGE_MEASURES; refactor aligned to v1.2.7#79haha39 wants to merge 9 commits into
Conversation
|
Converting to draft while I’m doing a larger refactor. I’ll ping when it’s ready for review. |
1c13536 to
88ae730
Compare
|
This PR introduces a minimal, standards-aligned Event Exposure Service (EES) for UPF focusing on USER_DATA_USAGE_MEASURES over Nupf_EventExposure. Highlights
Refactor (aligned to v1.2.7)
Notes
Thanks to the maintainers for the review and guidance!! |
79bb4a3 to
fae6034
Compare
Alonza0314
left a comment
There was a problem hiding this comment.
Hi, sorry for the late reply.
We’ve taken an initial look at this PR. It appears to introduce a new feature—thank you for your contribution and for taking the time to work on this.
That said, some parts of the changes don’t seem to align well with our current architecture. In particular, there are YAML files that look tailored to a specific experimental setup, as well as a README that differs significantly from the existing project style.
Could you please take another look and clarify your design choices? This would help us better understand the intent and proceed with the review more smoothly. Thank you!
|
Hi @Alonza0314, Thank you! hokusai0603 |
Technical Submission: Nupf_EventExposure Service for go-upfThis document provides a comprehensive technical overview and Pull Request documentation for the Event Exposure Service (EES) implementation in 1. IntroductionThis PR adds a UPF-side implementation of the Nupf_EventExposure service as defined in 3GPP TS 29.564 Release 17/19. The service allows NF consumers (e.g., NWDAF, SMF, PCF) to subscribe to real-time and immediate user plane event reports, specifically focusing on data usage metrics. Key Implementation Paths:
2. Software ArchitectureThe EES is designed as an independent plane within the UPF, adhering to the Control and User Plane Separation (CUPS) architecture. It operates as a secondary consumer of usage reports dispatched from the data plane. 2.1 Component Mapping
2.2 System Initialization Chain---
config:
layout: elk
---
graph TD
Main[main.go] -->|calls| Run[app.go: UpfApp.Run]
subgraph "Forwarding Plane Setup"
Run --> NewDriver[forwarder.NewDriver]
NewDriver --> Gtp5g[gtp5g.go: NewGtp5g]
end
subgraph "Control Plane Setup"
Run --> NewPFCP[pfcp.NewPfcpServer]
Run --> NewDisp[app/dispatcher.go: NewDispatcher]
Run --> HandRep[driver.HandleReport]
Run --> StartPFCP[pfcp.go: PfcpServer.Start]
end
subgraph "Event Exposure Setup (initEES)"
Run --> InitEES[app.go: UpfApp.initEES]
InitEES --> NewStore[ees/subscription_store.go: NewSubscriptionStore]
InitEES --> NewNotif[ees/notifier.go: NewNotifier]
InitEES --> NewAgg[ees/aggregator.go: NewAggregator]
InitEES --> NewHdlr[ees/handler.go: NewHandler]
InitEES --> RegEES[dispatcher.go: RegisterEESHandler]
InitEES -->|goroutine| RunAgg[ees/aggregator.go: Aggregator.Run]
InitEES -->|goroutine| ServeAPI[ees/api.go: Server.Serve]
end
%% Highlight New/Modified Components
classDef eesNew fill:#f96,stroke:#333,stroke-width:2px;
class InitEES,NewDisp,RegEES,NewStore,NewNotif,NewAgg,NewHdlr,RunAgg,ServeAPI eesNew;
style Run fill:#dfd,stroke:#333
3. Data Processing Flow: Life of a Usage ReportThe EES utilizes a Pure Push Model, leveraging existing SMF-provisioned URRs (specifically URRID 2 - Measurement After QoS Enforcement) to capture telemetry without redundant kernel overhead. sequenceDiagram
participant K as gtp5g (Kernel)
participant F as Forwarder (Gtp5g Driver)
participant P as PFCP Server
box "Event Exposure Module (New)"
participant D as Dispatcher
participant H as EES Handler
participant A as EES Aggregator
participant N as EES Notifier
end
participant C as Consumer (e.g. NWDAF)
Note over K, F: 1. Periodic/Threshold Trigger
K->>F: Push Usage Report (URR 2)
F->>D: NotifySessReport(sessRpt)
par Multicast by Dispatcher
D->>P: NotifySessReport (to SMF via N4)
and
D->>H: NotifySessReport
end
H->>A: PushReport (Consolidate immediately)
Note over A: 2. Subscription Period Elapsed
A->>N: Notify(subscription, measures)
N->>C: HTTP POST (TS 29.564 Payload)
C-->>N: 200 OK / 204 No Content
4. 3GPP Compliance Status (TS 29.564)
5. External APIBase URI:
Notification Payload (JSON): 6. Design Decisions & Engineering Excellence6.1 Performance & Overhead
6.2 Reliability & Compliance
6.3 Inter-Component Dependencies (SMF Integration)To fully support Volume Threshold reporting through the Event Exposure Service, a modification in the SMF ( // Required change in SMF for Volume Threshold provisioning
func NewVolumeThreshold(threshold uint64) UrrOpt {
return func(urr *URR) {
if threshold > 0 {
urr.ReportingTrigger.Volth = true
urr.VolumeThreshold = threshold
}
}
}This is to address the issue mentioned in free5gc/smf#223, ensuring that URRs report precise volume flow counts periodically, instead of only providing reports when a volume threshold is breached. 7. Usage & Testing7.1 ConfigurationEnable the service in ees:
enabled: true
listenAddr: "0.0.0.0:8088"
periodSec: 107.2 Unit TestingA comprehensive test suite is included, utilizing # Run all EES tests, including API, Notifier, and On-Demand Lifecycle
go test -v ./internal/ees/...Key Tests:
Standards References:
|
|
Hello @Alonza0314 , I recently re-ran all the tests and updated the design documents in this pr, would you please take another look at this pr again? Thank you, |
7970115 to
42a7af0
Compare
|
Updated, could you please take another look again? |
|
Hi guys, we plan to merge this feature after the release this month. In other words, this feature will be merge at next release, maybe in July or in August. This will be reviewed with another ee PR. Please also check that if it is necessary to modify the config file at free5GC's main repo or not. @d11nn @roundspring2003 FYI! |
|
@Alonza0314 Got it. |
|
@d11nn Noted, will work on it right away ! |
|
Hi @hokusai0603, Please fix CI issues again~ BR, |
|
Hi @d11nn , I have updated the corresponding configs in the main repo and pushed the final changes to align the config styles further. Please take a final look at this pr alongside the main repo's pr. Best regards, |
Summary
This PR embeds a minimal Event Exposure (demo) pipeline into go-upf:
/nupf-ee/v1/ee-subscriptionsUPF-EES.yamlees:block (api.listen, reporter.whitelist/slot, index.ttl, notifier.timeout/retries)Motivation
Design Notes
immediate=true + maxReports=1.Docs
README.mdCompatibility
ees.enabled: false.Follow-ups (if maintainers are interested)