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

traffic class update #21

Merged
merged 1 commit into from
Oct 12, 2021
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
39 changes: 30 additions & 9 deletions config/simapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ configuration:
ue-dnn-qos:
dnn-mbr-downlink: 20000000
dnn-mbr-uplink: 4000000
traffic-class: "platinum" #default bearer QCI/ARP
traffic-class: #default bearer QCI/ARP
name: "platinum"
qci: 9
arp: 6
pdb: 300
pelr: 6
site-info: "menlo"
network-slices:
- name: "slice1"
Expand All @@ -68,39 +73,55 @@ configuration:
endpoint: 8.8.8.8/32
app-mbr-uplink: 1000000 #1Mbps
app-mbr-downlink: 4000000 #5Mbps
traffic-class : "silver" #if same as APN-AMBR then its default bearer rule
traffic-class : #if same as APN-AMBR then its default bearer rule
name: "silver"
qci: 9
arp: 6
pdb: 300
pelr: 6
- rule-name: rule3
priority: 25
action: "permit"
endpoint: 8.8.8.4/32
app-mbr-uplink: 120000
app-mbr-downlink: 520000
traffic-class : "platinum" #this will create new bearer if QCI/ARP combination is different than default QCI/ARP
traffic-class : #this will create new bearer if QCI/ARP combination is different than default QCI/ARP
name: "platinum"
qci: 9
arp: 6
pdb: 300
pelr: 6
rule-trigger: api #dont create this bearer immediately. Wait for API call
- rule-name: rule4
priority: 35
action: "permit"
endpoint: 1.1.1.1/32
app-mbr-uplink: 120000
app-mbr-downlink: 520000
traffic-class : "gold" #this will create new bearer if QCI/ARP combination is different than default QCI/ARP
traffic-class : #this will create new bearer if QCI/ARP combination is different than default QCI/ARP
name: "gold"
qci: 9
arp: 6
pdb: 300
pelr: 6
rule-trigger: "timer,10" #dont create this bearer immediately. Create after 10 sec time.
- rule-name: rule5
priority: 45
action: "permit"
endpoint: 1.1.1.2/32
app-mbr-uplink: 120000
app-mbr-downlink: 520000
traffic-class : "diamond" #this will create new bearer if QCI/ARP combination is different than default QCI/ARP
traffic-class : #this will create new bearer if QCI/ARP combination is different than default QCI/ARP
name: "diamond"
qci: 9
arp: 6
pdb: 300
pelr: 6
rule-trigger: "timer,0" #immeidate creation of this bearer immediately. Create after 10 sec time.
qos:
uplink: 2000000 #2Mbps
downlink: 5000000 #5Mbps
traffic-class: "silver" #default bearer QCI/ARP
apn-ambr-qos:
uplink-mbr: 2000000 #2Mbps
downlink-mbr: 5000000 #5Mbps
traffic-class: "silver" #default bearer QCI/ARP
site-info:
gNodeBs:
- name: menlo-gnb1
Expand Down
31 changes: 22 additions & 9 deletions simapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ type NetworkSlice struct {
Name string `yaml:"name,omitempty" json:"name,omitempty"`
SliceId *SliceId `yaml:"slice-id,omitempty" json:"slice-id,omitempty"`
Qos *QosInfo `yaml:"qos,omitempty" json:"qos,omitempty"`
ApnQos *ApnAmbrQosInfo `yaml:"apn-ambr-qos,omitempty" json:"apn-ambr-qos,omitempty"`
DevGroups []string `yaml:"site-device-group,omitempty" json:"site-device-group,omitempty"`
SiteInfo *SiteInfo `yaml:"site-info,omitempty" json:"site-info,omitempty"`
ApplicationFilteringRules []*ApplicationFilteringRules `yaml:"application-filtering-rules,omitempty" json:"application-filtering-rules,omitempty"`
Expand All @@ -100,15 +99,17 @@ type QosInfo struct {
}

type UeDnnQosInfo struct {
Uplink int `yaml:"dnn-mbr-uplink,omitempty" json:"dnn-mbr-uplink,omitempty"`
Downlink int `yaml:"dnn-mbr-downlink,omitempty" json:"dnn-mbr-downlink,omitempty"`
TrafficClass string `yaml:"traffic-class,omitempty" json:"traffic-class,omitempty"`
Uplink int `yaml:"dnn-mbr-uplink,omitempty" json:"dnn-mbr-uplink,omitempty"`
Downlink int `yaml:"dnn-mbr-downlink,omitempty" json:"dnn-mbr-downlink,omitempty"`
TrafficClass *TrafficClassInfo `yaml:"traffic-class,omitempty" json:"traffic-class,omitempty"`
}

type ApnAmbrQosInfo struct {
Uplink int `yaml:"uplink-mbr,omitempty" json:"uplink-mbr,omitempty"`
Downlink int `yaml:"downlink-mbr,omitempty" json:"downlink-mbr,omitempty"`
TrafficClass string `yaml:"traffic-class,omitempty" json:"traffic-class,omitempty"`
type TrafficClassInfo struct {
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Qci int `yaml:"qci,omitempty" json:"qci,omitempty"`
Arp int `yaml:"arp,omitempty" json:"arp,omitempty"`
Pdb int `yaml:"pdb,omitempty" json:"pdb,omitempty"`
Pelr int `yaml:"pelr,omitempty" json:"pelr,omitempty"`
}

type SiteInfo struct {
Expand Down Expand Up @@ -161,7 +162,7 @@ type ApplicationFilteringRules struct {

AppMbrDownlink int32 `yaml:"app-mbr-downlink,omitempty" json:"app-mbr-downlink,omitempty"`

TrafficClass string `yaml:"traffic-class,omitempty" json:"traffic-class,omitempty"`
TrafficClass *TrafficClassInfo `yaml:"traffic-class,omitempty" json:"traffic-class,omitempty"`

RuleTrigger string `yaml:"rule-trigger,omitempty" json:"rule-trigger,omitempty"`
}
Expand Down Expand Up @@ -420,6 +421,18 @@ func compareGroup(groupNew *DevGroup, groupOld *DevGroup) bool {
if oldipdomain.UePool != newipdomain.UePool {
return true
}
if oldipdomain.UeDnnQos != nil && newipdomain.UeDnnQos != nil {
if oldipdomain.UeDnnQos.TrafficClass != nil &&
newipdomain.UeDnnQos.TrafficClass != nil {
if (oldipdomain.UeDnnQos.TrafficClass.Name != newipdomain.UeDnnQos.TrafficClass.Name) ||
(oldipdomain.UeDnnQos.TrafficClass.Qci != newipdomain.UeDnnQos.TrafficClass.Qci) ||
(oldipdomain.UeDnnQos.TrafficClass.Arp != newipdomain.UeDnnQos.TrafficClass.Arp) ||
(oldipdomain.UeDnnQos.TrafficClass.Pdb != newipdomain.UeDnnQos.TrafficClass.Pdb) ||
(oldipdomain.UeDnnQos.TrafficClass.Pelr != newipdomain.UeDnnQos.TrafficClass.Pelr) {
return true
}
}
}

return false
}
Expand Down