Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions internal/context/upf.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ type UPF struct {
uuid uuid.UUID
NodeID pfcpType.NodeID
Addr string
UPIPInfo pfcpType.UserPlaneIPResourceInformation
RecoveryTimeStamp time.Time

AssociationContext context.Context
Expand Down Expand Up @@ -353,19 +352,6 @@ func RemoveUPFNodeByNodeID(nodeID pfcpType.NodeID) bool {
return false
}

func SelectUPFByDnn(dnn string) *UPF {
var upf *UPF
upfPool.Range(func(key, value interface{}) bool {
upf = value.(*UPF)
if upf.UPIPInfo.Assoni && upf.UPIPInfo.NetworkInstance.NetworkInstance == dnn {
return false
}
upf = nil
return true
})
return upf
}

func (upf *UPF) GetUPFIP() string {
upfIP := upf.NodeID.ResolveNodeIdToIp().String()
return upfIP
Expand Down
2 changes: 0 additions & 2 deletions internal/pfcp/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ func HandlePfcpAssociationSetupRequest(msg *pfcpUdp.Message) {
return
}

upf.UPIPInfo = *req.UserPlaneIPResourceInformation

// Response with PFCP Association Setup Response
cause := pfcpType.Cause{
CauseValue: pfcpType.CauseRequestAccepted,
Expand Down
8 changes: 1 addition & 7 deletions internal/sbi/processor/association.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,7 @@ func setupPfcpAssociation(upf *smf_context.UPF, upfStr string) error {
}

logger.MainLog.Infof("Received PFCP Association Setup Accepted Response from UPF%s", upfStr)

if rsp.UserPlaneIPResourceInformation != nil {
upf.UPIPInfo = *rsp.UserPlaneIPResourceInformation

logger.MainLog.Infof("UPF(%s)[%s] setup association",
upf.NodeID.ResolveNodeIdToIp().String(), upf.UPIPInfo.NetworkInstance.NetworkInstance)
}
logger.MainLog.Infof("UPF(%s) setup association", upf.NodeID.ResolveNodeIdToIp().String())

return nil
}
Expand Down
Loading