-
Notifications
You must be signed in to change notification settings - Fork 113
refactor: introduce UPNode as common interface for UPF and gNB nodes #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hi @LaumiH, Do you test the functionalities with this PR? And which scenarios did you take? |
|
Hi @andy89923, I tested only session establishment with 1 gNB and 1 UE so far. In addition, I have tested the heartbeat procedure and UPF failure detection. I have also checked the unit tests. Are there any test scenarios/cases that you typically do? I can help with testing. |
andy89923
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't reviewed all the details, but here are some suggestions.
Also, I think we should test with ULCL scnario for more than 1 GNB and 1 UPF as UPNode in SMF.
…eConfigInterface 'inheritance' for userplaneInformation config
eae4280 to
b72f36d
Compare
I worked on refactoring the SMF code, and this is a change I found very helpful to improve code reuse and readability.
For simpler management of UPNodes in the UserPlaneTopology, a new struct is added:
The gNB and UPF structs "inherit" these fields using Golang's struct embedding (similar to inheritance).
The
*UPNodepointer is given to the constructors of gNB and UPF structs (e.g., theNewUPFmethod).E.g.,
and
Additionally, both gNB and UPF structs implement the
UPNodeInterface:This makes the UUID of each UPF a
uuid.UUIDinstead of a string.Now, the
UPPathconsists of UPNodes that implement the interface:This makes the code more concise and removes unnecessary empty fields from objects.
Additional smaller changes:
MatchedSelectionmethod is moved to the upf.go file for clarity.configToNodeIDto convert the single NodeID string from the SMF config to either IPv4, IPv6, or FQDN NodeID type.LinksFromConfigurationmethod inNewUserPlaneInformationmethod instead of code duplication.uuid.UUIDand not a string.UPFSelectionParams.String()output for better readability.UPF.NodeID.ResolveNodeIdToIp().String()and similar with a method.