Skip to content
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

fix: remove unnecessary qos data record form pcc ruls #145

Merged
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
6 changes: 4 additions & 2 deletions internal/context/sm_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,10 @@ func (c *SMContext) CreatePccRuleDataPath(pccRule *PCCRule,
pccRule.Datapath.AddChargingRules(c, chgLevel, chgData)
}

pccRule.Datapath.AddQoS(c, pccRule.QFI, qosData)
c.AddQosFlow(pccRule.QFI, qosData)
if pccRule.RefQosDataID() != "" {
pccRule.Datapath.AddQoS(c, pccRule.QFI, qosData)
c.AddQosFlow(pccRule.QFI, qosData)
}
return nil
}

Expand Down
9 changes: 7 additions & 2 deletions internal/context/sm_context_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ func (c *SMContext) ApplyPccRules(

tgtQosID := tgtPcc.RefQosDataID()
_, tgtQosData := c.getSrcTgtQosData(decision.QosDecs, tgtQosID)
tgtPcc.SetQFI(c.AssignQFI(tgtQosID))

// only assign the QFI when there is tgtQoSID (i.e. there is QoSData)
if tgtQosID != "" {
tgtPcc.SetQFI(c.AssignQFI(tgtQosID))
}

// Create Data path for targetPccRule
if err := c.CreatePccRuleDataPath(tgtPcc, tgtTcData, tgtQosData, tgtChgData); err != nil {
Expand All @@ -180,11 +184,12 @@ func (c *SMContext) ApplyPccRules(
if err := applyFlowInfoOrPFD(tgtPcc); err != nil {
return err
}
finalPccRules[id] = tgtPcc

if tgtTcID != "" {
finalTcDatas[tgtTcID] = tgtTcData
}
if tgtQosID != "" {
finalPccRules[id] = tgtPcc
finalQosDatas[tgtQosID] = tgtQosData
}
if tgtChgID != "" {
Expand Down
Loading