-
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
Remove internal application and release ID if not used by any UE session #583
Conversation
…into app-id-release
…into app-id-release
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.
Left only minor comments. Please feel free to merge when ready.
pfcpiface/up4.go
Outdated
|
||
applicationsEntry, err := up4.p4RtTranslator.BuildApplicationsTableEntry(pdr, up4.conf.SliceID, newAppID) | ||
if err != nil { | ||
releaseID() |
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.
just curious, when not just calling up4.unsafeReleaseInternalApplicationID(appFilter)
instead of defining a new function?
pfcpiface/up4.go
Outdated
appFilter.appProto = pdr.appFilter.proto | ||
|
||
if up4Application, exists := up4.applicationIDs[appFilter]; exists { | ||
// application already exists, increment ref count. |
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.
There's no ref count
pfcpiface/up4.go
Outdated
var appFilter up4ApplicationFilter | ||
if pdr.IsUplink() { | ||
app = application{ | ||
appFilter = up4ApplicationFilter{ | ||
appIP: pdr.appFilter.dstIP, | ||
appL4Port: pdr.appFilter.dstPortRange, | ||
} | ||
} else if pdr.IsDownlink() { | ||
app = application{ | ||
appFilter = up4ApplicationFilter{ | ||
appIP: pdr.appFilter.srcIP, | ||
appL4Port: pdr.appFilter.srcPortRange, | ||
} | ||
} | ||
|
||
app.appProto = pdr.appFilter.proto | ||
appFilter.appProto = pdr.appFilter.proto |
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 already saw this in addInternalApplicationIDAndGetP4rtEntry
. To reduce duplication, I suggest extracting into a function.
…into app-id-release
TODO: