-
Notifications
You must be signed in to change notification settings - Fork 106
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
feat: add F-TEID allocation support #840
base: main
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
@gruyaume please rebase your PR. |
@gruyaume,
|
Yeah this is still a draft, I'm trying to figure out why the Created PDR's aren't returned in the PFCP Session Establishment Response. |
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.
Overall, it looks good to me. However, when running an E2E test using this PR along with SMF #334, the test fails, as shown below. Did you get a chance to run an E2E test with these changes?
TASK [simulator : debug] ***********************************************************************************************
fatal: [node1]: FAILED! => {
"msg": [
"Profile Name: profile2, Profile Type: pdusessest",
"Ue's Passed: 0, Ue's Failed: 1",
"Profile Errors:",
"imsi:imsi-208930100007510, profile timeout",
"Profile Status: FAIL"
]
}
Yes I've tested this end to end and it worked fine with all the 5 profiles I tested with. I'll try again to make sure. |
I tested it again and it still works on my side, I attached the gnbsim logs. Let me know if you have more information about failures. Logs and/or captures would be useful. |
My E2E tests still fail, except Profile 1 (Registration request: no UP involvement). Let me take another look into the PR and will share logs later today/tomorrow. Also, I asked @sureshmarikkannu to test these PRs
|
@gab-arrobo did you get time to find more details about the problem you are experimenting? Any help here would be useful in driving this one to completion. |
Reviewing it again this moment and I found the reason why the PRs fail in my setup... I use the Also, I am moving the codebase to GO 1.23. This is because the latest GRPC version (1.68.0) requires any of the latest 2 major GO versions (i.e., 1.22 and/or 1.23). So, I am making this change across all of our repos such that all of them use the same Go version. Can you please make this change in as part of your 2 PRs (UPF and SMF)? or would you like me to open a PR for that and then you rebase your PRs? The key piece would be to have/use GO 1.23 as part of release images v2.0.0 |
No problem, I just bumped it in the last commit. |
@gruyaume, you need to "redo" the commit |
Thanks! |
Signed-off-by: Guillaume Belanger <[email protected]>
} | ||
|
||
// Allocate and return an id in range [minValue, maxValue] | ||
func (idGenerator *FTEIDGenerator) Allocate() (uint32, error) { |
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.
Not efficient.. In case we establish few hundred or thousand tunnels then this will become slow. Anything better we can do?
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.
This is using the exact same algorithm as was used in the SMF. While we may want to change it for something efficient, I would decouple this performance improvement from this change here which is focused on moving f-teid allocation from the SMF to the UPF.
Reference:
Could you please share pcap when you establish 1 call and also PFCP association. Thanks |
p.tunnelTEIDMask = 0xFFFFFFFF | ||
p.tunnelIP4Dst = ip2int(tunnelIPv4Address) | ||
p.tunnelIP4DstMask = 0xFFFFFFFF | ||
if fteid.HasCh() { |
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.
Could you pls help with this. What does this do?
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.
If the SMF wants the UPF to allocate the F-TEID, which is the case in 3GPP release 16, the SMF sets the CHOOSE flag in the Local F-TEID of its PFCP association setup request. Here, the UPF checks if this flag is set. If it is, it sets UPAllocateFteid to True which will result in the UPF allocating an F-TEID.
From the 3GPP spec:
The SMF shall request the UPF to allocate the F-TEID by setting the CHOOSE flag in the Local F-TEID. And if the PDR(s) is created successfully, the UPF shall return the F-TEID(s) it has assigned to the PDR(s) in the PFCP Session Establishment Response or PFCP Session Modification Response.
Signed-off-by: Guillaume Belanger <[email protected]>
Ok will do. |
Here are the captures taken from the SMF and UPF respectively. You likely will want to filter in only pfcp packets. I had to tar them because github does not accept pcap files. |
@thakurajayL @gab-arrobo can we complete the review here and in the SMF for this feature? |
@thakurajayL, any further comment/question about this PR (and omec-project/smf#334). Everything looks good to me and these PRs are working fine when having the |
Description
As of 3GPP Release 16, F-TEID allocation is done in the UPF instead of the SMF. This PR implements F-TEID allocation as well as the necessary PFCP communication changes.
Summary
Changes in the SMF and UPF are intertwined
This change and the SMF are intertwined and have to be merged close together so that the network keeps on working on main:
Reference
3GPP Release 16
Relevant information from the 3GPP Release 16 29.244 document: