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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
littleBu
OpenXG-RAN
Commits
8e6b47c4
Commit
8e6b47c4
authored
May 27, 2024
by
Fredrik Molander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates after arc 1.3 integration
parent
15fade44
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
160 additions
and
47 deletions
+160
-47
ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf
ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf
+37
-17
ci-scripts/yaml_files/sa_gnb_aerial/aerial_l1_entrypoint.sh
ci-scripts/yaml_files/sa_gnb_aerial/aerial_l1_entrypoint.sh
+13
-5
ci-scripts/yaml_files/sa_gnb_aerial/docker-compose.yaml
ci-scripts/yaml_files/sa_gnb_aerial/docker-compose.yaml
+7
-3
doc/tutorial_resources/oai-cn5g/database/oai_db.sql
doc/tutorial_resources/oai-cn5g/database/oai_db.sql
+40
-0
docker/Dockerfile.gNB.aerial.ubuntu20
docker/Dockerfile.gNB.aerial.ubuntu20
+7
-1
nfapi/oai_integration/aerial/fapi_nvIPC.c
nfapi/oai_integration/aerial/fapi_nvIPC.c
+34
-10
nfapi/oai_integration/aerial/fapi_vnf_p5.c
nfapi/oai_integration/aerial/fapi_vnf_p5.c
+13
-5
nfapi/oai_integration/aerial/fapi_vnf_p7.c
nfapi/oai_integration/aerial/fapi_vnf_p7.c
+6
-6
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+3
-0
No files found.
ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf
View file @
8e6b47c4
...
...
@@ -4,6 +4,7 @@ Asn1_verbosity = "none";
sa
=
1
;
nfapi
=
"AERIAL"
;
pdcp
-
drop
=
1
;
gNBs
=
(
...
...
@@ -15,8 +16,8 @@ gNBs =
//
Tracking
area
code
,
0
x0000
and
0
xfffe
are
reserved
values
tracking_area_code
=
1
;
plmn_list
= ({
mcc
=
208
;
mnc
=
97
;
mcc
=
001
;
mnc
=
01
;
mnc_length
=
2
;
snssaiList
= (
{
...
...
@@ -30,10 +31,11 @@ gNBs =
//////////
Physical
parameters
:
pdsch_AntennaPorts_XP
=
2
;
pdsch_AntennaPorts_N1
=
2
;
pusch_AntennaPorts
=
2
;
do_CSIRS
=
1
;
do_SRS
=
0
;
min_rxtxtime
=
2
;
min_rxtxtime
=
3
;
pdcch_ConfigSIB1
= (
{
...
...
@@ -168,13 +170,19 @@ gNBs =
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity
=
5
;
#6;
nrofDownlinkSlots
=
3
;
#7;
nrofDownlinkSymbols
=
6
;
nrofUplinkSlots
=
1
;
#2;
nrofUplinkSymbols
=
0
;
ssPBCH_BlockPower
= -
25
;
# dl_UL_TransmissionPeriodicity = 5; #6;
# nrofDownlinkSlots = 3; #7;
# nrofDownlinkSymbols = 6;
# nrofUplinkSlots = 1; #2;
# nrofUplinkSymbols = 0;
dl_UL_TransmissionPeriodicity
=
6
;
nrofDownlinkSlots
=
6
;
nrofDownlinkSymbols
=
10
;
nrofUplinkSlots
=
3
;
nrofUplinkSymbols
=
0
ssPBCH_BlockPower
= -
34
;
}
);
...
...
@@ -189,14 +197,26 @@ gNBs =
};
//////////
AMF
parameters
:
amf_ip_address
= ({
ipv4
=
"192.168.71.132"
; });
//////////
AMF
parameters
:
amf_ip_address
= ( {
ipv4
=
"192.168.70.132"
;
ipv6
=
"192:168:30::17"
;
active
=
"yes"
;
preference
=
"ipv4"
;
}
);
# amf_ip_address = ({ ipv4 = "192.168.71.132"; });
NETWORK_INTERFACES
:
{
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"172.21.16.131"
;
GNB_IPV4_ADDRESS_FOR_NGU
=
"172.21.16.131"
;
GNB_INTERFACE_NAME_FOR_NG_AMF
=
"demo-oai"
;
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"192.168.70.129/24"
;
GNB_INTERFACE_NAME_FOR_NGU
=
"demo-oai"
;
GNB_IPV4_ADDRESS_FOR_NGU
=
"192.168.70.129/24"
;
# GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129";
# GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129";
# GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.131";
# GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.131";
GNB_PORT_FOR_S1U
=
2152
;
# Spec 2152
};
...
...
@@ -214,11 +234,11 @@ MACRLCs = (
remote_s_portd
=
50010
; //
pnf
p7
port
[!]
tr_s_preference
=
"aerial"
;
tr_n_preference
=
"local_RRC"
;
pusch_TargetSNRx10
=
2
0
0
;
# 150;
pucch_TargetSNRx10
=
2
00
;
#200;
pusch_TargetSNRx10
=
2
5
0
;
# 150;
pucch_TargetSNRx10
=
1
00
;
#200;
ulsch_max_frame_inactivity
=
10
;
dl_max_mcs
=
2
8
;
ul_max_mcs
=
2
8
;
dl_max_mcs
=
2
7
;
ul_max_mcs
=
2
5
;
}
);
...
...
ci-scripts/yaml_files/sa_gnb_aerial/aerial_l1_entrypoint.sh
View file @
8e6b47c4
...
...
@@ -4,9 +4,9 @@
cuBB_Path
=
"
${
cuBB_SDK
:-
/opt/nvidia/cuBB
}
"
# Run gdrcopy insmod
cd
"
$cuBB_Path
"
/cuPHY-CP/external/gdrcopy/
||
exit
1
#
cd "$cuBB_Path"/cuPHY-CP/external/gdrcopy/ || exit 1
./insmod.sh
#
./insmod.sh
cd
"
$cuBB_Path
"
||
exit
1
# Add gdrcopy to LD_LIBRARY_PATH
export
LD_LIBRARY_PATH
=
/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/opt/mellanox/dpdk/lib/x86_64-linux-gnu:/opt/mellanox/doca/lib/x86_64-linux-gnu:/opt/nvidia/cuBB/cuPHY-CP/external/gdrcopy/build/x86_64/
...
...
@@ -21,8 +21,8 @@ export CUDA_MPS_LOG_DIRECTORY=/var
echo
quit | nvidia-cuda-mps-control
# Start MPS
nvidia-cuda-mps-control
-d
echo
start_server
-uid
0 |
nvidia-cuda-mps-control
sudo
-E
nvidia-cuda-mps-control
-d
sudo
-E
echo
start_server
-uid
0 |
sudo
-E
nvidia-cuda-mps-control
# Start cuphycontroller_scf
# Check if an argument is provided
...
...
@@ -34,4 +34,12 @@ else
argument
=
"
$1
"
fi
"
$cuBB_Path
"
/build/cuPHY-CP/cuphycontroller/examples/cuphycontroller_scf
"
$argument
"
\ No newline at end of file
#sed -i "s/ nic:.*/ nic: 0000:cc:00.1/" ${cuBB_SDK}/cuPHY-CP/cuphycontroller/config/cuphycontroller_P5G_FXN_R750.yaml
#sed -i "s/ dst_mac_addr:.*/ dst_mac_addr: 6c:ad:ad:00:04:6c/" ${cuBB_SDK}/cuPHY-CP/cuphycontroller/config/cuphycontroller_P5G_FXN_R750.yaml
sed
-i
"s/ nic:.*/ nic: 0000:b5:00.0/"
${
cuBB_SDK
}
/cuPHY-CP/cuphycontroller/config/cuphycontroller_P5G_FXN.yaml
sed
-i
"s/ dst_mac_addr:.*/ dst_mac_addr: 6c:ad:ad:00:04:6c/"
${
cuBB_SDK
}
/cuPHY-CP/cuphycontroller/config/cuphycontroller_P5G_FXN.yaml
sudo
-E
"
$cuBB_Path
"
/build/cuPHY-CP/cuphycontroller/examples/cuphycontroller_scf P5G_FXN
sudo
./build/cuPHY-CP/gt_common_libs/nvIPC/tests/pcap/pcap_collect
sudo mv
nvipc.pcap /var/log/aerial/
sleep
infinity
ci-scripts/yaml_files/sa_gnb_aerial/docker-compose.yaml
View file @
8e6b47c4
...
...
@@ -24,10 +24,11 @@ services:
-
../../../cmake_targets/share:/opt/cuBB/share
userns_mode
:
host
ipc
:
"
shareable"
image
:
cubb-build:23-
2
image
:
cubb-build:23-
4
environment
:
-
cuBB_SDK=/opt/nvidia/cuBB
command
:
bash -c " rm -rf /tmp/phy.log && chmod +x /opt/nvidia/cuBB/aerial_l1_entrypoint.sh && /opt/nvidia/cuBB/aerial_l1_entrypoint.sh"
command
:
bash -c " sudo rm -rf /tmp/phy.log && sudo chmod +x /opt/nvidia/cuBB/aerial_l1_entrypoint.sh && /opt/nvidia/cuBB/aerial_l1_entrypoint.sh"
# command: bash -c "sleep infinity"
healthcheck
:
test
:
[
"
CMD-SHELL"
,
'
grep
-q
"L1
is
ready!"
/tmp/phy.log
&&
echo
0
||
echo
1'
]
interval
:
20s
...
...
@@ -35,7 +36,7 @@ services:
retries
:
5
oai-gnb-aerial
:
cpuset
:
"
13-20"
image
:
oai-gnb-aerial:latest
image
:
oai-gnb-aerial:
w15
# oai-gnb-aerial:
latest
depends_on
:
nv-cubb
:
condition
:
service_healthy
...
...
@@ -57,6 +58,9 @@ services:
tty
:
true
volumes
:
-
../../conf_files/gnb-vnf.sa.band78.273prb.aerial.conf:/opt/oai-gnb/etc/gnb.conf
-
/var/log/aerial:/var/log/aerial
command
:
bash -c "chrt -f 99 /opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.conf | ts | tee /var/log/aerial/oai.log"
# command: bash -c "/opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.conf | ts | tee /var/log/aerial/oai.log"
container_name
:
oai-gnb-aerial
healthcheck
:
test
:
/bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
...
...
doc/tutorial_resources/oai-cn5g/database/oai_db.sql
View file @
8e6b47c4
This diff is collapsed.
Click to expand it.
docker/Dockerfile.gNB.aerial.ubuntu20
View file @
8e6b47c4
...
...
@@ -47,6 +47,11 @@ COPY . .
RUN /bin/sh oaienv && \
tar -xvzf nvipc_src.*.tar.gz && \
cd nvipc_src.* && \
<<<<<<< Updated upstream
=======
# git init && \
# git apply ../cmake_targets/tools/install_libraries_to_system.patch --verbose && \
>>>>>>> Stashed changes
rm -rf build && mkdir build && cd build && \
cmake .. -DNVIPC_DPDK_ENABLE=OFF -DNVIPC_DOCA_ENABLE=OFF -DNVIPC_CUDA_ENABLE=OFF -DENABLE_SLT_RSP=ON && \
make -j && make install
...
...
@@ -76,6 +81,7 @@ RUN apt-get update && \
iperf \
iproute2 \
iputils-ping \
moreutils \
gdb \
libusb-1.0-0 && \
rm -rf /var/lib/apt/lists/*
...
...
@@ -98,4 +104,4 @@ COPY --from=ran-build \
WORKDIR /opt/oai-gnb
COPY --from=ran-build /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
#
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
nfapi/oai_integration/aerial/fapi_nvIPC.c
View file @
8e6b47c4
...
...
@@ -116,15 +116,15 @@ static int ipc_handle_rx_msg(nv_ipc_t *ipc, nv_ipc_msg_t *msg)
// unpack FAPI messages and handle them
if
(
vnf_config
!=
0
)
{
// first, unpack the header
fapi_phy_api_msg
*
fapi_msg
=
calloc
(
1
,
sizeof
(
fapi_phy_api_msg
))
;
if
(
!
(
pull8
(
&
pReadPackedMessage
,
&
fapi_msg
->
num_msg
,
end
)
&&
pull8
(
&
pReadPackedMessage
,
&
fapi_msg
->
opaque_handle
,
end
)
&&
pull16
(
&
pReadPackedMessage
,
&
fapi_msg
->
message_id
,
end
)
&&
pull32
(
&
pReadPackedMessage
,
&
fapi_msg
->
message_length
,
end
)))
{
fapi_phy_api_msg
fapi_msg
;
if
(
!
(
pull8
(
&
pReadPackedMessage
,
&
fapi_msg
.
num_msg
,
end
)
&&
pull8
(
&
pReadPackedMessage
,
&
fapi_msg
.
opaque_handle
,
end
)
&&
pull16
(
&
pReadPackedMessage
,
&
fapi_msg
.
message_id
,
end
)
&&
pull32
(
&
pReadPackedMessage
,
&
fapi_msg
.
message_length
,
end
)))
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"FAPI message header unpack failed
\n
"
);
return
-
1
;
}
switch
(
fapi_msg
->
message_id
)
{
switch
(
fapi_msg
.
message_id
)
{
case
NFAPI_NR_PHY_MSG_TYPE_PARAM_RESPONSE
:
if
(
vnf_config
->
nr_param_resp
)
{
...
...
@@ -210,8 +210,8 @@ static int ipc_handle_rx_msg(nv_ipc_t *ipc, nv_ipc_msg_t *msg)
case
NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION
:
{
nfapi_nr_rx_data_indication_t
ind
;
ind
.
header
.
message_id
=
fapi_msg
->
message_id
;
ind
.
header
.
message_length
=
fapi_msg
->
message_length
;
ind
.
header
.
message_id
=
fapi_msg
.
message_id
;
ind
.
header
.
message_length
=
fapi_msg
.
message_length
;
aerial_unpack_nr_rx_data_indication
(
&
pReadPackedMessage
,
end
,
...
...
@@ -222,20 +222,25 @@ static int ipc_handle_rx_msg(nv_ipc_t *ipc, nv_ipc_msg_t *msg)
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"%s: Handling RX Indication
\n
"
,
__FUNCTION__
);
if
(((
vnf_info
*
)
vnf_config
->
user_data
)
->
p7_vnfs
->
config
->
nr_rx_data_indication
)
{
(((
vnf_info
*
)
vnf_config
->
user_data
)
->
p7_vnfs
->
config
->
nr_rx_data_indication
)(
&
ind
);
for
(
int
i
=
0
;
i
<
ind
.
number_of_pdus
;
++
i
)
{
free
(
ind
.
pdu_list
[
i
].
pdu
);
}
free
(
ind
.
pdu_list
);
}
break
;
}
case
NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION
:
{
nfapi_nr_crc_indication_t
crc_ind
;
crc_ind
.
header
.
message_id
=
fapi_msg
->
message_id
;
crc_ind
.
header
.
message_length
=
fapi_msg
->
message_length
;
crc_ind
.
header
.
message_id
=
fapi_msg
.
message_id
;
crc_ind
.
header
.
message_length
=
fapi_msg
.
message_length
;
aerial_unpack_nr_crc_indication
(
&
pReadPackedMessage
,
end
,
&
crc_ind
,
&
((
vnf_p7_t
*
)((
vnf_info
*
)
vnf_config
->
user_data
)
->
p7_vnfs
->
config
)
->
_public
.
codec_config
);
if
(((
vnf_info
*
)
vnf_config
->
user_data
)
->
p7_vnfs
->
config
->
nr_crc_indication
)
{
(((
vnf_info
*
)
vnf_config
->
user_data
)
->
p7_vnfs
->
config
->
nr_crc_indication
)(
&
crc_ind
);
free
(
crc_ind
.
crc_list
);
}
break
;
}
...
...
@@ -249,6 +254,24 @@ static int ipc_handle_rx_msg(nv_ipc_t *ipc, nv_ipc_msg_t *msg)
if
(((
vnf_info
*
)
vnf_config
->
user_data
)
->
p7_vnfs
->
config
->
nr_uci_indication
)
{
(((
vnf_info
*
)
vnf_config
->
user_data
)
->
p7_vnfs
->
config
->
nr_uci_indication
)(
&
ind
);
for
(
int
i
=
0
;
i
<
ind
.
num_ucis
;
i
++
)
{
if
(
ind
.
uci_list
[
i
].
pdu_type
==
NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE
)
{
if
(
ind
.
uci_list
[
i
].
pucch_pdu_format_2_3_4
.
sr
.
sr_payload
)
{
free
(
ind
.
uci_list
[
i
].
pucch_pdu_format_2_3_4
.
sr
.
sr_payload
);
}
if
(
ind
.
uci_list
[
i
].
pucch_pdu_format_2_3_4
.
harq
.
harq_payload
){
free
(
ind
.
uci_list
[
i
].
pucch_pdu_format_2_3_4
.
harq
.
harq_payload
);
}
if
(
ind
.
uci_list
[
i
].
pucch_pdu_format_2_3_4
.
csi_part1
.
csi_part1_payload
){
free
(
ind
.
uci_list
[
i
].
pucch_pdu_format_2_3_4
.
csi_part1
.
csi_part1_payload
);
}
if
(
ind
.
uci_list
[
i
].
pucch_pdu_format_2_3_4
.
csi_part2
.
csi_part2_payload
){
free
(
ind
.
uci_list
[
i
].
pucch_pdu_format_2_3_4
.
csi_part2
.
csi_part2_payload
);
}
}
}
free
(
ind
.
uci_list
);
ind
.
uci_list
=
NULL
;
}
break
;
...
...
@@ -274,12 +297,13 @@ static int ipc_handle_rx_msg(nv_ipc_t *ipc, nv_ipc_msg_t *msg)
&
((
vnf_p7_t
*
)((
vnf_info
*
)
vnf_config
->
user_data
)
->
p7_vnfs
->
config
)
->
_public
.
codec_config
);
if
(((
vnf_info
*
)
vnf_config
->
user_data
)
->
p7_vnfs
->
config
->
nr_rach_indication
)
{
(((
vnf_info
*
)
vnf_config
->
user_data
)
->
p7_vnfs
->
config
->
nr_rach_indication
)(
&
ind
);
free
(
ind
.
pdu_list
);
}
break
;
}
default:
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s P5 Unknown message ID %d
\n
"
,
__FUNCTION__
,
fapi_msg
->
message_id
);
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s P5 Unknown message ID %d
\n
"
,
__FUNCTION__
,
fapi_msg
.
message_id
);
break
;
}
...
...
nfapi/oai_integration/aerial/fapi_vnf_p5.c
View file @
8e6b47c4
...
...
@@ -55,7 +55,18 @@ void *aerial_vnf_nr_aerial_p7_start_thread(void *ptr)
void
*
aerial_vnf_nr_p7_thread_start
(
void
*
ptr
)
{
// set_thread_priority(79);
<<<<<<<
Updated
upstream
=======
int
s
;
// cpu_set_t cpuset;
// CPU_SET(8, &cpuset);
// s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
// if (s != 0)
// printf("failed to set afinity\n");
>>>>>>>
Stashed
changes
set_priority
(
79
);
pthread_attr_t
ptAttr
;
...
...
@@ -745,11 +756,8 @@ int oai_fapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req)
int
oai_fapi_send_end_request
(
int
cell
,
uint32_t
frame
,
uint32_t
slot
){
nfapi_vnf_p7_config_t
*
p7_config
=
aerial_vnf
.
p7_vnfs
[
0
].
config
;
nfapi_nr_slot_indication_scf_t
*
nr_slot_resp
=
CALLOC
(
1
,
sizeof
(
*
nr_slot_resp
));
nr_slot_resp
->
header
.
message_id
=
0x8F
;
nr_slot_resp
->
sfn
=
frame
;
nr_slot_resp
->
slot
=
slot
;
int
retval
=
fapi_nr_pack_and_send_p7_message
((
vnf_p7_t
*
)
p7_config
,
&
nr_slot_resp
->
header
);
nfapi_nr_slot_indication_scf_t
nr_slot_resp
=
{.
header
.
message_id
=
0x8F
,
.
sfn
=
frame
,
.
slot
=
slot
};
int
retval
=
fapi_nr_pack_and_send_p7_message
((
vnf_p7_t
*
)
p7_config
,
&
nr_slot_resp
.
header
);
if
(
retval
!=
0
)
{
LOG_E
(
PHY
,
"%s() Problem sending retval:%d
\n
"
,
__FUNCTION__
,
retval
);
}
...
...
nfapi/oai_integration/aerial/fapi_vnf_p7.c
View file @
8e6b47c4
...
...
@@ -358,7 +358,8 @@ int aerial_phy_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind)
rx_ind
->
pdu_list
[
j
].
ul_cqi
=
ind
->
pdu_list
[
j
].
ul_cqi
;
rx_ind
->
pdu_list
[
j
].
timing_advance
=
ind
->
pdu_list
[
j
].
timing_advance
;
rx_ind
->
pdu_list
[
j
].
rssi
=
ind
->
pdu_list
[
j
].
rssi
;
rx_ind
->
pdu_list
[
j
].
pdu
=
ind
->
pdu_list
[
j
].
pdu
;
rx_ind
->
pdu_list
[
j
].
pdu
=
calloc
(
rx_ind
->
pdu_list
[
j
].
pdu_length
,
sizeof
(
uint8_t
));
memcpy
(
rx_ind
->
pdu_list
[
j
].
pdu
,
ind
->
pdu_list
[
j
].
pdu
,
ind
->
pdu_list
[
j
].
pdu_length
);
LOG_D
(
NR_MAC
,
"(%d.%d) Handle %d for index %d, RNTI, %04x, HARQID %d
\n
"
,
ind
->
sfn
,
...
...
@@ -472,19 +473,19 @@ int aerial_phy_nr_uci_indication(nfapi_nr_uci_indication_t *ind)
uci_ind_pdu
->
sr
.
sr_payload
=
CALLOC
(
1
,
sizeof
(
*
uci_ind_pdu
->
sr
.
sr_payload
));
AssertFatal
(
uci_ind_pdu
->
sr
.
sr_payload
!=
NULL
,
"Memory not allocated for uci_ind_pdu->sr.sr_payload in phy_nr_uci_indication."
);
*
uci_ind_pdu
->
sr
.
sr_payload
=
*
ind_pdu
->
sr
.
sr_payload
;
memcpy
(
uci_ind_pdu
->
sr
.
sr_payload
,
ind_pdu
->
sr
.
sr_payload
,
sizeof
(
*
uci_ind_pdu
->
sr
.
sr_payload
))
;
}
if
(
ind_pdu
->
csi_part1
.
csi_part1_payload
)
{
uci_ind_pdu
->
csi_part1
.
csi_part1_payload
=
CALLOC
(
1
,
sizeof
(
*
uci_ind_pdu
->
csi_part1
.
csi_part1_payload
));
AssertFatal
(
uci_ind_pdu
->
csi_part1
.
csi_part1_payload
!=
NULL
,
"Memory not allocated for uci_ind_pdu->csi_part1.csi_part1_payload in phy_nr_uci_indication."
);
*
uci_ind_pdu
->
csi_part1
.
csi_part1_payload
=
*
ind_pdu
->
csi_part1
.
csi_part1_payload
;
memcpy
(
uci_ind_pdu
->
csi_part1
.
csi_part1_payload
,
ind_pdu
->
csi_part1
.
csi_part1_payload
,
sizeof
(
*
uci_ind_pdu
->
csi_part1
.
csi_part1_payload
))
;
}
if
(
ind_pdu
->
csi_part2
.
csi_part2_payload
)
{
uci_ind_pdu
->
csi_part2
.
csi_part2_payload
=
CALLOC
(
1
,
sizeof
(
*
uci_ind_pdu
->
csi_part2
.
csi_part2_payload
));
AssertFatal
(
uci_ind_pdu
->
csi_part2
.
csi_part2_payload
!=
NULL
,
"Memory not allocated for uci_ind_pdu->csi_part2.csi_part2_payload in phy_nr_uci_indication."
);
*
uci_ind_pdu
->
csi_part2
.
csi_part2_payload
=
*
ind_pdu
->
csi_part2
.
csi_part2_payload
;
memcpy
(
uci_ind_pdu
->
csi_part2
.
csi_part2_payload
,
ind_pdu
->
csi_part2
.
csi_part2_payload
,
sizeof
(
*
uci_ind_pdu
->
csi_part2
.
csi_part2_payload
))
;
}
break
;
}
...
...
@@ -920,8 +921,7 @@ static uint8_t aerial_unpack_nr_rx_data_indication_body(nfapi_nr_rx_data_pdu_t *
}
// Allocate space for the pdu to be unpacked later
uint32_t
length
=
value
->
pdu_length
;
value
->
pdu
=
nfapi_p7_allocate
(
sizeof
(
*
value
->
pdu
)
*
length
,
config
);
value
->
pdu
=
nfapi_p7_allocate
(
sizeof
(
*
value
->
pdu
)
*
value
->
pdu_length
,
config
);
return
1
;
}
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
8e6b47c4
...
...
@@ -267,6 +267,9 @@ static void free_unqueued_nfapi_indications(nfapi_nr_rach_indication_t *rach_ind
}
if
(
rx_ind
&&
rx_ind
->
number_of_pdus
>
0
)
{
for
(
int
i
=
0
;
i
<
rx_ind
->
number_of_pdus
;
++
i
)
{
free_and_zero
(
rx_ind
->
pdu_list
[
i
].
pdu
);
}
free_and_zero
(
rx_ind
->
pdu_list
);
free_and_zero
(
rx_ind
);
}
...
...
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