Skip to content

Commit

Permalink
Merge pull request #145 from Alonza0314/fix/redundent-qos-rule-from-pcf
Browse files Browse the repository at this point in the history
  • Loading branch information
ianchen0119 authored Jan 22, 2025
2 parents 30c2893 + 9e42e21 commit d049a7a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
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

0 comments on commit d049a7a

Please sign in to comment.