Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
30e403f4
Commit
30e403f4
authored
May 30, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bsr-estim' into integration_2024_w22
parents
ba9d4afb
7fe29041
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
142 additions
and
131 deletions
+142
-131
ci-scripts/conf_files/gnb-cu.sa.f1.conf
ci-scripts/conf_files/gnb-cu.sa.f1.conf
+4
-4
ci-scripts/conf_files/gnb-cucp.sa.f1.quectel.conf
ci-scripts/conf_files/gnb-cucp.sa.f1.quectel.conf
+5
-5
ci-scripts/conf_files/gnb-cuup.sa.f1.quectel.conf
ci-scripts/conf_files/gnb-cuup.sa.f1.quectel.conf
+6
-6
ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf
ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf
+2
-2
ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf
ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf
+2
-2
ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf
...pts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf
+2
-2
ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf
ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf
+2
-2
ci-scripts/xml_files/container_sa_b200_quectel.xml
ci-scripts/xml_files/container_sa_b200_quectel.xml
+2
-2
ci-scripts/xml_files/container_sa_e1_b200_quectel.xml
ci-scripts/xml_files/container_sa_e1_b200_quectel.xml
+2
-2
ci-scripts/xml_files/container_sa_f1_b200_quectel.xml
ci-scripts/xml_files/container_sa_f1_b200_quectel.xml
+2
-2
ci-scripts/xml_files/container_sa_sc_b200_quectel.xml
ci-scripts/xml_files/container_sa_sc_b200_quectel.xml
+2
-2
ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml
ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml
+5
-12
ci-scripts/yaml_files/sa_e1_b200_gnb/docker-compose.yml
ci-scripts/yaml_files/sa_e1_b200_gnb/docker-compose.yml
+21
-21
ci-scripts/yaml_files/sa_f1_b200_gnb/docker-compose.yml
ci-scripts/yaml_files/sa_f1_b200_gnb/docker-compose.yml
+17
-17
ci-scripts/yaml_files/sa_sc_b200_gnb/docker-compose.yml
ci-scripts/yaml_files/sa_sc_b200_gnb/docker-compose.yml
+5
-12
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+63
-38
No files found.
ci-scripts/conf_files/gnb-cu.sa.f1.conf
View file @
30e403f4
...
...
@@ -22,8 +22,8 @@ gNBs =
tr_s_preference
=
"f1"
;
local_s_address
=
"1
92.168.68.19
4"
;
remote_s_address
=
"1
92.168.68.19
5"
;
local_s_address
=
"1
27.0.0.
4"
;
remote_s_address
=
"1
27.0.0.
5"
;
local_s_portc
=
501
;
local_s_portd
=
2153
;
remote_s_portc
=
500
;
...
...
@@ -44,8 +44,8 @@ gNBs =
NETWORK_INTERFACES
:
{
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"1
92.168.68.194
"
;
GNB_IPV4_ADDRESS_FOR_NGU
=
"1
92.168.68.194
"
;
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"1
72.21.16.109
"
;
GNB_IPV4_ADDRESS_FOR_NGU
=
"1
72.21.16.109
"
;
GNB_PORT_FOR_S1U
=
2152
;
# Spec 2152
};
}
...
...
ci-scripts/conf_files/gnb-cucp.sa.f1.quectel.conf
View file @
30e403f4
...
...
@@ -23,8 +23,8 @@ gNBs =
tr_s_preference
=
"f1"
;
local_s_address
=
"1
92.168.68.19
4"
;
remote_s_address
=
"1
92.168.68.19
5"
;
local_s_address
=
"1
27.0.0.
4"
;
remote_s_address
=
"1
27.0.0.
5"
;
local_s_portc
=
501
;
local_s_portd
=
2153
;
remote_s_portc
=
500
;
...
...
@@ -46,16 +46,16 @@ gNBs =
(
{
type
=
"cp"
;
ipv4_cucp
=
"1
92.168.68.19
4"
;
ipv4_cucp
=
"1
27.0.0.
4"
;
port_cucp
=
38462
;
ipv4_cuup
=
"1
92.168.68.19
6"
;
ipv4_cuup
=
"1
27.0.0.
6"
;
port_cuup
=
38462
;
}
)
NETWORK_INTERFACES
:
{
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"1
92.168.68.194
"
;
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"1
72.21.16.109
"
;
};
}
);
...
...
ci-scripts/conf_files/gnb-cuup.sa.f1.quectel.conf
View file @
30e403f4
...
...
@@ -21,8 +21,8 @@ gNBs =
tr_s_preference
=
"f1"
;
local_s_address
=
"1
92.168.68.19
6"
;
remote_s_address
=
"1
92.168.68.19
5"
;
local_s_address
=
"1
27.0.0.
6"
;
remote_s_address
=
"1
27.0.0.
5"
;
local_s_portc
=
501
;
local_s_portd
=
2153
;
remote_s_portc
=
500
;
...
...
@@ -40,15 +40,15 @@ gNBs =
(
{
type
=
"up"
;
ipv4_cucp
=
"1
92.168.68.19
4"
;
ipv4_cuup
=
"1
92.168.68.19
6"
;
ipv4_cucp
=
"1
27.0.0.
4"
;
ipv4_cuup
=
"1
27.0.0.
6"
;
}
)
NETWORK_INTERFACES
:
{
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"1
92.168.68.196
"
;
GNB_IPV4_ADDRESS_FOR_NGU
=
"1
92.168.68.196
"
;
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"1
72.21.16.109
"
;
GNB_IPV4_ADDRESS_FOR_NGU
=
"1
72.21.16.109
"
;
GNB_PORT_FOR_S1U
=
2152
;
# Spec 2152
};
}
...
...
ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf
View file @
30e403f4
...
...
@@ -162,8 +162,8 @@ MACRLCs = (
num_cc
=
1
;
tr_s_preference
=
"local_L1"
;
tr_n_preference
=
"f1"
;
local_n_address
=
"1
92.168.68.19
5"
;
remote_n_address
=
"1
92.168.68.19
4"
;
local_n_address
=
"1
27.0.0.
5"
;
remote_n_address
=
"1
27.0.0.
4"
;
local_n_portc
=
500
;
local_n_portd
=
2153
;
remote_n_portc
=
501
;
...
...
ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf
View file @
30e403f4
...
...
@@ -169,8 +169,8 @@ MACRLCs = (
num_cc
=
1
;
tr_s_preference
=
"local_L1"
;
tr_n_preference
=
"f1"
;
local_n_address
=
"1
92.168.68.19
5"
;
remote_n_address
=
"1
92.168.68.19
4"
;
local_n_address
=
"1
27.0.0.
5"
;
remote_n_address
=
"1
27.0.0.
4"
;
local_n_portc
=
500
;
local_n_portd
=
2153
;
remote_n_portc
=
501
;
...
...
ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf
View file @
30e403f4
...
...
@@ -161,8 +161,8 @@ gNBs =
NETWORK_INTERFACES
:
{
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"1
92.168.68.194
"
;
GNB_IPV4_ADDRESS_FOR_NGU
=
"1
92.168.68.194
"
;
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"1
72.21.16.109
"
;
GNB_IPV4_ADDRESS_FOR_NGU
=
"1
72.21.16.109
"
;
GNB_PORT_FOR_S1U
=
2152
;
# Spec 2152
};
...
...
ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf
View file @
30e403f4
...
...
@@ -161,8 +161,8 @@ gNBs =
NETWORK_INTERFACES
:
{
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"1
92.168.68.194
"
;
GNB_IPV4_ADDRESS_FOR_NGU
=
"1
92.168.68.194
"
;
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"1
72.21.16.109
"
;
GNB_IPV4_ADDRESS_FOR_NGU
=
"1
72.21.16.109
"
;
GNB_PORT_FOR_S1U
=
2152
;
# Spec 2152
};
...
...
ci-scripts/xml_files/container_sa_b200_quectel.xml
View file @
30e403f4
...
...
@@ -185,14 +185,14 @@
<class>
Custom_Command
</class>
<desc>
Trigger Reestablishment
</desc>
<node>
ofqot
</node>
<command>
echo ci force_reestab | nc -N 1
92.168.68.194
9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'
</command>
<command>
echo ci force_reestab | nc -N 1
27.0.0.1
9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'
</command>
<command_fail>
yes
</command_fail>
</testCase>
<testCase
id=
"060002"
>
<class>
Custom_Command
</class>
<desc>
Verify Reestablishment
</desc>
<node>
ofqot
</node>
<command>
echo ci get_reestab_count | nc -N 1
92.168.68.194
9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'
</command>
<command>
echo ci get_reestab_count | nc -N 1
27.0.0.1
9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'
</command>
<command_fail>
yes
</command_fail>
</testCase>
...
...
ci-scripts/xml_files/container_sa_e1_b200_quectel.xml
View file @
30e403f4
...
...
@@ -177,14 +177,14 @@
<class>
Custom_Command
</class>
<desc>
Trigger Reestablishment (on DU)
</desc>
<node>
ofqot
</node>
<command>
echo ci force_reestab | nc -N 1
92.168.68.195 9090
| grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'
</command>
<command>
echo ci force_reestab | nc -N 1
27.0.0.1 9091
| grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'
</command>
<command_fail>
yes
</command_fail>
</testCase>
<testCase
id=
"360002"
>
<class>
Custom_Command
</class>
<desc>
Verify Reestablishment (on CU)
</desc>
<node>
ofqot
</node>
<command>
echo ci get_reestab_count | nc -N 1
92.168.68.194
9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'
</command>
<command>
echo ci get_reestab_count | nc -N 1
27.0.0.1
9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'
</command>
<command_fail>
yes
</command_fail>
</testCase>
...
...
ci-scripts/xml_files/container_sa_f1_b200_quectel.xml
View file @
30e403f4
...
...
@@ -209,14 +209,14 @@
<class>
Custom_Command
</class>
<desc>
Trigger Reestablishment (on DU)
</desc>
<node>
ofqot
</node>
<command>
echo ci force_reestab | nc -N 1
92.168.68.195 9090
| grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'
</command>
<command>
echo ci force_reestab | nc -N 1
27.0.0.1 9091
| grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'
</command>
<command_fail>
yes
</command_fail>
</testCase>
<testCase
id=
"160002"
>
<class>
Custom_Command
</class>
<desc>
Verify Reestablishment (on CU)
</desc>
<node>
ofqot
</node>
<command>
echo ci get_reestab_count | nc -N 1
92.168.68.194
9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'
</command>
<command>
echo ci get_reestab_count | nc -N 1
27.0.0.1
9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'
</command>
<command_fail>
yes
</command_fail>
</testCase>
...
...
ci-scripts/xml_files/container_sa_sc_b200_quectel.xml
View file @
30e403f4
...
...
@@ -179,14 +179,14 @@
<class>
Custom_Command
</class>
<desc>
Trigger Reestablishment
</desc>
<node>
ofqot
</node>
<command>
echo ci force_reestab | nc -N 1
92.168.68.194
9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'
</command>
<command>
echo ci force_reestab | nc -N 1
27.0.0.1
9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'
</command>
<command_fail>
yes
</command_fail>
</testCase>
<testCase
id=
"260002"
>
<class>
Custom_Command
</class>
<desc>
Verify Reestablishment
</desc>
<node>
ofqot
</node>
<command>
echo ci get_reestab_count | nc -N 1
92.168.68.194
9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'
</command>
<command>
echo ci get_reestab_count | nc -N 1
27.0.0.1
9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'
</command>
<command_fail>
yes
</command_fail>
</testCase>
...
...
ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml
View file @
30e403f4
...
...
@@ -11,9 +11,11 @@ services:
volumes
:
-
../../conf_files/gnb.sa.band78.51prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf
-
/dev:/dev
networks
:
public_net
:
ipv4_address
:
192.168.68.194
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode
:
"
host"
#entrypoint: /bin/bash -c "sleep infinity"
healthcheck
:
# pgrep does NOT work
...
...
@@ -21,12 +23,3 @@ services:
interval
:
10s
timeout
:
5s
retries
:
5
networks
:
public_net
:
name
:
sa-b200-gnb-net
ipam
:
config
:
-
subnet
:
192.168.68.192/26
driver_opts
:
com.docker.network.bridge.name
:
"
sa-gnb-net"
ci-scripts/yaml_files/sa_e1_b200_gnb/docker-compose.yml
View file @
30e403f4
...
...
@@ -6,12 +6,16 @@ services:
ulimits
:
core
:
-1
# for core dumps
environment
:
USE_ADDITIONAL_OPTIONS
:
--sa --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function
USE_ADDITIONAL_OPTIONS
:
--sa
--telnetsrv --telnetsrv.listenport 9090 --telnetsrv.shrmod ci
--log_config.global_log_options level,nocolor,time,line_num,function
volumes
:
-
../../conf_files/gnb-cucp.sa.f1.quectel.conf:/opt/oai-gnb/etc/gnb.conf
networks
:
public_net
:
ipv4_address
:
192.168.68.194
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode
:
"
host"
healthcheck
:
# pgrep does NOT work
test
:
/bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
...
...
@@ -26,12 +30,15 @@ services:
ulimits
:
core
:
-1
# for core dumps
environment
:
USE_ADDITIONAL_OPTIONS
:
--sa --log_config.global_log_options level,nocolor,time,line_num,function
USE_ADDITIONAL_OPTIONS
:
--sa
--log_config.global_log_options level,nocolor,time,line_num,function
volumes
:
-
../../conf_files/gnb-cuup.sa.f1.quectel.conf:/opt/oai-gnb/etc/gnb.conf
networks
:
public_net
:
ipv4_address
:
192.168.68.196
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode
:
"
host"
healthcheck
:
# pgrep does NOT work
test
:
/bin/bash -c "ps aux | grep -v grep | grep -c nr-cuup"
...
...
@@ -50,16 +57,18 @@ services:
USE_ADDITIONAL_OPTIONS
:
--sa
--RUs.[0].sdr_addrs serial=30C51D4
--continuous-tx -E
--telnetsrv --telnetsrv.shrmod ci
--telnetsrv --telnetsrv.
listenport 9091 --telnetsrv.
shrmod ci
--gNBs.[0].min_rxtxtime 2 --gNBs.[0].do_CSIRS 1 --gNBs.[0].do_SRS
1
--RUs.[0].att_rx 14 --RUs.[0].att_tx
14
--log_config.global_log_options level,nocolor,time,line_num,function
volumes
:
-
../../conf_files/gnb-du.sa.band78.106prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf
-
/dev:/dev
networks
:
public_net
:
ipv4_address
:
192.168.68.195
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode
:
"
host"
#entrypoint: /bin/bash -c "sleep infinity"
healthcheck
:
# pgrep does NOT work
...
...
@@ -67,12 +76,3 @@ services:
interval
:
10s
timeout
:
5s
retries
:
5
networks
:
public_net
:
name
:
sa-b200-gnb-net
ipam
:
config
:
-
subnet
:
192.168.68.192/26
driver_opts
:
com.docker.network.bridge.name
:
"
sa-gnb-net"
ci-scripts/yaml_files/sa_f1_b200_gnb/docker-compose.yml
View file @
30e403f4
...
...
@@ -6,12 +6,16 @@ services:
ulimits
:
core
:
-1
# for core dumps
environment
:
USE_ADDITIONAL_OPTIONS
:
--sa --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function
USE_ADDITIONAL_OPTIONS
:
--sa
--telnetsrv --telnetsrv.listenport 9090 --telnetsrv.shrmod ci
--log_config.global_log_options level,nocolor,time,line_num,function
volumes
:
-
../../conf_files/gnb-cu.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
networks
:
public_net
:
ipv4_address
:
192.168.68.194
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode
:
"
host"
#entrypoint: /bin/bash -c "sleep infinity"
healthcheck
:
# pgrep does NOT work
...
...
@@ -28,13 +32,18 @@ services:
core
:
-1
# for core dumps
environment
:
USE_B2XX
:
'
yes'
USE_ADDITIONAL_OPTIONS
:
--sa --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function --gNBs.[0].min_rxtxtime 2 --gNBs.[0].do_CSIRS 1 --gNBs.[0].do_SRS 0 --L1s.[0].max_ldpc_iterations
20
USE_ADDITIONAL_OPTIONS
:
--sa --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx
--telnetsrv --telnetsrv.listenport 9091 --telnetsrv.shrmod ci
--gNBs.[0].min_rxtxtime 2 --gNBs.[0].do_CSIRS 1 --gNBs.[0].do_SRS 0 --L1s.[0].max_ldpc_iterations
20
--log_config.global_log_options level,nocolor,time,line_num,function
volumes
:
-
../../conf_files/gnb-du.sa.band1.52prb.usrpb210.conf:/opt/oai-gnb/etc/gnb.conf
-
/dev:/dev
networks
:
public_net
:
ipv4_address
:
192.168.68.195
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode
:
"
host"
#entrypoint: /bin/bash -c "sleep infinity"
healthcheck
:
# pgrep does NOT work
...
...
@@ -42,12 +51,3 @@ services:
interval
:
10s
timeout
:
5s
retries
:
5
networks
:
public_net
:
name
:
sa-b200-gnb-net
ipam
:
config
:
-
subnet
:
192.168.68.192/26
driver_opts
:
com.docker.network.bridge.name
:
"
sa-gnb-net"
ci-scripts/yaml_files/sa_sc_b200_gnb/docker-compose.yml
View file @
30e403f4
...
...
@@ -11,9 +11,11 @@ services:
volumes
:
-
../../conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf:/opt/oai-gnb/etc/gnb.conf
-
/dev:/dev
networks
:
public_net
:
ipv4_address
:
192.168.68.194
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode
:
"
host"
#entrypoint: /bin/bash -c "sleep infinity"
healthcheck
:
# pgrep does NOT work
...
...
@@ -21,12 +23,3 @@ services:
interval
:
10s
timeout
:
5s
retries
:
5
networks
:
public_net
:
name
:
sa-b200-gnb-net
ipam
:
config
:
-
subnet
:
192.168.68.192/26
driver_opts
:
com.docker.network.bridge.name
:
"
sa-gnb-net"
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
30e403f4
...
...
@@ -111,6 +111,65 @@ static int compute_ph_factor(int mu, int tbs_bits, int rb, int n_layers, int n_s
return
((
int
)
roundf
(
delta_tf
+
bw_factor
));
}
/* \brief over-estimate the BSR index, given real_index.
*
* BSR does not account for headers, so we need to estimate. See 38.321
* 6.1.3.1: "The size of the RLC headers and MAC subheaders are not considered
* in the buffer size computation." */
static
int
overestim_bsr_index
(
int
real_index
)
{
/* if UE reports BSR 0, it means "no data"; otherwise, overestimate to
* account for headers */
const
int
add_overestim
=
1
;
return
real_index
>
0
?
real_index
+
add_overestim
:
real_index
;
}
static
int
estimate_ul_buffer_short_bsr
(
const
NR_BSR_SHORT
*
bsr
)
{
/* NOTE: the short BSR might be for different LCGID than 0, but we do not
* differentiate them */
int
rep_idx
=
bsr
->
Buffer_size
;
int
estim_idx
=
overestim_bsr_index
(
rep_idx
);
int
max
=
sizeofArray
(
NR_SHORT_BSR_TABLE
);
int
idx
=
min
(
estim_idx
,
max
);
int
estim_size
=
NR_SHORT_BSR_TABLE
[
idx
];
LOG_D
(
NR_MAC
,
"short BSR LCGID %d index %d estim index %d size %d
\n
"
,
bsr
->
LcgID
,
rep_idx
,
estim_idx
,
estim_size
);
return
estim_size
;
}
static
int
estimate_ul_buffer_long_bsr
(
const
NR_BSR_LONG
*
bsr
)
{
LOG_D
(
NR_MAC
,
"LONG BSR, LCG ID(7-0) %d/%d/%d/%d/%d/%d/%d/%d
\n
"
,
bsr
->
LcgID7
,
bsr
->
LcgID6
,
bsr
->
LcgID5
,
bsr
->
LcgID4
,
bsr
->
LcgID3
,
bsr
->
LcgID2
,
bsr
->
LcgID1
,
bsr
->
LcgID0
);
bool
bsr_active
[
8
]
=
{
bsr
->
LcgID0
!=
0
,
bsr
->
LcgID1
!=
0
,
bsr
->
LcgID2
!=
0
,
bsr
->
LcgID3
!=
0
,
bsr
->
LcgID4
!=
0
,
bsr
->
LcgID5
!=
0
,
bsr
->
LcgID6
!=
0
,
bsr
->
LcgID7
!=
0
};
int
estim_size
=
0
;
int
max
=
sizeofArray
(
NR_LONG_BSR_TABLE
);
uint8_t
*
payload
=
((
uint8_t
*
)
bsr
)
+
1
;
int
m
=
0
;
const
int
total_lcgids
=
8
;
/* see 38.321 6.1.3.1 */
for
(
int
n
=
0
;
n
<
total_lcgids
;
n
++
)
{
if
(
!
bsr_active
[
n
])
continue
;
int
rep_idx
=
payload
[
m
];
int
estim_idx
=
overestim_bsr_index
(
rep_idx
);
int
idx
=
min
(
estim_idx
,
max
);
estim_size
+=
NR_LONG_BSR_TABLE
[
idx
];
LOG_D
(
NR_MAC
,
"LONG BSR LCGID/m %d/%d Index %d estim index %d size %d"
,
n
,
m
,
rep_idx
,
estim_idx
,
estim_size
);
m
++
;
}
return
estim_size
;
}
// For both UL-SCH except:
// - UL-SCH: fixed-size MAC CE(known by LCID)
// - UL-SCH: padding
...
...
@@ -166,7 +225,6 @@ static int nr_process_mac_pdu(instance_t module_idP,
LOG_D
(
NR_MAC
,
"In %s: received UL-SCH sub-PDU with LCID 0x%x in %d.%d (remaining PDU length %d)
\n
"
,
__func__
,
rx_lcid
,
frameP
,
slot
,
pdu_len
);
unsigned
char
*
ce_ptr
;
int
n_Lcg
=
0
;
switch
(
rx_lcid
){
// MAC CE
...
...
@@ -192,17 +250,8 @@ static int nr_process_mac_pdu(instance_t module_idP,
}
/* Extract short BSR value */
ce_ptr
=
&
pduP
[
mac_subheader_len
];
NR_BSR_SHORT
*
bsr_s
=
(
NR_BSR_SHORT
*
)
ce_ptr
;
sched_ctrl
->
estimated_ul_buffer
=
0
;
sched_ctrl
->
estimated_ul_buffer
=
NR_SHORT_BSR_TABLE
[
bsr_s
->
Buffer_size
];
LOG_D
(
NR_MAC
,
"SHORT BSR at %4d.%2d, LCG ID %d, BS Index %d, BS value < %d, est buf %d
\n
"
,
frameP
,
slot
,
bsr_s
->
LcgID
,
bsr_s
->
Buffer_size
,
NR_SHORT_BSR_TABLE
[
bsr_s
->
Buffer_size
],
sched_ctrl
->
estimated_ul_buffer
);
sched_ctrl
->
estimated_ul_buffer
=
estimate_ul_buffer_short_bsr
((
NR_BSR_SHORT
*
)
ce_ptr
);
LOG_D
(
NR_MAC
,
"SHORT BSR at %4d.%2d, est buf %d
\n
"
,
frameP
,
slot
,
sched_ctrl
->
estimated_ul_buffer
);
break
;
case
UL_SCH_LCID_L_BSR
:
case
UL_SCH_LCID_L_TRUNCATED_BSR
:
...
...
@@ -219,32 +268,8 @@ static int nr_process_mac_pdu(instance_t module_idP,
}
/* Extract long BSR value */
ce_ptr
=
&
pduP
[
mac_subheader_len
];
NR_BSR_LONG
*
bsr_l
=
(
NR_BSR_LONG
*
)
ce_ptr
;
sched_ctrl
->
estimated_ul_buffer
=
0
;
n_Lcg
=
bsr_l
->
LcgID7
+
bsr_l
->
LcgID6
+
bsr_l
->
LcgID5
+
bsr_l
->
LcgID4
+
bsr_l
->
LcgID3
+
bsr_l
->
LcgID2
+
bsr_l
->
LcgID1
+
bsr_l
->
LcgID0
;
LOG_D
(
NR_MAC
,
"LONG BSR, LCG ID(7-0) %d/%d/%d/%d/%d/%d/%d/%d
\n
"
,
bsr_l
->
LcgID7
,
bsr_l
->
LcgID6
,
bsr_l
->
LcgID5
,
bsr_l
->
LcgID4
,
bsr_l
->
LcgID3
,
bsr_l
->
LcgID2
,
bsr_l
->
LcgID1
,
bsr_l
->
LcgID0
);
for
(
int
n
=
0
;
n
<
n_Lcg
;
n
++
){
LOG_D
(
NR_MAC
,
"LONG BSR, %d/%d (n/n_Lcg), BS Index %d, BS value < %d"
,
n
,
n_Lcg
,
pduP
[
mac_subheader_len
+
1
+
n
],
NR_LONG_BSR_TABLE
[
pduP
[
mac_subheader_len
+
1
+
n
]]);
sched_ctrl
->
estimated_ul_buffer
+=
NR_LONG_BSR_TABLE
[
pduP
[
mac_subheader_len
+
1
+
n
]];
LOG_D
(
NR_MAC
,
"LONG BSR at %4d.%2d, %d/%d (n/n_Lcg), BS Index %d, BS value < %d, total %d
\n
"
,
frameP
,
slot
,
n
,
n_Lcg
,
pduP
[
mac_subheader_len
+
1
+
n
],
NR_LONG_BSR_TABLE
[
pduP
[
mac_subheader_len
+
1
+
n
]],
sched_ctrl
->
estimated_ul_buffer
);
}
sched_ctrl
->
estimated_ul_buffer
=
estimate_ul_buffer_long_bsr
((
NR_BSR_LONG
*
)
ce_ptr
);
LOG_D
(
NR_MAC
,
"LONG BSR at %4d.%2d, estim buf %d
\n
"
,
frameP
,
slot
,
sched_ctrl
->
estimated_ul_buffer
);
break
;
case
UL_SCH_LCID_C_RNTI
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment