Skip to content

Commit 0fc7e43

Browse files
Update app so that max_prb_policy_ratio config is changed, instead of min_prb_policy_ratio
1 parent 5eca792 commit 0fc7e43

1 file changed

Lines changed: 26 additions & 3 deletions

File tree

jrtc_apps/slice_mgmt/slice_mgmt_app.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,26 @@
1414
- Sends an initial GET request to retrieve current slice allocations.
1515
- Processes slice allocation indications, logs details, and stores state.
1616
- Periodically sends SET_SLICE_ALLOC requests to update slice allocations.
17-
- For the first SET_SLICE_ALLOC request, the min_prb_policy_ratio is set to 60% and 40% for slices 0 and 1 respectively. For subsequent SET_SLICE_ALLOC requests, these values are swapped.
17+
- For the first SET_SLICE_ALLOC request, the min_prb_policy_ratio/min_prb_policy_ratio/priority fields are set to 0/40/1 and 0/60/1 for slices 0 and 1 respectively. For subsequent SET_SLICE_ALLOC requests, these values are swapped.
18+
- If you were to do a Iperf test on one of the slices, you should see performance figures as these ..
19+
20+
[ 5] 22.00-23.00 sec 20.7 MBytes 173 Mbits/sec 0.062 ms 21475/37881 (57%)
21+
[ 5] 23.00-24.00 sec 21.2 MBytes 177 Mbits/sec 0.057 ms 21016/37820 (56%)
22+
[ 5] 24.00-25.00 sec 21.3 MBytes 178 Mbits/sec 0.073 ms 21018/37900 (55%)
23+
[ 5] 25.00-26.00 sec 17.4 MBytes 146 Mbits/sec 0.088 ms 23055/36899 (62%) <----- slice max_prb_policy_ratio changes from 60% to 40% here
24+
[ 5] 26.00-27.00 sec 15.0 MBytes 125 Mbits/sec 0.107 ms 26198/38079 (69%)
25+
[ 5] 27.00-28.00 sec 14.7 MBytes 124 Mbits/sec 0.141 ms 25934/37632 (69%)
26+
[ 5] 28.00-29.00 sec 14.7 MBytes 124 Mbits/sec 0.077 ms 26437/38132 (69%)
27+
[ 5] 29.00-30.00 sec 14.5 MBytes 122 Mbits/sec 0.150 ms 25878/37395 (69%)
28+
...
29+
...
30+
[ 5] 82.00-83.00 sec 15.3 MBytes 128 Mbits/sec 0.095 ms 25784/37903 (68%)
31+
[ 5] 84.00-85.00 sec 15.0 MBytes 125 Mbits/sec 0.093 ms 26922/38805 (69%)
32+
[ 5] 85.00-86.00 sec 15.2 MBytes 128 Mbits/sec 0.070 ms 24728/36817 (67%)
33+
[ 5] 86.00-87.00 sec 15.9 MBytes 134 Mbits/sec 0.249 ms 26566/39225 (68%) <----- slice max_prb_policy_ratio changes from 40% to 60% here
34+
[ 5] 87.00-88.00 sec 21.1 MBytes 177 Mbits/sec 0.502 ms 20966/37714 (56%)
35+
[ 5] 88.00-89.00 sec 21.0 MBytes 176 Mbits/sec 0.170 ms 21210/37919 (56%)
36+
[ 5] 89.00-90.00 sec 20.8 MBytes 175 Mbits/sec 0.075 ms 21313/37852 (56%)
1837
"""
1938

2039

@@ -137,8 +156,12 @@ def app_handler(timeout: bool, stream_idx: int, data_entry: struct_jrtc_router_d
137156
# if not first request, swap slice[0].min and slice[1].min
138157
s0, s1 = state.slice_allocation.slice[0], state.slice_allocation.slice[1]
139158
if not state.first_request_sent:
140-
s0.min_prb_policy_ratio = 60
141-
s1.min_prb_policy_ratio = 40
159+
s0.min_prb_policy_ratio = 0
160+
s0.max_prb_policy_ratio = 40
161+
s0.priority = 1
162+
s1.min_prb_policy_ratio = 0
163+
s1.max_prb_policy_ratio = 60
164+
s0.priority = 1
142165
else:
143166
for attr in ("min_prb_policy_ratio", "max_prb_policy_ratio", "priority"):
144167
tmp = getattr(s0, attr)

0 commit comments

Comments
 (0)