Commit 9547cb4f authored by Raphael Defosseux's avatar Raphael Defosseux

Merge branch 'integration_2022_wk14' into 'develop'

integration_2022_wk14

See merge request oai/openairinterface5g!1519

MR 1471 : L2 sim fixes and 5G SA L2SIM CI integration  
MR 1325 : SDAP  
Cherry-picks on MR 1517 : correct gNB fail detection  
MR 1464 : LDPC decoder memory optim  
MR 1514 : Amarisoft UE automation
parents baa76323 6ad71e29
......@@ -238,6 +238,26 @@ pipeline {
}
}
}
stage ("5G L2 Simulators") {
when { expression {doMandatoryTests} }
steps {
script {
triggerSlaveJob ('RAN-L2-Sim-Test-5G', 'Test-L2-Sim-Container-5G')
}
}
post {
always {
script {
finalizeSlaveJob('RAN-L2-Sim-Test-5G')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
}
}
}
}
stage ("NSA B200 Sanity Check") {
when { expression {doMandatoryTests} }
steps {
......
#!/bin/bash
ue_id="$1" # UE id
duration="$2" # Sim duration
shift
shift
function end
{
exit 0
}
trap end INT TERM
echo "ip netns exec $ue_id $@ > /tmp/test_${ue_id}.log"
ip netns exec $ue_id $@ > /tmp/test_$ue_id.log
/* UE simulator configuration */
/* UE simulator configuration file version 2021-06-17
* LTE / 5G Non StandAlone
* Copyright (C) 2019-2021 Amarisoft
*/
{
#define N_ANTENNA_DL 1
#define TDD 1
#define CELL_BANDWIDTH 40
#define UE_COUNT 3 // number of simulated UEs 208970100001127, 208970100001128, 208970100001129
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
log_filename: "/tmp/ue0.log",
/* Enable remote API and Web interface */
com_addr: "0.0.0.0:9002",
include "rf_driver/1chan.cfg",
/* If true, allow the simulation of several UEs at the same time and allow dynamic UE creation from remote API */
cell_groups: [{
group_type: "nr",
multi_ue: true,
cells: [{
rf_port: 0,
bandwidth: CELL_BANDWIDTH,
#if TDD == 1
band: 78,
dl_nr_arfcn:621312,
ssb_nr_arfcn:621312,
//band: 41,
//dl_nr_arfcn:517020,
//ssb_nr_arfcn:516990,
#else
band: 7,
dl_nr_arfcn: 536020,
ssb_nr_arfcn: 535930,
ssb_subcarrier_spacing: 15,
#endif
subcarrier_spacing: 30,
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: 1,
rx_to_tx_latency:2,
}],
}],
/* Enable it to allow sim_events to be handled remotely */
//rue_bind_addr: "127.0.10.11",
ue_list: [
{
/* UE capabilities */
/* USIM data */
"ue_id" : 0,
"imsi": "208970100001127",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [
{
sst: 1,
sd: 66051,
},
],
default_pdu_session_snssai: {
sst: 1,
sd: 66051,
},
/* Enable it to allow sim_events to be handled remotely */
//rue_addr: "127.1.0.0",
/* Enable it to create a TUN interface for each UE PDN */
tun_setup_script: "ue-ifup",
sim_events: [
{
event: "power_on",
start_time: 5,
},
{
event: "power_off",
start_time: 30,
}
] /*end sim events */
}, /*end UE object 0*/
{
/* UE capabilities */
/* USIM data */
"ue_id" : 1,
"imsi": "208970100001128",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [
{
sst: 1,
sd: 66051,
},
],
default_pdu_session_snssai: {
sst: 1,
sd: 66051,
},
/* Enable it to allow sim_events to be handled remotely */
//rue_addr: "127.1.0.0",
/* Enable it to create a TUN interface for each UE PDN */
tun_setup_script: "ue-ifup",
sim_events: [
{
event: "power_on",
start_time: 5,
},
{
event: "power_off",
start_time: 30,
}
] /*end sim events */
}, /*end UE object 1*/
{
/* UE capabilities */
/* USIM data */
"ue_id" : 2,
"imsi": "208970100001129",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [
{
sst: 1,
sd: 66051,
},
],
default_pdu_session_snssai: {
sst: 1,
sd: 66051,
},
/* Enable it to allow sim_events to be handled remotely */
//rue_addr: "127.1.0.0",
/* Enable it to create a TUN interface for each UE PDN */
tun_setup_script: "ue-ifup",
sim_events: [
{
event: "power_on",
start_time: 5,
},
{
event: "power_off",
start_time: 30,
}
] /*end sim events */
} /*end UE object 2*/
],/*end UE list*/
}/*end json*/
/* UE simulator configuration */
/* UE simulator configuration file version 2021-06-17
* LTE / 5G Non StandAlone
* Copyright (C) 2019-2021 Amarisoft
*/
{
#define N_ANTENNA_DL 1
#define TDD 1
#define CELL_BANDWIDTH 40
#define UE_COUNT 2 // number of simulated UEs 208970100001127, 208970100001128, 208970100001129
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
log_filename: "/tmp/ue0.log",
/* Enable remote API and Web interface */
com_addr: "0.0.0.0:9002",
include "rf_driver/1chan.cfg",
/* If true, allow the simulation of several UEs at the same time and allow dynamic UE creation from remote API */
cell_groups: [{
group_type: "nr",
multi_ue: true,
cells: [{
rf_port: 0,
bandwidth: CELL_BANDWIDTH,
#if TDD == 1
band: 78,
dl_nr_arfcn:621312,
ssb_nr_arfcn:621312,
//band: 41,
//dl_nr_arfcn:517020,
//ssb_nr_arfcn:516990,
#else
band: 7,
dl_nr_arfcn: 536020,
ssb_nr_arfcn: 535930,
ssb_subcarrier_spacing: 15,
#endif
subcarrier_spacing: 30,
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: 1,
rx_to_tx_latency:2,
}],
}],
/* Enable it to allow sim_events to be handled remotely */
//rue_bind_addr: "127.0.10.11",
ue_list: [
{
/* UE capabilities */
/* USIM data */
"ue_id" : 1,
"imsi": "208970100001127",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [
{
sst: 1,
sd: 66051,
},
],
default_pdu_session_snssai: {
sst: 1,
sd: 66051,
},
/* Enable it to allow sim_events to be handled remotely */
//rue_addr: "127.1.0.0",
/* Enable it to create a TUN interface for each UE PDN */
tun_setup_script: "ue-ifup",
sim_events: [
{
event: "power_on",
start_time: 5,
},
{
event: "power_off",
start_time: 30,
}
] /*end sim events */
}, /*end UE object 0*/
{
/* UE capabilities */
/* USIM data */
"ue_id" : 2,
"imsi": "208970100001128",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [
{
sst: 1,
sd: 66051,
},
],
default_pdu_session_snssai: {
sst: 1,
sd: 66051,
},
/* Enable it to allow sim_events to be handled remotely */
//rue_addr: "127.1.0.0",
/* Enable it to create a TUN interface for each UE PDN */
tun_setup_script: "ue-ifup",
sim_events: [
{
event: "power_on",
start_time: 5,
},
{
"tag": "ping",
"prog":"oai_ext_app.sh",
start_time: 15,
end_time: 25,
"args":["ping 192.168.70.136"],
"event":"ext_app"
},
{
event: "power_off",
start_time: 30,
}
] /*end sim events */
} /*end UE object 1*/
],/*end UE list*/
}/*end json*/
/* UE simulator configuration */
/* UE simulator configuration file version 2021-06-17
* LTE / 5G Non StandAlone
* Copyright (C) 2019-2021 Amarisoft
*/
{
#define N_ANTENNA_DL 1
#define TDD 1
#define CELL_BANDWIDTH 40
#define UE_COUNT 2 // number of simulated UEs 208970100001127, 208970100001128, 208970100001129
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
log_filename: "/tmp/ue0.log",
/* Enable remote API and Web interface */
com_addr: "0.0.0.0:9002",
include "rf_driver/1chan.cfg",
/* If true, allow the simulation of several UEs at the same time and allow dynamic UE creation from remote API */
cell_groups: [{
group_type: "nr",
multi_ue: true,
cells: [{
rf_port: 0,
bandwidth: CELL_BANDWIDTH,
#if TDD == 1
band: 78,
dl_nr_arfcn:621312,
ssb_nr_arfcn:621312,
//band: 41,
//dl_nr_arfcn:517020,
//ssb_nr_arfcn:516990,
#else
band: 7,
dl_nr_arfcn: 536020,
ssb_nr_arfcn: 535930,
ssb_subcarrier_spacing: 15,
#endif
subcarrier_spacing: 30,
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: 1,
rx_to_tx_latency:2,
}],
}],
/* Enable it to allow sim_events to be handled remotely */
//rue_bind_addr: "127.0.10.11",
ue_list: [
{
/* UE capabilities */
/* USIM data */
"ue_id" : 1,
"imsi": "208970100001127",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [
{
sst: 1,
sd: 66051,
},
],
default_pdu_session_snssai: {
sst: 1,
sd: 66051,
},
/* Enable it to allow sim_events to be handled remotely */
//rue_addr: "127.1.0.0",
/* Enable it to create a TUN interface for each UE PDN */
tun_setup_script: "ue-ifup",
sim_events: [
{
event: "power_on",
start_time: 5,
},
{
"tag": "ping",
"prog":"oai_ext_app.sh",
start_time: 15,
end_time: 25,
"args":["ping 192.168.70.136"],
"event":"ext_app"
},
{
event: "power_off",
start_time: 30,
}
] /*end sim events */
}, /*end UE object 0*/
{
/* UE capabilities */
/* USIM data */
"ue_id" : 2,
"imsi": "208970100001128",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [
{
sst: 1,
sd: 66051,
},
],
default_pdu_session_snssai: {
sst: 1,
sd: 66051,
},
/* Enable it to allow sim_events to be handled remotely */
//rue_addr: "127.1.0.0",
/* Enable it to create a TUN interface for each UE PDN */
tun_setup_script: "ue-ifup",
sim_events: [
{
event: "power_on",
start_time: 5,
},
{
"tag": "ping",
"prog":"oai_ext_app.sh",
start_time: 15,
end_time: 25,
"args":["ping 192.168.70.136"],
"event":"ext_app"
},
{
event: "power_off",
start_time: 30,
}
] /*end sim events */
} /*end UE object 1*/
],/*end UE list*/
}/*end json*/
/* UE simulator configuration */
/* UE simulator configuration file version 2021-06-17
* LTE / 5G Non StandAlone
* Copyright (C) 2019-2021 Amarisoft
*/
{
#define N_ANTENNA_DL 1
#define TDD 1
#define CELL_BANDWIDTH 40
#define UE_COUNT 2 // number of simulated UEs 208970100001127, 208970100001128, 208970100001129
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
log_filename: "/tmp/ue0.log",
/* Enable remote API and Web interface */
com_addr: "0.0.0.0:9002",
include "rf_driver/1chan.cfg",
/* If true, allow the simulation of several UEs at the same time and allow dynamic UE creation from remote API */
cell_groups: [{
group_type: "nr",
multi_ue: true,
cells: [{
rf_port: 0,
bandwidth: CELL_BANDWIDTH,
#if TDD == 1
band: 78,
dl_nr_arfcn:621312,
ssb_nr_arfcn:621312,
//band: 41,
//dl_nr_arfcn:517020,
//ssb_nr_arfcn:516990,
#else
band: 7,
dl_nr_arfcn: 536020,
ssb_nr_arfcn: 535930,
ssb_subcarrier_spacing: 15,
#endif
subcarrier_spacing: 30,
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: 1,
rx_to_tx_latency:2,
}],
}],
/* Enable it to allow sim_events to be handled remotely */
//rue_bind_addr: "127.0.10.11",
ue_list: [
{
/* UE capabilities */
/* USIM data */
"ue_id" : 1,
"imsi": "208970100001127",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [
{
sst: 1,
sd: 66051,
},
],
default_pdu_session_snssai: {
sst: 1,
sd: 66051,
},
/* Enable it to allow sim_events to be handled remotely */
//rue_addr: "127.1.0.0",
/* Enable it to create a TUN interface for each UE PDN */
tun_setup_script: "ue-ifup",
sim_events: [
{
event: "power_on",
start_time: 5,
},
{
"tag": "ping",
"prog":"oai_ext_app.sh",
start_time: 20,
end_time: 30,
"args":["ping 192.168.70.136"],
"event":"ext_app"
},
{
event: "power_off",
start_time: 60,
}
] /*end sim events */
}, /*end UE object 0*/
{
/* UE capabilities */
/* USIM data */
"ue_id" : 2,
"imsi": "208970100001128",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [
{
sst: 1,
sd: 66051,
},
],
default_pdu_session_snssai: {
sst: 1,
sd: 66051,
},
/* Enable it to allow sim_events to be handled remotely */
//rue_addr: "127.1.0.0",
/* Enable it to create a TUN interface for each UE PDN */
tun_setup_script: "ue-ifup",
sim_events: [
{
event: "power_on",
start_time: 5,
},
{
"tag": "ping",
"prog":"oai_ext_app.sh",
start_time: 40,
end_time: 50,
"args":["ping 192.168.70.136"],
"event":"ext_app"
},
{
event: "power_off",
start_time: 60,
}
] /*end sim events */
} /*end UE object 1*/
],/*end UE list*/
}/*end json*/
/* UE simulator configuration */
/* UE simulator configuration file version 2021-06-17
* LTE / 5G Non StandAlone
* Copyright (C) 2019-2021 Amarisoft
*/
{
#define N_ANTENNA_DL 1
#define TDD 1
#define CELL_BANDWIDTH 40
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
log_filename: "/tmp/ue1.log",
/* Enable remote API and Web interface */
com_addr: "0.0.0.0:9002",
include "rf_driver/1chan.cfg",
/* If true, allow the simulation of several UEs at the same time and
allow dynamic UE creation from remote API */
cell_groups: [{
group_type: "nr",
multi_ue: false,
cells: [{
rf_port: 0,
bandwidth: CELL_BANDWIDTH,
#if TDD == 1
band: 78,
dl_nr_arfcn:621312,
ssb_nr_arfcn:621312,
//band: 41,
//dl_nr_arfcn:517020,
//ssb_nr_arfcn:516990,
#else
band: 7,
dl_nr_arfcn: 536020,
ssb_nr_arfcn: 535930,
ssb_subcarrier_spacing: 15,
#endif
subcarrier_spacing: 30,
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: 1,
rx_to_tx_latency:2,
}],
}],
/* Enable it to allow sim_events to be handled remotely */
//rue_bind_addr: "127.0.10.11",
ue_list: [
{
/* UE capabilities */
/* USIM data */
"imsi": "208970100001127",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [
{
sst: 1,
sd: 66051,
},
],
default_pdu_session_snssai: {
sst: 1,
sd: 66051,
},
/* Enable it to allow sim_events to be handled remotely */
//rue_addr: "127.1.0.0",
/* Enable it to create a TUN interface for each UE PDN */
tun_setup_script: "ue-ifup",
sim_events: [{
event: "power_on",
start_time: 5,
}, {
"tag": "ping",
"prog":"oai_ext_app.sh",
start_time: 15,
end_time: 25,
"args":["ping 192.168.70.136"],
"event":"ext_app"
},
{
event: "power_off",
start_time: 30,
}]
}
],
}
/* UE simulator configuration */
/* UE simulator configuration file version 2021-06-17
* LTE / 5G Non StandAlone
* Copyright (C) 2019-2021 Amarisoft
*/
{
#define N_ANTENNA_DL 1
#define TDD 1
#define CELL_BANDWIDTH 20
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
log_filename: "/tmp/ue0.log",
/* Enable remote API and Web interface */
com_addr: "0.0.0.0:9002",
include "rf_driver/1chan.cfg",
/* If true, allow the simulation of several UEs at the same time and
allow dynamic UE creation from remote API */
cell_groups: [{
group_type: "nr",
multi_ue: false,
cells: [{
rf_port: 0,
bandwidth: CELL_BANDWIDTH,
#if TDD == 1
// band: 78,
// dl_nr_arfcn:621312,
// ssb_nr_arfcn:621312,*/
band: 41,
dl_nr_arfcn:517020,
ssb_nr_arfcn:516990,
#else
band: 7,
dl_nr_arfcn: 536020,
ssb_nr_arfcn: 535930,
ssb_subcarrier_spacing: 15,
#endif
subcarrier_spacing: 30,
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: 1,
rx_to_tx_latency:2,
}],
}],
/* Enable it to allow sim_events to be handled remotely */
//rue_bind_addr: "127.0.10.11",
ue_list: [
{
/* UE capabilities */
/* USIM data */
"imsi": "208970100001127",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [
{
sst: 1,
sd: 1,
},
],
default_pdu_session_snssai: {
sst: 1,
sd: 1,
},
/* Enable it to allow sim_events to be handled remotely */
//rue_addr: "127.1.0.0",
/* Enable it to create a TUN interface for each UE PDN */
tun_setup_script: "ue-ifup",
sim_events: [{
event: "power_on",
start_time: 5,
}, {
event: "ext_app",
start_time: 15,
end_time: 25,
prog: "ext_app.sh",
args: ["iperf", " -c 172.21.10.5", " -u"," -b 1M"," -i 1"," -t 10"]
}, {
event: "power_off",
start_time: 30,
}]
}
],
}
......@@ -39,6 +39,53 @@ nrmodule2_quectel:
StartCommands :
- sudo -S ip link set dev wwan1 mtu 1500
MTU : 1500
#single UE single ping
amarisoft_ue_1:
ID: amarisoft_ue_1
State : enabled
Kind : amarisoft
#not required for AS config but needed for py script
WakeupScript : none
DetachScript : none
#end
Cmd : /root/NV17-12-21/ue/lteue
Config : /root/NV17-12-21/ue/config/oaicicd-ue-Ping-SATest.cfg
Duration : 60
Ping : /tmp/test_ue1.log
UELog : /tmp/ue1.log
HostIPAddress : 192.168.18.89
HostUsername : root
HostPassword : toor
HostSourceCodePath : /tmp
#an other scenario example
#notice : this will not work as such, only suggestion for multi ue scenario
amarisoft_ue_2:
ID: amarisoft_ue_2
State : enabled
Kind : amarisoft
#not required for AS config but needed for py script
WakeupScript : none
DetachScript : none
#end
Cmd : /root/NV17-12-21/ue/lteue
Config : /root/NV17-12-21/ue/config/xxxxxxx.cfg #to be updated for an other scenario
Duration : 60
Ping :
- /tmp/test_ue1.log #to be updated fo an other scenario
- /tmp/test_ue2.log #could be a list for a multi ue scenario
UELog :
- /tmp/ue1.log
- /tmp/ue1.log
HostIPAddress : 192.168.18.89
HostUsername : root
HostPassword : toor
HostSourceCodePath : /tmp
#do not remove
dummy:
ID: ''
State : ''
......
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Required Python Version
# Python 3.x
#
#---------------------------------------------------------------------
#to use isfile
import os
import sys
import logging
#to create a SSH object locally in the methods
import sshconnection
#time.sleep
import time
import re
import subprocess
from datetime import datetime
class AS_UE:
def __init__(self,Module):
#create attributes as in the UE dictionary
for k, v in Module.items():
setattr(self, k, v)
#-----------------$
#PUBLIC Methods$
#-----------------$
def WaitEndScenario(self):
logging.debug('waiting for scenario duration')
time.sleep(int(self.Duration))
def KillASUE(self):
mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
mySSH.command('killall --signal SIGKILL lteue-avx2', '#', 5)
mySSH.close()
def RunScenario(self):
mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
logging.debug("Deleting old artifacts :")
cmd='rm -rf ' + self.Ping + ' ' + self.UELog
mySSH.command(cmd,'#',5)
logging.debug("Running scenario :")
cmd='echo $USER; nohup '+self.Cmd + ' ' + self.Config + ' &'
mySSH.command(cmd,'#',5)
mySSH.close()
......@@ -93,6 +93,7 @@ class Containerize():
self.allImagesSize = {}
self.collectInfo = {}
self.deployedContainers = []
self.tsharkStarted = False
self.pingContName = ''
self.pingOptions = ''
......@@ -682,12 +683,28 @@ class Containerize():
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps -a'
count = 0
healthy = 0
newContainers = []
while (count < 10):
count += 1
containerStatus = []
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
healthy = 0
for state in deployStatus.split('\n'):
res = re.search('Name|----------', state)
if res is not None:
continue
if len(state) == 0:
continue
res = re.search('^(?P<container_name>[a-zA-Z0-9\-\_]+) ', state)
if res is not None:
cName = res.group('container_name')
found = False
for alreadyDeployed in self.deployedContainers:
if cName == alreadyDeployed:
found = True
if not found:
newContainers.append(cName)
self.deployedContainers.append(cName)
if re.search('Up \(healthy\)', state) is not None:
healthy += 1
if re.search('rfsim4g-db-init.*Exit 0', state) is not None:
......@@ -698,16 +715,33 @@ class Containerize():
else:
time.sleep(10)
imagesInfo = ''
for newCont in newContainers:
cmd = 'docker inspect -f "{{.Config.Image}}" ' + newCont
imageName = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
imageName = str(imageName).strip()
cmd = 'docker image inspect --format "{{.RepoTags}}\t{{.Size}}\t{{.Created}}" ' + imageName
imagesInfo += subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
html_queue = SimpleQueue()
html_cell = '<pre style="background-color:white">\n'
for imageInfo in imagesInfo.split('\n'):
html_cell += imageInfo[:-11] + '\n'
html_cell += '\n'
for cState in containerStatus:
html_cell += cState + '\n'
html_cell += '</pre>'
html_queue.put(html_cell)
if count == 100 and healthy == self.nb_healthy[0]:
if self.tsharkStarted == False:
logging.debug('Starting tshark on public network')
self.CaptureOnDockerNetworks()
HTML.CreateHtmlTestRow('n/a', 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRowQueue('n/a', 'OK', 1, html_queue)
for cState in containerStatus:
logging.debug(cState)
logging.info('\u001B[1m Deploying OAI Object(s) PASS\u001B[0m')
else:
HTML.CreateHtmlTestRow('Could not deploy in time', 'KO', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRowQueue('Could not deploy in time', 'KO', 1, html_queue)
for cState in containerStatus:
logging.debug(cState)
logging.error('\u001B[1m Deploying OAI Object(s) FAILED\u001B[0m')
......@@ -726,10 +760,12 @@ class Containerize():
cmd = 'sudo nohup tshark -f "(host 192.168.61.11 and icmp) or (not host 192.168.61.11 and not host 192.168.61.30 and not arp and not port 53 and not port 2152)"'
elif re.search('5g.*rfsimulator', self.yamlPath[0]) is not None:
cmd = 'sudo nohup tshark -f "(host 192.168.72.135 and icmp) or (not host 192.168.72.135 and not host 192.168.71.150 and not arp and not port 53 and not port 2152 and not port 2153)"'
elif re.search('5g_l2sim', self.yamlPath[0]) is not None:
cmd = 'sudo nohup tshark -f "(host 192.168.72.135 and icmp) or (not host 192.168.72.135 and not arp and not port 53 and not port 2152 and not port 2153)"'
else:
return
for name in networkNames.split('\n'):
if re.search('rfsim', name) is not None:
if re.search('rfsim', name) is not None or re.search('l2sim', name) is not None:
cmd += ' -i ' + name
cmd += ' -w /tmp/capture_'
ymlPath = self.yamlPath[0].split('/')
......@@ -781,7 +817,7 @@ class Containerize():
# Analyzing log file(s)!
listOfPossibleRanContainers = ['enb', 'gnb', 'cu', 'du']
for container in listOfPossibleRanContainers:
filename = self.yamlPath[0] + '/rfsim?g-oai-' + container + '.log'
filename = self.yamlPath[0] + '/*-oai-' + container + '.log'
cmd = 'ls ' + filename
containerStatus = True
try:
......@@ -803,7 +839,7 @@ class Containerize():
listOfPossibleUeContainers = ['lte-ue*', 'nr-ue*']
for container in listOfPossibleUeContainers:
filename = self.yamlPath[0] + '/rfsim?g-oai-' + container + '.log'
filename = self.yamlPath[0] + '/*-oai-' + container + '.log'
cmd = 'ls ' + filename
containerStatus = True
try:
......@@ -851,6 +887,7 @@ class Containerize():
logging.error('\u001B[1m Undeploying OAI Object(s) FAILED\u001B[0m')
return
self.deployedContainers = []
# Cleaning any created tmp volume
cmd = 'docker volume prune --force || true'
logging.debug(cmd)
......@@ -863,6 +900,40 @@ class Containerize():
HTML.CreateHtmlTestRow('n/a', 'KO', CONST.ALL_PROCESSES_OK)
logging.info('\u001B[1m Undeploying OAI Object(s) FAIL\u001B[0m')
def StatsFromGenObject(self, HTML):
self.exitStatus = 0
ymlPath = self.yamlPath[0].split('/')
logPath = '../cmake_targets/log/' + ymlPath[1]
# if the containers are running, recover the logs!
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all'
logging.debug(cmd)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
cmd = 'docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}" '
anyLogs = False
for state in deployStatus.split('\n'):
res = re.search('Name|----------', state)
if res is not None:
continue
if len(state) == 0:
continue
res = re.search('^(?P<container_name>[a-zA-Z0-9\-\_]+) ', state)
if res is not None:
anyLogs = True
cmd += res.group('container_name') + ' '
message = ''
if anyLogs:
logging.debug(cmd)
stats = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
for statLine in stats.split('\n'):
logging.debug(statLine)
message += statLine + '\n'
html_queue = SimpleQueue()
html_cell = '<pre style="background-color:white">\n' + message + '</pre>'
html_queue.put(html_cell)
HTML.CreateHtmlTestRowQueue(self.pingOptions, 'OK', 1, html_queue)
def PingFromContainer(self, HTML, RAN, UE):
self.exitStatus = 0
ymlPath = self.yamlPath[0].split('/')
......
This diff is collapsed.
......@@ -231,7 +231,7 @@ RUs = (
local_rf = "yes"
nb_tx = 2
nb_rx = 2
att_tx = 0
att_tx = 10
att_rx = 5;
bands = [38];
max_pdschReferenceSignalPower = -27;
......
......@@ -33,9 +33,6 @@ gNBs =
////////// Physical parameters:
ssb_SubcarrierOffset = 0;
pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1;
ul_prbblacklist = "51,52,53,54"
min_rxtxtime = 6;
pdcch_ConfigSIB1 = (
{
......@@ -73,15 +70,6 @@ gNBs =
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#pdsch-ConfigCommon
#pdschTimeDomainAllocationList (up to 16 entries)
initialDLBWPk0_0 = 0; #for DL slot
initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB
initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13
initialDLBWPk0_1 = 0; #for mixed slot
initialDLBWPmappingType_1 = 0;
initialDLBWPstartSymbolAndLength_1 = 57; #this is SS=1,L=5
#uplinkConfigCommon
#frequencyInfoUL
......@@ -136,19 +124,6 @@ gNBs =
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
# pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1;
initialULBWPstartSymbolAndLength_1 = 52; # this is SS=10 L=4
initialULBWPk2_2 = 7; # used for Msg.3 during RA
initialULBWPmappingType_2 = 1;
initialULBWPstartSymbolAndLength_2 = 52; # this is SS=10 L=4
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
......
log_config = {
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
};
uicc0 = {
imsi = "208950000000031";
key = "0c0a34601d4f07677303652c0462535b";
opc= "63bfa50ee6523365ff14c1f45f88737d";
dnn= "oai";
nssai_sst=222;
nssai_sd=123;
}
L1s = (
{
num_cc = 1;
tr_n_preference = "nfapi";
local_n_if_name = "ens3";
remote_n_address = "127.0.0.1"; //Proxy IP
local_n_address = "127.0.0.1";
local_n_portc = 50600;
remote_n_portc = 50601;
local_n_portd = 50610;
remote_n_portd = 50611;
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 90
att_rx = 0;
bands = [7,38,42,43];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
}
);
log_config = {
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
};
uicc0 = {
imsi = "208950000000032";
key = "0c0a34601d4f07677303652c0462535b";
opc= "63bfa50ee6523365ff14c1f45f88737d";
dnn= "oai";
nssai_sst=222;
nssai_sd=123;
}
L1s = (
{
num_cc = 1;
tr_n_preference = "nfapi";
local_n_if_name = "ens3";
remote_n_address = "127.0.0.1"; //Proxy IP
local_n_address = "127.0.0.1";
local_n_portc = 50600;
remote_n_portc = 50601;
local_n_portd = 50610;
remote_n_portd = 50611;
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 90
att_rx = 0;
bands = [7,38,42,43];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
}
);
log_config = {
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
};
uicc0 = {
imsi = "208950000000033";
key = "0c0a34601d4f07677303652c0462535b";
opc= "63bfa50ee6523365ff14c1f45f88737d";
dnn= "oai";
nssai_sst=222;
nssai_sd=123;
}
L1s = (
{
num_cc = 1;
tr_n_preference = "nfapi";
local_n_if_name = "ens3";
remote_n_address = "127.0.0.1"; //Proxy IP
local_n_address = "127.0.0.1";
local_n_portc = 50600;
remote_n_portc = 50601;
local_n_portd = 50610;
remote_n_portd = 50611;
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 90
att_rx = 0;
bands = [7,38,42,43];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
}
);
log_config = {
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
};
uicc0 = {
imsi = "208950000000034";
key = "0c0a34601d4f07677303652c0462535b";
opc= "63bfa50ee6523365ff14c1f45f88737d";
dnn= "oai";
nssai_sst=222;
nssai_sd=123;
}
L1s = (
{
num_cc = 1;
tr_n_preference = "nfapi";
local_n_if_name = "ens3";
remote_n_address = "127.0.0.1"; //Proxy IP
local_n_address = "127.0.0.1";
local_n_portc = 50600;
remote_n_portc = 50601;
local_n_portd = 50610;
remote_n_portd = 50611;
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 90
att_rx = 0;
bands = [7,38,42,43];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
}
);
......@@ -22,9 +22,14 @@ gNBs =
////////// Physical parameters:
ssb_SubcarrierOffset = 31; //0;
pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1;
min_rxtxtime = 6;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......@@ -54,15 +59,6 @@ gNBs =
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 0;
initialDLBWPsearchSpaceZero = 0;
#pdsch-ConfigCommon
#pdschTimeDomainAllocationList (up to 16 entries)
initialDLBWPk0_0 = 0; #for DL slot
initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB
initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13
initialDLBWPk0_1 = 0; #for mixed slot
initialDLBWPmappingType_1 = 0;
initialDLBWPstartSymbolAndLength_1 = 57; #this is SS=1,L=5
#uplinkConfigCommon
#frequencyInfoUL
......@@ -117,18 +113,6 @@ gNBs =
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
# pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1;
initialULBWPstartSymbolAndLength_1 = 52; # this is SS=10 L=4
initialULBWPk2_2 = 7; # used for Msg.3 during RA
initialULBWPmappingType_2 = 1;
initialULBWPstartSymbolAndLength_2 = 52; # this is SS=10 L=4
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
......
......@@ -33,9 +33,6 @@ gNBs =
////////// Physical parameters:
ssb_SubcarrierOffset = 0;
pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1;
ul_prbblacklist = "51,52,53,54"
min_rxtxtime = 6;
pdcch_ConfigSIB1 = (
......@@ -74,15 +71,6 @@ gNBs =
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#pdsch-ConfigCommon
#pdschTimeDomainAllocationList (up to 16 entries)
initialDLBWPk0_0 = 0; #for DL slot
initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB
initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13
initialDLBWPk0_1 = 0; #for mixed slot
initialDLBWPmappingType_1 = 0;
initialDLBWPstartSymbolAndLength_1 = 57; #this is SS=1,L=5
#uplinkConfigCommon
#frequencyInfoUL
......@@ -137,19 +125,6 @@ gNBs =
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
# pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6; # used for UL slot
initialULBWPmappingType_0 = 1
initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
initialULBWPk2_1 = 6; # used for mixed slot
initialULBWPmappingType_1 = 1;
initialULBWPstartSymbolAndLength_1 = 52; # this is SS=10 L=4
initialULBWPk2_2 = 7; # used for Msg.3 during RA
initialULBWPmappingType_2 = 1;
initialULBWPstartSymbolAndLength_2 = 52; # this is SS=10 L=4
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
......
......@@ -22,7 +22,7 @@ gNBs =
////////// Physical parameters:
ssb_SubcarrierOffset = 0;
pdsch_AntennaPorts = 1;
min_rxtxtime = 6;
servingCellConfigCommon = (
{
......@@ -53,29 +53,6 @@ gNBs =
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#pdsch-ConfigCommon
#pdschTimeDomainAllocationList (up to 16 entries)
initialDLBWPk0_0 = 0;
#initialULBWPmappingType
#0=typeA,1=typeB
initialDLBWPmappingType_0 = 0;
#this is SS=1,L=13
initialDLBWPstartSymbolAndLength_0 = 40;
initialDLBWPk0_1 = 0;
initialDLBWPmappingType_1 = 0;
#this is SS=2,L=12
initialDLBWPstartSymbolAndLength_1 = 53;
initialDLBWPk0_2 = 0;
initialDLBWPmappingType_2 = 0;
#this is SS=1,L=12
initialDLBWPstartSymbolAndLength_2 = 54;
initialDLBWPk0_3 = 0;
initialDLBWPmappingType_3 = 0;
#this is SS=1,L=5
initialDLBWPstartSymbolAndLength_3 = 57;
#uplinkConfigCommon
#frequencyInfoUL
......@@ -130,22 +107,6 @@ gNBs =
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
# pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6;
initialULBWPmappingType_0 = 1
# this is SS=0 L=11
initialULBWPstartSymbolAndLength_0 = 55;
initialULBWPk2_1 = 6;
initialULBWPmappingType_1 = 1;
# this is SS=0 L=12
initialULBWPstartSymbolAndLength_1 = 69;
initialULBWPk2_2 = 7;
initialULBWPmappingType_2 = 1;
# this is SS=10 L=4
initialULBWPstartSymbolAndLength_2 = 52;
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
......
......@@ -66,6 +66,8 @@ class EPCManagement():
self.mmeConfFile = 'mme.conf'
self.yamlPath = ''
self.isMagmaUsed = False
self.cfgDeploy = '--type start-mini --fqdn yes --scenario 1 --capture /tmp/oai-cn5g-v1.3.pcap' #from xml, 'mini' is default normal for docker-network.py
self.cfgUnDeploy = '--type stop-mini --fqdn yes --scenario 1' #from xml, 'mini' is default normal for docker-network.py
#-----------------------------------------------------------
......@@ -251,8 +253,8 @@ class EPCManagement():
logging.debug('Starting OAI CN5G')
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
mySSH.command('cd /opt/oai-cn5g-fed/docker-compose', '\$', 5)
mySSH.command('./core-network.sh start nrf spgwu', '\$', 60)
mySSH.command('cd /opt/oai-cn5g-fed-v1.3/docker-compose', '\$', 5)
mySSH.command('python3 ./core-network.py '+self.cfgDeploy, '\$', 60)
time.sleep(2)
mySSH.command('docker-compose -p 5gcn ps -a', '\$', 60)
if mySSH.getBefore().count('Up (healthy)') != 6:
......@@ -530,8 +532,8 @@ class EPCManagement():
mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5)
logging.debug('Terminating OAI CN5G')
mySSH.command('cd /opt/oai-cn5g-fed/docker-compose', '\$', 5)
mySSH.command('./core-network.sh stop nrf spgwu', '\$', 60)
mySSH.command('cd /opt/oai-cn5g-fed-v1.3/docker-compose', '\$', 5)
mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60)
mySSH.command('docker volume prune --force || true', '\$', 60)
time.sleep(2)
mySSH.command('tshark -r /tmp/oai-cn5g.pcap | egrep --colour=never "Tracking area update" ','\$', 30)
......
......@@ -376,6 +376,16 @@ def GetParametersFromXML(action):
if (string_field is not None):
EPC.yamlPath = string_field
elif action == 'Initialize_5GCN':
string_field = test.findtext('args')
if (string_field is not None):
EPC.cfgDeploy = string_field
elif action == 'Terminate_5GCN':
string_field = test.findtext('args')
if (string_field is not None):
EPC.cfgUnDeploy = string_field
elif action == 'Deploy_Object' or action == 'Undeploy_Object':
eNB_instance=test.findtext('eNB_instance')
if (eNB_instance is None):
......@@ -391,7 +401,7 @@ def GetParametersFromXML(action):
if (string_field is not None):
CONTAINERS.yamlPath[CONTAINERS.eNB_instance] = string_field
elif action == 'DeployGenObject' or action == 'UndeployGenObject':
elif action == 'DeployGenObject' or action == 'UndeployGenObject' or action == 'StatsFromGenObject':
string_field=test.findtext('yaml_path')
if (string_field is not None):
CONTAINERS.yamlPath[0] = string_field
......@@ -931,6 +941,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
CONTAINERS.IperfFromContainer(HTML, RAN)
if CONTAINERS.exitStatus==1:
RAN.prematureExit = True
elif action == 'StatsFromGenObject':
CONTAINERS.StatsFromGenObject(HTML)
else:
sys.exit('Invalid class (action) from xml')
if RAN.prematureExit:
......
......@@ -677,13 +677,13 @@ class RANManagement():
# if T tracer was run with option 0 (no logs), analyze logs
# from textlog, otherwise do normal analysis (e.g., option 2)
result = re.search('T_stdout 0', str(self.Initialize_eNB_args))
enbLogFile = self.eNBLogFiles[int(self.eNB_instance)]
raw_record_file = enbLogFile.replace('.log', '_record.raw')
replay_log_file = enbLogFile.replace('.log', '_replay.log')
if (result is not None):
logging.debug('\u001B[1m Replaying RAW record file\u001B[0m')
mySSH.open(lIpAddr, lUserName, lPassWord)
mySSH.command('cd ' + lSourcePath + '/common/utils/T/tracer/', '\$', 5)
enbLogFile = self.eNBLogFiles[int(self.eNB_instance)]
raw_record_file = enbLogFile.replace('.log', '_record.raw')
replay_log_file = enbLogFile.replace('.log', '_replay.log')
extracted_txt_file = enbLogFile.replace('.log', '_extracted_messages.txt')
extracted_log_file = enbLogFile.replace('.log', '_extracted_messages.log')
mySSH.command('./extract_config -i ' + lSourcePath + '/cmake_targets/' + raw_record_file + ' > ' + lSourcePath + '/cmake_targets/' + extracted_txt_file, '\$', 5)
......@@ -706,8 +706,6 @@ class RANManagement():
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/*stats.log', '.')
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/*.pickle', '.')
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/*.png', '.')
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/'+raw_record_file, '.')
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/'+replay_log_file, '.')
#
copyin_res = mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/' + fileToAnalyze, '.')
if (copyin_res == -1):
......@@ -723,9 +721,7 @@ class RANManagement():
mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './nrL1_stats.log', self.eNBSourceCodePath + '/cmake_targets/')
mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './nrMAC_stats.log', self.eNBSourceCodePath + '/cmake_targets/')
mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './gnb_stats_monitor.pickle', self.eNBSourceCodePath + '/cmake_targets/')
mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './gnb_stats_monitor.png', self.eNBSourceCodePath + '/cmake_targets/')#RH 21/02/2002 this does not work, there are more than 1 png file
mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword,'./'+raw_record_file, self.eNBSourceCodePath + '/cmake_targets/')
mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword,'./'+replay_log_file, self.eNBSourceCodePath + '/cmake_targets/')
mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './gnb_stats_monitor.png', self.eNBSourceCodePath + '/cmake_targets/')
#
mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './' + fileToAnalyze, self.eNBSourceCodePath + '/cmake_targets/')
logging.debug('\u001B[1m Analyzing ' + nodeB_prefix + 'NB logfile \u001B[0m ' + fileToAnalyze)
......@@ -826,6 +822,8 @@ class RANManagement():
RealTimeProcessingIssue = False
DLRetxIssue = False
ULRetxIssue = False
nrRrcRcfgComplete = 0
harqFeedbackPast = 0
line_cnt=0 #log file line counter
for line in enb_log_file.readlines():
......@@ -1002,6 +1000,13 @@ class RANManagement():
#remove 1- all useless char before relevant info (ulsch or dlsch) 2- trailing char
dlsch_ulsch_stats[k]=re.sub(r'^.*\]\s+', r'' , line.rstrip())
result = re.search('Received NR_RRCReconfigurationComplete from UE', str(line))
if result is not None:
nrRrcRcfgComplete += 1
result = re.search('HARQ feedback is in the past', str(line))
if result is not None:
harqFeedbackPast += 1
#count "problem receiving samples" msg
result = re.search('\[PHY\]\s+problem receiving samples', str(line))
......@@ -1089,6 +1094,14 @@ class RANManagement():
statMsg = nodeB_prefix + 'NB ran with TX Write thread enabled'
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
htmleNBFailureMsg += statMsg + '\n'
if nrRrcRcfgComplete > 0:
statMsg = nodeB_prefix + 'NB showed ' + str(nrRrcRcfgComplete) + ' "Received NR_RRCReconfigurationComplete from UE" message(s)'
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
htmleNBFailureMsg += statMsg + '\n'
if harqFeedbackPast > 0:
statMsg = nodeB_prefix + 'NB showed ' + str(harqFeedbackPast) + ' "HARQ feedback is in the past" message(s)'
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
htmleNBFailureMsg += statMsg + '\n'
#FR1 NSA test : add new markers to make sure gNB is used
if NSA_RAPROC_PUSCH_check:
statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : PASS '
......
......@@ -1899,7 +1899,7 @@ function run_test_on_vm {
CURRENT_NR_UE_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_ue_sa_test.log
#last argument = 2 is to enable --sa for SA test for 106PRB
start_rf_sim_nr_ue $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $GNB_VM_IP_ADDR $CURRENT_NR_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG 2
if [ $NR_UE_SYNC -eq 0 ]
if [ $GNB_SYNC -eq 0 ] || [ $NR_UE_SYNC -eq 0 ]
then
echo "Problem w/ gNB and NR-UE not syncing"
terminate_enb_ue_basic_sim $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 2
......@@ -1939,6 +1939,12 @@ function run_test_on_vm {
SA_106PRB_STATUS=0
fi
done
#manage SYNC issue after try_cnt
if [ $SYNC_STATUS -ne 0 ]
then
echo "SA 106PRB test NOT OK, NOT SYNC'ED"
SA_106PRB_STATUS=-1
fi
########### end SA test
sleep 30
......@@ -1982,7 +1988,7 @@ function run_test_on_vm {
CURRENT_NR_UE_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_ue_sa_test.log
#last argument = 3 is to enable --sa for SA test for 24PRB
start_rf_sim_nr_ue $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $GNB_VM_IP_ADDR $CURRENT_NR_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG 3
if [ $NR_UE_SYNC -eq 0 ]
if [ $GNB_SYNC -eq 0 ] || [ $NR_UE_SYNC -eq 0 ]
then
echo "Problem w/ gNB and NR-UE not syncing"
terminate_enb_ue_basic_sim $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 2
......@@ -2022,6 +2028,12 @@ function run_test_on_vm {
SA_24PRB_STATUS=0
fi
done
#manage SYNC issue after try_cnt
if [ $SYNC_STATUS -ne 0 ]
then
echo "SA 24PRB test NOT OK, NOT SYNC'ED"
SA_24PRB_STATUS=-1
fi
########### end SA test
sleep 30
......@@ -2070,7 +2082,7 @@ function run_test_on_vm {
CURRENT_NR_UE_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_ue_ra_fr2_test.log
#last argument = 1 is to enable --do-ra for RA test
start_rf_sim_nr_ue $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $GNB_VM_IP_ADDR $CURRENT_NR_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG 1
if [ $NR_UE_SYNC -eq 0 ]
if [ $GNB_SYNC -eq 0 ] || [ $NR_UE_SYNC -eq 0 ]
then
echo "Problem w/ gNB and NR-UE not syncing"
terminate_enb_ue_basic_sim $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 2
......@@ -2110,6 +2122,12 @@ function run_test_on_vm {
try_cnt=$((try_cnt+10))
fi
done
#manage SYNC issue after try_cnt
if [ $SYNC_STATUS -ne 0 ]
then
echo "RA FR2 test NOT OK, NOT SYNC'ED"
RA_FR2_STATUS=-1
fi
########### end RA FR2 test
sleep 30
......@@ -2172,7 +2190,7 @@ function run_test_on_vm {
CURRENT_NR_UE_LOG_FILE=${TMODE}_${PRB}prb_${CN_CONFIG}_ue_ra_test.log
#last argument = 1 is to enable --do-ra for RA test
start_rf_sim_nr_ue $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $GNB_VM_IP_ADDR $CURRENT_NR_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG 1
if [ $NR_UE_SYNC -eq 0 ]
if [ $GNB_SYNC -eq 0 ] || [ $NR_UE_SYNC -eq 0 ]
then
echo "Problem w/ gNB and NR-UE not syncing"
terminate_enb_ue_basic_sim $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 2
......@@ -2212,6 +2230,13 @@ function run_test_on_vm {
try_cnt=$((try_cnt+10))
fi
done
#manage SYNC issue after try_cnt
if [ $SYNC_STATUS -ne 0 ]
then
echo "RA FR1 test NOT OK, NOT SYNC'ED"
RA_FR1_STATUS=-1
fi
done
########### end RA test
......@@ -2253,7 +2278,7 @@ function run_test_on_vm {
echo "############################################################"
CURRENT_NR_UE_LOG_FILE=${TMODE}_${PRB}prb_${CN_CONFIG}_ue.log
start_rf_sim_nr_ue $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $GNB_VM_IP_ADDR $CURRENT_NR_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG 0
if [ $NR_UE_SYNC -eq 0 ]
if [ $GNB_SYNC -eq 0 ] || [ $NR_UE_SYNC -eq 0 ]
then
echo "Problem w/ gNB and NR-UE not syncing"
terminate_enb_ue_basic_sim $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 2
......@@ -2332,6 +2357,13 @@ function run_test_on_vm {
try_cnt=$((try_cnt+10))
fi
done
#manage SYNC issue after try_cnt
if [ $SYNC_STATUS -ne 0 ]
then
echo "PHY test NOT OK, NOT SYNC'ED"
IPERF_STATUS=-1
fi
done
######### end of loop
full_l2_sim_destroy
......@@ -2345,7 +2377,6 @@ function run_test_on_vm {
if [ $SA_24PRB_STATUS -ne 0 ]; then NR_STATUS=-1; fi
if [ $RA_FR2_STATUS -ne 0 ]; then NR_STATUS=-1; fi
if [ $RA_FR1_STATUS -ne 0 ]; then NR_STATUS=-1; fi
if [ $SYNC_STATUS -ne 0 ]; then NR_STATUS=-1; fi
if [ $PING_STATUS -ne 0 ]; then NR_STATUS=-1; fi
if [ $IPERF_STATUS -ne 0 ]; then NR_STATUS=-1; fi
if [ $NR_STATUS -eq 0 ]
......
......@@ -56,6 +56,7 @@ class SSHConnection():
self.picocom_closure = True
def open(self, ipaddress, username, password):
prompt = "#" if username == "root" else "\$"
count = 0
connect_status = False
while count < 4:
......@@ -68,7 +69,7 @@ class SSHConnection():
self.sshresponse = self.ssh.expect(['password:', username + '@'])
if self.sshresponse == 0:
self.ssh.sendline(password)
self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
self.sshresponse = self.ssh.expect([prompt, 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
if self.sshresponse == 0:
count = 10
connect_status = True
......@@ -76,7 +77,7 @@ class SSHConnection():
logging.debug('self.sshresponse = ' + str(self.sshresponse))
elif self.sshresponse == 1:
self.ssh.sendline(password)
self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
self.sshresponse = self.ssh.expect([prompt, 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
if self.sshresponse == 0:
count = 10
connect_status = True
......@@ -84,7 +85,7 @@ class SSHConnection():
logging.debug('self.sshresponse = ' + str(self.sshresponse))
elif self.sshresponse == 2:
# Checking if we are really on the remote client defined by its IP address
self.command('stdbuf -o0 ifconfig | egrep --color=never "inet addr:|inet "', '\$', 5)
self.command('stdbuf -o0 ifconfig | egrep --color=never "inet addr:|inet "', prompt, 5)
result = re.search(str(ipaddress), str(self.ssh.before))
if result is None:
self.close()
......@@ -100,7 +101,7 @@ class SSHConnection():
time.sleep(1)
count += 1
if connect_status:
self.command('unset HISTFILE', '\$', 5, silent=True)
self.command('unset HISTFILE', prompt, 5, silent=True)
else:
sys.exit('SSH Connection Failed')
self.ipaddress = ipaddress
......
......@@ -46,3 +46,4 @@
- UndeployGenObject
- PingFromContainer
- IperfFromContainer
- StatsFromGenObject
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>l2sim-5gnr-tdd</htmlTabRef>
<htmlTabName>Testing 5G NR L2 sim - TDD gNB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
100001
000000
000001
000002
000003
000011
200000
020001
020002
200001
100001
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000000">
<class>DeployGenObject</class>
<desc>Deploy MySql Database</desc>
<yaml_path>yaml_files/5g_l2sim_tdd</yaml_path>
<services>mysql</services>
<nb_healthy>1</nb_healthy>
</testCase>
<testCase id="000001">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G CoreNetwork</desc>
<yaml_path>yaml_files/5g_l2sim_tdd</yaml_path>
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
<nb_healthy>6</nb_healthy>
</testCase>
<testCase id="000002">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G gNB L2 sim SA</desc>
<yaml_path>yaml_files/5g_l2sim_tdd</yaml_path>
<services>oai-gnb</services>
<nb_healthy>7</nb_healthy>
</testCase>
<testCase id="000003">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G NR-UE L2 sim SA and Proxy</desc>
<yaml_path>yaml_files/5g_l2sim_tdd</yaml_path>
<services>proxy oai-nr-ue0</services>
<nb_healthy>9</nb_healthy>
</testCase>
<testCase id="000011">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase>
<testCase id="020001">
<class>PingFromContainer</class>
<desc>Ping ext-dn from NR-UE</desc>
<container_name>l2sim-oai-nr-ue0</container_name>
<options>-I oaitun_ue1 -c 20 192.168.72.135</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="020002">
<class>PingFromContainer</class>
<desc>Ping NR-UE from ext-dn</desc>
<container_name>l2sim-oai-ext-dn</container_name>
<options>-c 20 12.1.1.2</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="100001">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_l2sim_tdd</yaml_path>
</testCase>
<testCase id="200000">
<class>StatsFromGenObject</class>
<desc>Statistics before Traffic Test</desc>
<yaml_path>yaml_files/5g_l2sim_tdd</yaml_path>
</testCase>
<testCase id="200001">
<class>StatsFromGenObject</class>
<desc>Statistics after Traffic Test</desc>
<yaml_path>yaml_files/5g_l2sim_tdd</yaml_path>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>l2sim-5gnr-down</htmlTabRef>
<htmlTabName>CleanUp 5G L2 sim - TDD gNB</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100002
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="100002">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_l2sim_tdd</yaml_path>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>TEST-SA-FR1-Tab1</htmlTabRef>
<htmlTabName>SA Ping DL UL with 1 AS UE</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
040000
000001
010000
000002
050000
080000
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010000">
<class>Initialize_UE</class>
<desc>Run AS UE Scenario</desc>
<id>amarisoft_ue_1</id>
</testCase>
<testCase id="040000">
<class>Initialize_eNB</class>
<desc>Initialize gNB</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.asue.conf --sa -q --usrp-tx-thread-config 1 --T_stdout 2 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<air_interface>nr</air_interface>
<eNB_Trace>yes</eNB_Trace>
<eNB_Stats>yes</eNB_Stats>
<rt_stats_cfg>datalog_rt_stats.2x2.yaml</rt_stats_cfg>
<USRP_IPAddress>192.168.18.252</USRP_IPAddress>
</testCase>
<testCase id="050000">
<class>Ping</class>
<desc>Ping Log Analysis</desc>
<id>amarisoft_ue_1</id>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
</testCase>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>60</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
</testCase>
<testCase id="080000">
<class>Terminate_eNB</class>
<desc>Terminate gNB</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<air_interface>nr</air_interface>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>cn5g-closure</htmlTabRef>
<htmlTabName>CN5G-Closure</htmlTabName>
<htmlTabIcon>log-out</htmlTabIcon>
<TestCaseRequestedList>
060000
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="060000">
<class>Terminate_5GCN</class>
<desc>Terminate 5G Core</desc>
<args>--type stop-mini-as-ue --fqdn yes --scenario 1</args>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>cn5g-start-tab</htmlTabRef>
<htmlTabName>CN5G-Start</htmlTabName>
<htmlTabIcon>log-in</htmlTabIcon>
<TestCaseRequestedList>
000100
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="000100">
<class>Initialize_5GCN</class>
<desc>Initialize 5G Core</desc>
<args>--type start-mini-as-ue --fqdn yes --scenario 1 --capture /tmp/oai-cn5g-v1.3.pcap</args>
</testCase>
</testCaseList>
This diff is collapsed.
This diff is collapsed.
......@@ -1781,7 +1781,8 @@ set(NR_PDCP_SRC
)
set(NR_SDAP_SRC
${OPENAIR2_DIR}/SDAP/nr_sdap/nr_sdap_gnb.c
${OPENAIR2_DIR}/SDAP/nr_sdap/nr_sdap.c
${OPENAIR2_DIR}/SDAP/nr_sdap/nr_sdap_entity.c
)
set(L2_SRC
......
......@@ -478,6 +478,7 @@ int logInit (void)
register_log_component("NAS","log",NAS);
register_log_component("UDP","",UDP_);
register_log_component("GTPU","",GTPU);
register_log_component("SDAP","",SDAP);
register_log_component("S1AP","",S1AP);
register_log_component("F1AP","",F1AP);
register_log_component("M2AP","",M2AP);
......
......@@ -215,6 +215,7 @@ typedef enum {
OCM,
UDP_,
GTPU,
SDAP,
SPGW,
S1AP,
F1AP,
......
......@@ -944,6 +944,27 @@ ID = LEGACY_GTPU_TRACE
GROUP = ALL:LEGACY_GTPU:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_SDAP_INFO
DESC = SDAP legacy logs - info level
GROUP = ALL:LEGACY_SDAP:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_SDAP_ERROR
DESC = SDAP legacy logs - error level
GROUP = ALL:LEGACY_SDAP:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_SDAP_WARNING
DESC = SDAP legacy logs - warning level
GROUP = ALL:LEGACY_SDAP:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_SDAP_DEBUG
DESC = SDAP legacy logs - debug level
GROUP = ALL:LEGACY_SDAP:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_SDAP_TRACE
DESC = SDAP legacy logs - trace level
GROUP = ALL:LEGACY_SDAP:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_TMR_INFO
DESC = TMR legacy logs - info level
GROUP = ALL:LEGACY_TMR:LEGACY_GROUP_INFO:LEGACY
......
......@@ -351,6 +351,14 @@ The following features are valid for the gNB and the 5G-NR UE.
- Interfaces with RRC, RLC
- Interfaces with gtp-u (data Tx/Rx over N3 and F1-U interfaces)
**gNB SDAP**
- Send/Receive operations according to 37.324 Rel.15
- Establishment/Handling of SDAP entities.
- Transfer of User Plane Data
- Mapping between a QoS flow and a DRB for both DL and UL
- Marking QoS flow ID in both DL and UL packets
- Reflective QoS flow to DRB mapping for UL SDAP data PDUs
**gNB RRC**
- NR RRC (38.331) Rel 16 messages using new asn1c
- LTE RRC (36.331) also updated to Rel 15
......@@ -400,6 +408,7 @@ The following features are valid for the gNB and the 5G-NR UE.
- New gtp-u implementation supporting both N3 and F1-U interfaces according to 29.281 Rel.15
- Interfaces with RRC, F1AP for tunnel creation
- Interfaces with PDCP and RLC for data send/receive at the CU and DU respectively (F1-U interface)
- Interface with SDAP for data send/receive, capture of GTP-U Optional Header, GTP-U Extension Header and PDU Session Container.
# OpenAirInterface 5G-NR UE Feature Set #
......@@ -502,6 +511,13 @@ The following features are valid for the gNB and the 5G-NR UE.
- Radio bearer establishment/handling and association with PDCP entities
- Interfaces with RRC, RLC
**UE SDAP**
* Tx/Rx operations operations according to 37.324 Rel.15
- Establishment/Handling of SDAP entities.
- Transfer of User Plane Data
- Reflective Mapping
- RRC Signaling Mapping
**UE RRC**
* Integration of RRC messages and procedures supporting UE 5G SA connection according to 38.331 Rel.16
- RRCSetupRequest/RRCSetup/RRCSetupComplete
......
......@@ -46,6 +46,8 @@ This proxy allows to perform L2 nFAPI simulator for:
* 5G-NSA
* 5G-SA
Another tutorial for 5G SA mode with 1 User is available [here](../ci-scripts/yaml_files/5g_l2sim_tdd/README.md).
----
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
......
......@@ -29,7 +29,8 @@ FROM ran-base:latest AS nr-ue-base
FROM ran-build:latest AS nr-ue-build
RUN cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/nr_ue_parameters.yaml && \
cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-nr-ue
......@@ -62,7 +63,10 @@ COPY --from=nr-ue-build \
./
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/nr-ue-sim.conf .
COPY --from=nr-ue-build \
/oai-ran/ci-scripts/conf_files/nr-ue-sim.conf \
/oai-ran/docker/etc/nr-ue.nfapi.conf \
./
COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
......@@ -118,5 +122,5 @@ WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
WORKDIR /opt/oai-nr-ue
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15", "-O", "/opt/oai-nr-ue/etc/nr-ue-sim.conf"]
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
......@@ -29,7 +29,8 @@ FROM ran-base:latest AS nr-ue-base
FROM ran-build:latest AS nr-ue-build
RUN cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/nr_ue_parameters.yaml && \
cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM ubuntu:bionic as oai-nr-ue
......@@ -67,7 +68,10 @@ COPY --from=nr-ue-build \
./
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/nr-ue-sim.conf .
COPY --from=nr-ue-build \
/oai-ran/ci-scripts/conf_files/nr-ue-sim.conf \
/oai-ran/docker/etc/nr-ue.nfapi.conf \
./
COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
......@@ -106,5 +110,5 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
ldconfig
WORKDIR /opt/oai-nr-ue
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15", "-O", "/opt/oai-nr-ue/etc/nr-ue-sim.conf"]
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
......@@ -23,6 +23,7 @@
#-----------------------------------------------------------
# Import
#-----------------------------------------------------------
import glob
import re
import yaml
import os
......@@ -33,7 +34,8 @@ def main():
#read yaml input parameters
f = open(f'{sys.argv[1]}',)
data = yaml.full_load(f)
dir = os.listdir(f'{data[0]["paths"]["source_dir"]}')
initial_path = f'{data[0]["paths"]["source_dir"]}'
dir = glob.glob(initial_path + '/**/*.conf', recursive=True)
#identify configs, read and replace corresponding values
for config in data[1]["configurations"]:
......@@ -42,7 +44,10 @@ def main():
print('================================================')
print('filePrefix = ' + filePrefix)
print('outputfilename = ' + outputfilename)
found = False
for inputfile in dir:
if found:
continue
if inputfile.find(filePrefix) >=0:
prefix_outputfile = {"cu.band7.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"du.band7.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
......@@ -58,10 +63,13 @@ def main():
"gnb.sa.band66.fr1.106PRB.usrpn300.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"gNB_SA_CU.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"gNB_SA_DU.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"proxy_nr-ue.nfapi.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"ue.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"ue_sim_ci": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}'
}
print('inputfile = ' + inputfile)
found = True
if filePrefix in prefix_outputfile:
outputfile1 = prefix_outputfile[filePrefix]
......@@ -69,7 +77,7 @@ def main():
if not os.path.exists(directory):
os.makedirs(directory, exist_ok=True)
with open(f'{data[0]["paths"]["source_dir"]}{inputfile}', mode='r') as inputfile, \
with open(f'{inputfile}', mode='r') as inputfile, \
open(outputfile1, mode='w') as outputfile:
for line in inputfile:
count = 0
......
......@@ -11,8 +11,9 @@ THREAD_PARALLEL_CONFIG=${THREAD_PARALLEL_CONFIG:-PARALLEL_SINGLE_THREAD}
if [[ -v USE_NSA_TDD_MONO ]]; then cp $PREFIX/etc/gnb.nsa.tdd.conf $PREFIX/etc/gnb.conf; fi
if [[ -v USE_SA_TDD_MONO ]]; then cp $PREFIX/etc/gnb.sa.tdd.conf $PREFIX/etc/gnb.conf; fi
if [[ -v USE_SA_FDD_MONO ]]; then cp $PREFIX/etc/gnb.sa.fdd.conf $PREFIX/etc/gnb.conf; fi
if [[ -v USE_SA_CU ]]; then ln -s $PREFIX/etc/gnb.sa.cu.conf $PREFIX/etc/gnb.conf; fi
if [[ -v USE_SA_CU ]]; then cp $PREFIX/etc/gnb.sa.cu.conf $PREFIX/etc/gnb.conf; fi
if [[ -v USE_SA_TDD_CU ]]; then cp $PREFIX/etc/gnb.sa.du.tdd.conf $PREFIX/etc/gnb.conf; fi
if [[ -v USE_SA_NFAPI_VNF ]]; then cp $PREFIX/etc/gnb.sa.nfapi.vnf.conf $PREFIX/etc/gnb.conf; fi
# Sometimes, the templates are not enough. We mount a conf file on $PREFIX/etc. It can be a template itself.
if [[ -v USE_VOLUMED_CONF ]]; then cp $PREFIX/etc/mounted.conf $PREFIX/etc/gnb.conf; fi
......
......@@ -202,3 +202,39 @@
- key: remote_n_portd
env: "@F1_CU_D_PORT@"
- filePrefix: proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf
outputfilename: "gnb.sa.nfapi.vnf.conf"
config:
- key: Active_gNBs
env: "@GNB_NAME@"
- key: gNB_name
env: "@GNB_NAME@"
- key: mcc
env: "@MCC@"
- key: mnc
env: "@MNC@"
- key: mnc_length
env: "@MNC_LENGTH@"
- key: tracking_area_code
env: "@TAC@"
- key: sst
env: "@NSSAI_SST@"
- key: ipv4
env: "@AMF_IP_ADDRESS@"
- key: GNB_INTERFACE_NAME_FOR_NG_AMF
env: "@GNB_NGA_IF_NAME@"
- key: GNB_IPV4_ADDRESS_FOR_NG_AMF
env: "@GNB_NGA_IP_ADDRESS@"
- key: GNB_INTERFACE_NAME_FOR_NGU
env: "@GNB_NGU_IF_NAME@"
- key: GNB_IPV4_ADDRESS_FOR_NGU
env: "@GNB_NGU_IP_ADDRESS@"
- key: parallel_config
env: "@THREAD_PARALLEL_CONFIG@"
- key: local_s_if_name
env: "@LOCAL_S_IF_NAME@"
- key: remote_s_address
env: "@REMOTE_S_ADDRESS@"
- key: local_s_address
env: "@LOCAL_S_ADDRESS@"
......@@ -5,12 +5,22 @@ set -euo pipefail
PREFIX=/opt/oai-nr-ue
# Based another env var, pick one template to use
#if [[ -v USE_NFAPI ]]; then cp $PREFIX/etc/ue.nfapi.conf $PREFIX/etc/ue.conf; fi
if [[ -v USE_NFAPI ]]; then cp $PREFIX/etc/nr-ue.nfapi.conf $PREFIX/etc/nr-ue.conf; fi
# Sometimes, the templates are not enough. We mount a conf file on $PREFIX/etc. It can be a template itself.
if [[ -v USE_VOLUMED_CONF ]]; then cp $PREFIX/etc/mounted.conf $PREFIX/etc/nr-ue.conf; fi
# if none, pick the default
if [ ! -f $PREFIX/etc/nr-ue.conf ]; then cp $PREFIX/etc/nr-ue-sim.conf $PREFIX/etc/nr-ue.conf; fi
# Only this template will be manipulated and the USIM one!
CONFIG_FILES=`ls $PREFIX/etc/ue.conf $PREFIX/etc/nr-ue-sim.conf || true`
# Only this template will be manipulated
CONFIG_FILES=`ls $PREFIX/etc/nr-ue.conf || true`
for c in ${CONFIG_FILES}; do
# Sometimes templates have no pattern to be replaced.
if ! grep -oP '@[a-zA-Z0-9_]+@' ${c}; then
echo "Configuration is already set"
break
fi
# grep variable names (format: ${VAR}) from template to be rendered
VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
......
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
---
- paths:
source_dir: "ci-scripts/conf_files/"
dest_dir: docker/etc
- configurations:
- filePrefix: proxy_nr-ue.nfapi.conf
outputfilename: "nr-ue.nfapi.conf"
config:
- key: imsi
env: "@FULL_IMSI@"
- key: key
env: "@FULL_KEY@"
- key: opc
env: "@OPC@"
- key: dnn
env: "@DNN@"
- key: nssai_sst
env: "@NSSAI_SST@"
- key: nssai_sd
env: "@NSSAI_SD@"
- key: remote_n_address
env: "@GNB_IP_ADDRESS@"
- key: local_n_address
env: "@NR_UE_IP_ADDRESS@"
- key: local_n_if_name
env: "@NR_UE_NFAPI_IF_NAME@"
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#define _GNU_SOURCE
#define _GNU_SOURCE // For pthread_setname_np
#include <pthread.h>
#include <openair1/PHY/impl_defs_top.h>
#include "executables/nr-uesoftmodem.h"
......@@ -239,84 +239,21 @@ static void L1_nsa_prach_procedures(frame_t frame, int slot, fapi_nr_ul_config_p
LOG_D(NR_MAC, "We have successfully filled the rach_ind queue with the recently filled rach ind\n");
}
static bool sfn_slot_matcher(void *wanted, void *candidate)
{
nfapi_p7_message_header_t *msg = candidate;
int sfn_sf = *(int*)wanted;
switch (msg->message_id)
{
case NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION:
{
nfapi_nr_rach_indication_t *ind = candidate;
return NFAPI_SFNSLOT2SFN(sfn_sf) == ind->sfn && NFAPI_SFNSLOT2SLOT(sfn_sf) == ind->slot;
}
case NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION:
{
nfapi_nr_rx_data_indication_t *ind = candidate;
return NFAPI_SFNSLOT2SFN(sfn_sf) == ind->sfn && NFAPI_SFNSLOT2SLOT(sfn_sf) == ind->slot;
}
case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION:
{
nfapi_nr_crc_indication_t *ind = candidate;
return NFAPI_SFNSLOT2SFN(sfn_sf) == ind->sfn && NFAPI_SFNSLOT2SLOT(sfn_sf) == ind->slot;
}
case NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION:
{
nfapi_nr_uci_indication_t *ind = candidate;
return NFAPI_SFNSLOT2SFN(sfn_sf) == ind->sfn && NFAPI_SFNSLOT2SLOT(sfn_sf) == ind->slot;
}
case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST:
{
nfapi_nr_dl_tti_request_t *ind = candidate;
return NFAPI_SFNSLOT2SFN(sfn_sf) == ind->SFN && NFAPI_SFNSLOT2SLOT(sfn_sf) == ind->Slot;
}
case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST:
{
nfapi_nr_tx_data_request_t *ind = candidate;
return NFAPI_SFNSLOT2SFN(sfn_sf) == ind->SFN && NFAPI_SFNSLOT2SLOT(sfn_sf) == ind->Slot;
}
case NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST:
{
nfapi_nr_ul_dci_request_t *ind = candidate;
return NFAPI_SFNSLOT2SFN(sfn_sf) == ind->SFN && NFAPI_SFNSLOT2SLOT(sfn_sf) == ind->Slot;
}
case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST:
{
nfapi_nr_ul_tti_request_t *ind = candidate;
return NFAPI_SFNSLOT2SFN(sfn_sf) == ind->SFN && NFAPI_SFNSLOT2SLOT(sfn_sf) == ind->Slot;
}
default:
LOG_E(NR_MAC, "sfn_slot_match bad ID: %d\n", msg->message_id);
}
return false;
}
static void process_queued_nr_nfapi_msgs(NR_UE_MAC_INST_t *mac, int sfn_slot)
{
nfapi_nr_rach_indication_t *rach_ind = unqueue_matching(&nr_rach_ind_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &sfn_slot);
nfapi_nr_rx_data_indication_t *rx_ind = unqueue_matching(&nr_rx_ind_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &sfn_slot);
nfapi_nr_crc_indication_t *crc_ind = unqueue_matching(&nr_crc_ind_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &sfn_slot);
nfapi_nr_dl_tti_request_t *dl_tti_request = get_queue(&nr_dl_tti_req_queue);
nfapi_nr_ul_dci_request_t *ul_dci_request = get_queue(&nr_ul_dci_req_queue);
LOG_D(NR_MAC, "Try to get a ul_tti_req for sfn/slot %d %d from queue with %lu items\n",
NFAPI_SFNSLOT2SFN(mac->nr_ue_emul_l1.active_harq_sfn_slot),NFAPI_SFNSLOT2SLOT(mac->nr_ue_emul_l1.active_harq_sfn_slot), nr_ul_tti_req_queue.num_items);
nfapi_nr_ul_tti_request_t *ul_tti_request = unqueue_matching(&nr_ul_tti_req_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &mac->nr_ue_emul_l1.active_harq_sfn_slot);
if (!ul_tti_request)
for (int i = 0; i < NR_MAX_HARQ_PROCESSES; i++) {
LOG_D(NR_MAC, "Try to get a ul_tti_req by matching CRC active SFN %d/SLOT %d from queue with %lu items\n",
NFAPI_SFNSLOT2SFN(mac->nr_ue_emul_l1.harq[i].active_ul_harq_sfn_slot),
NFAPI_SFNSLOT2SLOT(mac->nr_ue_emul_l1.harq[i].active_ul_harq_sfn_slot), nr_ul_tti_req_queue.num_items);
nfapi_nr_ul_tti_request_t *ul_tti_request_crc = unqueue_matching(&nr_ul_tti_req_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &mac->nr_ue_emul_l1.harq[i].active_ul_harq_sfn_slot);
if (ul_tti_request_crc && ul_tti_request_crc->n_pdus > 0)
{
LOG_D(NR_MAC, "Try to get a ul_tti_req from seprate queue because dl_tti_req was late\n");
ul_tti_request = unqueue_matching(&nr_wait_ul_tti_req_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &mac->nr_ue_emul_l1.active_harq_sfn_slot);
check_and_process_dci(NULL, NULL, NULL, ul_tti_request_crc);
}
}
if (rach_ind && rach_ind->number_of_pdus > 0)
......@@ -333,24 +270,6 @@ static void process_queued_nr_nfapi_msgs(NR_UE_MAC_INST_t *mac, int sfn_slot)
free(rach_ind);
nr_Msg1_transmitted(0, 0, NFAPI_SFNSLOT2SFN(sfn_slot), 0);
}
if (crc_ind && crc_ind->number_crcs > 0)
{
NR_UL_IND_t UL_INFO = {
.crc_ind = *crc_ind,
};
send_nsa_standalone_msg(&UL_INFO, crc_ind->header.message_id);
free(crc_ind->crc_list);
free(crc_ind);
}
if (rx_ind && rx_ind->number_of_pdus > 0)
{
NR_UL_IND_t UL_INFO = {
.rx_ind = *rx_ind,
};
send_nsa_standalone_msg(&UL_INFO, rx_ind->header.message_id);
free(rx_ind->pdu_list);
free(rx_ind);
}
if (dl_tti_request)
{
int dl_tti_sfn_slot = NFAPI_SFNSLOT2HEX(dl_tti_request->SFN, dl_tti_request->Slot);
......@@ -380,10 +299,6 @@ static void process_queued_nr_nfapi_msgs(NR_UE_MAC_INST_t *mac, int sfn_slot)
{
check_and_process_dci(NULL, NULL, ul_dci_request, NULL);
}
if (ul_tti_request && ul_tti_request->n_pdus > 0)
{
check_and_process_dci(NULL, NULL, NULL, ul_tti_request);
}
}
static void check_nr_prach(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_info, NR_PRACH_RESOURCES_t *prach_resources)
......@@ -434,7 +349,6 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
reset_queue(&nr_tx_req_queue);
reset_queue(&nr_ul_dci_req_queue);
reset_queue(&nr_ul_tti_req_queue);
reset_queue(&nr_wait_ul_tti_req_queue);
NR_PRACH_RESOURCES_t prach_resources;
memset(&prach_resources, 0, sizeof(prach_resources));
......@@ -443,6 +357,13 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
int last_sfn_slot = -1;
uint16_t sfn_slot = 0;
module_id_t mod_id = 0;
NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id);
for (int i = 0; i < NR_MAX_HARQ_PROCESSES; i++) {
mac->nr_ue_emul_l1.harq[i].active = false;
mac->nr_ue_emul_l1.harq[i].active_ul_harq_sfn_slot = -1;
}
while (!oai_exit)
{
if (sem_wait(&sfn_slot_semaphore) != 0)
......@@ -459,9 +380,11 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
}
if (slot_ind) {
sfn_slot = *slot_ind;
free_and_zero(slot_ind);
}
else if (ch_info) {
sfn_slot = ch_info->sfn_slot;
free_and_zero(ch_info);
}
frame_t frame = NFAPI_SFNSLOT2SFN(sfn_slot);
......@@ -477,8 +400,6 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
LOG_D(NR_MAC, "The received sfn/slot [%d %d] from proxy\n",
frame, slot);
module_id_t mod_id = 0;
NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id);
if (get_softmodem_params()->sa && mac->mib == NULL)
{
LOG_D(NR_MAC, "We haven't gotten MIB. Lets see if we received it\n");
......@@ -533,8 +454,10 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
mac->scc_SIB->tdd_UL_DL_ConfigurationCommon,
ul_info.slot_tx, mac->frame_type))
{
LOG_D(NR_MAC, "Slot %d. calling nr_ue_ul_ind() from %s\n", ul_info.slot_tx, __FUNCTION__);
nr_ue_ul_indication(&ul_info);
LOG_D(NR_MAC, "Slot %d. calling nr_ue_ul_ind() and nr_ue_pucch_scheduler() from %s\n", ul_info.slot_tx, __FUNCTION__);
nr_ue_scheduler(NULL, &ul_info);
nr_ue_prach_scheduler(mod_id, ul_info.frame_tx, ul_info.slot_tx, ul_info.thread_id);
nr_ue_pucch_scheduler(mod_id, ul_info.frame_tx, ul_info.slot_tx, ul_info.thread_id);
check_nr_prach(mac, &ul_info, &prach_resources);
}
if (!IS_SOFTMODEM_NOS1 && get_softmodem_params()->sa) {
......@@ -544,10 +467,6 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
pdcp_run(&ctxt);
}
process_queued_nr_nfapi_msgs(mac, sfn_slot);
free(slot_ind);
slot_ind = NULL;
free(ch_info);
ch_info = NULL;
}
return NULL;
}
......
......@@ -50,6 +50,7 @@
#include "LAYER2/MAC/mac_vars.h"
#include "RRC/LTE/rrc_vars.h"
#include "PHY_INTERFACE/phy_interface_vars.h"
#include "NR_IF_Module.h"
#include "openair1/SIMULATION/TOOLS/sim.h"
#ifdef SMBV
......@@ -156,6 +157,9 @@ uint32_t N_RB_DL = 106;
*/
uint8_t abstraction_flag=0;
nr_bler_struct nr_bler_data[NR_NUM_MCS];
static void init_bler_table(void);
/*---------------------BMC: timespec helpers -----------------------------*/
......@@ -250,7 +254,6 @@ void init_tpools(uint8_t nun_dlsch_threads) {
free(params);
init_dlsch_tpool( nun_dlsch_threads);
}
static void get_options(void) {
nrUE_params.ofdm_offset_divisor = 8;
......@@ -472,6 +475,7 @@ int main( int argc, char **argv ) {
PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_NR_UE *)*MAX_NUM_CCs);
if (get_softmodem_params()->emulate_l1) {
RCconfig_nr_ue_L1();
init_bler_table();
}
if (get_softmodem_params()->do_ra)
......@@ -552,3 +556,56 @@ int main( int argc, char **argv ) {
return 0;
}
// Read in each MCS file and build BLER-SINR-TB table
static void init_bler_table(void) {
memset(nr_bler_data, 0, sizeof(nr_bler_data));
const char *awgn_results_dir = getenv("AWGN_RESULTS_DIR");
if (!awgn_results_dir) {
LOG_W(NR_MAC, "No $AWGN_RESULTS_DIR\n");
return;
}
for (unsigned int i = 0; i < NR_NUM_MCS; i++) {
char fName[1024];
snprintf(fName, sizeof(fName), "%s/mcs%d_awgn_5G.csv", awgn_results_dir, i);
FILE *pFile = fopen(fName, "r");
if (!pFile) {
LOG_E(NR_MAC, "%s: open %s: %s\n", __func__, fName, strerror(errno));
continue;
}
size_t bufSize = 1024;
char * line = NULL;
char * token;
char * temp = NULL;
int nlines = 0;
while (getline(&line, &bufSize, pFile) > 0) {
if (!strncmp(line, "SNR", 3)) {
continue;
}
if (nlines > NUM_SINR) {
LOG_E(NR_MAC, "BLER FILE ERROR - num lines greater than expected - file: %s\n", fName);
abort();
}
token = strtok_r(line, ";", &temp);
int ncols = 0;
while (token != NULL) {
if (ncols > NUM_BLER_COL) {
LOG_E(NR_MAC, "BLER FILE ERROR - num of cols greater than expected\n");
abort();
}
nr_bler_data[i].bler_table[nlines][ncols] = strtof(token, NULL);
ncols++;
token = strtok_r(NULL, ";", &temp);
}
nlines++;
}
nr_bler_data[i].length = nlines;
fclose(pFile);
}
}
......@@ -244,13 +244,13 @@ void oai_create_gnb(void) {
if (RC.gNB == NULL) {
RC.gNB = (PHY_VARS_gNB **) calloc(1, sizeof(PHY_VARS_gNB *));
LOG_I(PHY,"gNB L1 structure RC.gNB allocated @ %p\n",RC.gNB);
LOG_D(PHY,"gNB L1 structure RC.gNB allocated @ %p\n",RC.gNB);
}
if (RC.gNB[0] == NULL) {
RC.gNB[0] = (PHY_VARS_gNB *) calloc(1, sizeof(PHY_VARS_gNB));
LOG_I(PHY,"[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p\n",0,RC.gNB[0]);
LOG_D(PHY,"[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p\n",0,RC.gNB[0]);
}
PHY_VARS_gNB *gNB = RC.gNB[0];
......@@ -491,7 +491,7 @@ int wake_gNB_rxtx(PHY_VARS_gNB *gNB, uint16_t sfn, uint16_t slot) {
L1_proc->frame_tx = (L1_proc->slot_rx > (19-slot_ahead)) ? (L1_proc->frame_rx+1)&1023 : L1_proc->frame_rx;
L1_proc->slot_tx = (L1_proc->slot_rx + slot_ahead)%20;
//LOG_I(PHY, "sfn/sf:%d%d proc[rx:%d%d] rx:%d%d] About to wake rxtx thread\n\n", sfn, slot, proc->frame_rx, proc->slot_rx, L1_proc->frame_rx, L1_proc->slot_rx);
//LOG_D(PHY, "sfn/sf:%d%d proc[rx:%d%d] rx:%d%d] About to wake rxtx thread\n\n", sfn, slot, proc->frame_rx, proc->slot_rx, L1_proc->frame_rx, L1_proc->slot_rx);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "\nEntering wake_gNB_rxtx sfn %d slot %d\n",L1_proc->frame_rx,L1_proc->slot_rx);
// the thread can now be woken up
if (pthread_cond_signal(&L1_proc->cond) != 0) {
......@@ -757,7 +757,7 @@ int phy_nr_rach_indication(nfapi_nr_rach_indication_t *ind)
int phy_nr_uci_indication(nfapi_nr_uci_indication_t *ind)
{
LOG_I(NR_MAC, "In %s() NFAPI SFN/SF: %d/%d number_of_pdus :%u\n",
LOG_D(NR_MAC, "In %s() NFAPI SFN/SF: %d/%d number_of_pdus :%u\n",
__FUNCTION__,ind->sfn, ind->slot, ind->num_ucis);
if(NFAPI_MODE == NFAPI_MODE_VNF)
{
......@@ -787,8 +787,8 @@ int phy_nr_uci_indication(nfapi_nr_uci_indication_t *ind)
if (ind_pdu->harq) {
uci_ind_pdu->harq = CALLOC(1, sizeof(*uci_ind_pdu->harq));
AssertFatal(uci_ind_pdu->harq != NULL, "Memory not allocated for uci_ind_pdu->harq in phy_nr_uci_indication.");
*uci_ind_pdu->harq = *ind_pdu->harq;
uci_ind_pdu->harq->harq_list = CALLOC(uci_ind_pdu->harq->num_harq, sizeof(*uci_ind_pdu->harq->harq_list));
AssertFatal(uci_ind_pdu->harq->harq_list != NULL, "Memory not allocated for uci_ind_pdu->harq->harq_list in phy_nr_uci_indication.");
for (int j = 0; j < uci_ind_pdu->harq->num_harq; j++)
......@@ -800,21 +800,27 @@ int phy_nr_uci_indication(nfapi_nr_uci_indication_t *ind)
case NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE: {
nfapi_nr_uci_pucch_pdu_format_2_3_4_t *uci_ind_pdu = &uci_ind->uci_list[i].pucch_pdu_format_2_3_4;
nfapi_nr_uci_pucch_pdu_format_2_3_4_t *ind_pdu = &ind->uci_list[i].pucch_pdu_format_2_3_4;
*uci_ind_pdu = *ind_pdu;
if (ind_pdu->harq.harq_payload) {
uci_ind_pdu->harq.harq_payload = CALLOC(1, sizeof(*uci_ind_pdu->harq.harq_payload));
AssertFatal(uci_ind_pdu->harq.harq_payload != NULL, "Memory not allocated for uci_ind_pdu->harq.harq_payload in phy_nr_uci_indication.");
*uci_ind_pdu->harq.harq_payload = *ind_pdu->harq.harq_payload;
}
if (ind_pdu->sr.sr_payload) {
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;
}
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;
}
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;
}
break;
}
}
......@@ -944,7 +950,7 @@ int phy_crc_indication(struct nfapi_vnf_p7_config *config, nfapi_crc_indication_
int phy_nr_crc_indication(nfapi_nr_crc_indication_t *ind) {
LOG_I(NR_MAC, "In %s() NFAPI SFN/SF: %d/%d number_of_pdus :%u\n",
LOG_D(NR_MAC, "In %s() NFAPI SFN/SF: %d/%d number_of_pdus :%u\n",
__FUNCTION__,ind->sfn, ind->slot, ind->number_crcs);
if(NFAPI_MODE == NFAPI_MODE_VNF)
......@@ -967,7 +973,7 @@ int phy_nr_crc_indication(nfapi_nr_crc_indication_t *ind) {
crc_ind->crc_list[j].tb_crc_status = ind->crc_list[j].tb_crc_status;
crc_ind->crc_list[j].timing_advance = ind->crc_list[j].timing_advance;
crc_ind->crc_list[j].ul_cqi = ind->crc_list[j].ul_cqi;
LOG_I(NR_MAC, "Received crc_ind.harq_id = %d for %d index SFN SLot %u %u with rnti %x\n",
LOG_D(NR_MAC, "Received crc_ind.harq_id = %d for %d index SFN SLot %u %u with rnti %x\n",
ind->crc_list[j].harq_id, j, ind->sfn, ind->slot, ind->crc_list[j].rnti);
}
if (!put_queue(&gnb_crc_ind_queue, crc_ind))
......@@ -1063,7 +1069,7 @@ int phy_rx_indication(struct nfapi_vnf_p7_config *config, nfapi_rx_indication_t
int phy_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) {
LOG_I(NR_MAC, "In %s() NFAPI SFN/SF: %d/%d number_of_pdus :%u, and pdu %p\n",
LOG_D(NR_MAC, "In %s() NFAPI SFN/SF: %d/%d number_of_pdus :%u, and pdu %p\n",
__FUNCTION__,ind->sfn, ind->slot, ind->number_of_pdus, ind->pdu_list[0].pdu);
if(NFAPI_MODE == NFAPI_MODE_VNF)
......@@ -1165,7 +1171,7 @@ static void analyze_cqi_pdus_for_duplicates(nfapi_cqi_indication_t *ind)
{
nfapi_cqi_indication_pdu_t *src_pdu = &ind->cqi_indication_body.cqi_pdu_list[i];
LOG_I(MAC, "CQI_IND[PDU:%d][rnti:%x cqi:%d channel:%d]\n", i, src_pdu->rx_ue_information.rnti,
LOG_D(MAC, "CQI_IND[PDU:%d][rnti:%x cqi:%d channel:%d]\n", i, src_pdu->rx_ue_information.rnti,
src_pdu->ul_cqi_information.ul_cqi, src_pdu->ul_cqi_information.channel);
for (int j = i + 1; j < num_cqis; j++)
......@@ -1887,7 +1893,7 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) {
nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config;
dl_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
dl_config_req->header.message_id = NFAPI_DL_CONFIG_REQUEST;
LOG_I(PHY, "[VNF] %s() DL_CONFIG_REQ sfn_sf:%d_%d number_of_pdus:%d\n", __FUNCTION__,
LOG_D(PHY, "[VNF] %s() DL_CONFIG_REQ sfn_sf:%d_%d number_of_pdus:%d\n", __FUNCTION__,
NFAPI_SFNSF2SFN(dl_config_req->sfn_sf),NFAPI_SFNSF2SF(dl_config_req->sfn_sf), dl_config_req->dl_config_request_body.number_pdu);
if (dl_config_req->dl_config_request_body.number_pdu > 0)
{
......@@ -1898,7 +1904,7 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) {
{
uint16_t dl_rnti = dl_config_req->dl_config_request_body.dl_config_pdu_list[i].dlsch_pdu.dlsch_pdu_rel8.rnti;
uint16_t numPDUs = dl_config_req->dl_config_request_body.number_pdu;
LOG_I(MAC, "(OAI eNB) Sending dl_config_req at VNF during Frame: %d and Subframe: %d,"
LOG_D(MAC, "(OAI eNB) Sending dl_config_req at VNF during Frame: %d and Subframe: %d,"
" with a RNTI value of: %x and with number of PDUs: %u\n",
NFAPI_SFNSF2SFN(dl_config_req->sfn_sf),NFAPI_SFNSF2SF(dl_config_req->sfn_sf), dl_rnti, numPDUs);
}
......@@ -1919,8 +1925,7 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) {
int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req)
{
//LOG_I(PHY, "sfn:%d,slot:%d\n",dl_config_req->SFN,dl_config_req->Slot);
//printf("\nEntering oai_nfapi_nr_dl_config_req sfn:%d,slot:%d\n",dl_config_req->SFN,dl_config_req->Slot);
LOG_D(NR_PHY, "Entering oai_nfapi_nr_dl_config_req sfn:%d,slot:%d\n", dl_config_req->SFN, dl_config_req->Slot);
nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config;
dl_config_req->header.message_id= NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST;
dl_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
......@@ -1939,6 +1944,7 @@ int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req)
int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req)
{
LOG_D(NR_PHY, "Entering oai_nfapi_nr_tx_data_req sfn:%d,slot:%d\n", tx_data_req->SFN, tx_data_req->Slot);
nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config;
tx_data_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
tx_data_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST;
......@@ -2056,7 +2062,7 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) {
{
uint8_t pdu_type = pdu_list[i].pdu_type;
LOG_I(MAC, "ul_config_req num_pdus: %u pdu_number: %d pdu_type: %u SFN.SF: %d.%d\n",
LOG_D(MAC, "ul_config_req num_pdus: %u pdu_number: %d pdu_type: %u SFN.SF: %d.%d\n",
num_pdus, i, pdu_type, ul_config_req->sfn_sf >> 4, ul_config_req->sfn_sf & 15);
if (pdu_type != NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE)
......
......@@ -44,13 +44,21 @@ uint8_t pulls32(uint8_t **in, int32_t *out, uint8_t *end);
uint32_t pullarray8(uint8_t **in, uint8_t out[], uint32_t max_len, uint32_t len, uint8_t *end);
uint32_t pullarray16(uint8_t **in, uint16_t out[], uint32_t max_len, uint32_t len, uint8_t *end);
uint32_t pullarrays16(uint8_t **in, int16_t out[], uint32_t max_len, uint32_t len, uint8_t *end);
uint32_t pullarray32(uint8_t **in, uint32_t out[], uint32_t max_len, uint32_t len, uint8_t *end);
uint32_t pullarray32(uint8_t **values_to_pull,
uint32_t out[],
uint32_t max_num_values_to_pull,
uint32_t num_values_to_pull,
uint8_t *out_end);
uint32_t pullarrays32(uint8_t **in, int32_t out[], uint32_t max_len, uint32_t len, uint8_t *end);
uint32_t pusharray8(uint8_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end);
uint32_t pusharray16(uint16_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end);
uint32_t pusharrays16(int16_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end);
uint32_t pusharray32(uint32_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end);
uint32_t pusharray32(const uint32_t *values_to_push,
uint32_t max_num_values_to_push,
uint32_t num_values_to_push,
uint8_t **out,
uint8_t *out_end);
uint32_t pusharrays32(int32_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end);
typedef uint8_t (*pack_array_elem_fn)(void* elem, uint8_t **ppWritePackedMsg, uint8_t *end);
......
This diff is collapsed.
This diff is collapsed.
......@@ -1473,7 +1473,7 @@ void vnf_handle_nr_slot_indication(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf
}
else
{
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s: Handling NR SLOT Indication\n", __FUNCTION__);
NFAPI_TRACE(NFAPI_TRACE_DEBUG, "%s: Handling NR SLOT Indication\n", __FUNCTION__);
if(vnf_p7->_public.nr_slot_indication)
{
(vnf_p7->_public.nr_slot_indication)(&ind);
......@@ -2580,26 +2580,22 @@ int vnf_p7_read_dispatch_message(vnf_p7_t* vnf_p7)
}
// read the segment
recvfrom_result = recvfrom(vnf_p7->socket, vnf_p7->rx_message_buffer, header.message_length, MSG_WAITALL, (struct sockaddr*)&remote_addr, &remote_addr_size);
recvfrom_result = recvfrom(vnf_p7->socket, vnf_p7->rx_message_buffer, header.message_length, MSG_WAITALL | MSG_TRUNC, (struct sockaddr*)&remote_addr, &remote_addr_size);
NFAPI_TRACE(NFAPI_TRACE_INFO, "recvfrom_result = %d from %s():%d\n", recvfrom_result, __FUNCTION__, __LINE__);
// todo : how to handle incomplete readfroms, need some sort of buffer/select
if(recvfrom_result == 0)
if (recvfrom_result > 0)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "recvfrom returned 0\n");
}
else if(recvfrom_result != -1 && recvfrom_result != header.message_length)
if (recvfrom_result != header.message_length)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "Received unexpected number of bytes %d %d\n", recvfrom_result, header.message_length);
recvfrom_result += recvfrom(vnf_p7->socket, &vnf_p7->rx_message_buffer[recvfrom_result], header.message_length - recvfrom_result, MSG_WAITALL, (struct sockaddr*)&remote_addr, &remote_addr_size);
NFAPI_TRACE(NFAPI_TRACE_ERROR, "(%d) Received unexpected number of bytes. %d != %d",
__LINE__, recvfrom_result, header.message_length);
break;
}
if(recvfrom_result > 0)
{
NFAPI_TRACE(NFAPI_TRACE_INFO, "Calling vnf_nr_handle_p7_message from %d\n", __LINE__);
vnf_handle_p7_message(vnf_p7->rx_message_buffer, recvfrom_result, vnf_p7);
return 0;
}
else
{
......
export OPENAIR_HOME=$(pwd)
export OPENAIR_DIR=$(pwd)
export AWGN_RESULTS_DIR=$OPENAIR_DIR/openair1/SIMULATION/NR_PHY/BLER_SIMULATIONS/AWGN/AWGN_results
export OPENAIR1_DIR=$OPENAIR_HOME/openair1
export OPENAIR2_DIR=$OPENAIR_HOME/openair2
export OPENAIR3_DIR=$OPENAIR_HOME/openair3
......
This diff is collapsed.
......@@ -37,17 +37,12 @@
\param p_lut Pointer to decoder LUTs
\param Z Lifting size
*/
static inline void nrLDPC_bnProcPc(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf* p_procBuf, uint16_t Z)
static inline void nrLDPC_bnProcPc(t_nrLDPC_lut* p_lut, int8_t* bnProcBuf, int8_t* bnProcBufRes, int8_t* llrProcBuf, int8_t* llrRes, uint16_t Z)
{
const uint8_t* lut_numBnInBnGroups = p_lut->numBnInBnGroups;
const uint32_t* lut_startAddrBnGroups = p_lut->startAddrBnGroups;
const uint16_t* lut_startAddrBnGroupsLlr = p_lut->startAddrBnGroupsLlr;
int8_t* bnProcBuf = p_procBuf->bnProcBuf;
int8_t* bnProcBufRes = p_procBuf->bnProcBufRes;
int8_t* llrRes = p_procBuf->llrRes;
int8_t* llrProcBuf = p_procBuf->llrProcBuf;
__m128i* p_bnProcBuf;
__m256i* p_bnProcBufRes;
__m128i* p_llrProcBuf;
......@@ -1681,7 +1676,7 @@ static inline void nrLDPC_bnProcPc(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf* p_proc
\param p_lut Pointer to decoder LUTs
\param Z Lifting size
*/
static inline void nrLDPC_bnProc(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf* p_procBuf, uint16_t Z)
static inline void nrLDPC_bnProc(t_nrLDPC_lut* p_lut, int8_t* bnProcBuf, int8_t* bnProcBufRes, int8_t* llrRes, uint16_t Z)
{
// BN Processing calculating the values to send back to the CNs for next iteration
// bnProcBufRes contains the sum of all edges to each BN at the start of each group
......@@ -1690,10 +1685,6 @@ static inline void nrLDPC_bnProc(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf* p_procBu
const uint32_t* lut_startAddrBnGroups = p_lut->startAddrBnGroups;
const uint16_t* lut_startAddrBnGroupsLlr = p_lut->startAddrBnGroupsLlr;
int8_t* bnProcBuf = p_procBuf->bnProcBuf;
int8_t* bnProcBufRes = p_procBuf->bnProcBufRes;
int8_t* llrRes = p_procBuf->llrRes;
__m256i* p_bnProcBuf;
__m256i* p_bnProcBufRes;
__m256i* p_llrRes;
......
......@@ -71,5 +71,5 @@ typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,sho
\param p_llrOut Output vector
\param p_profiler LDPC profiler statistics
*/
typedef int32_t(*nrLDPC_decoderfunc_t)(t_nrLDPC_dec_params *, int8_t *, int8_t *, t_nrLDPC_procBuf *, t_nrLDPC_time_stats * );
typedef int32_t(*nrLDPC_decoderfunc_t)(t_nrLDPC_dec_params* , int8_t*, int8_t* , t_nrLDPC_time_stats* );
#endif
......@@ -34,5 +34,4 @@ extern nrLDPC_initcallfunc_t nrLDPC_initcall;
extern nrLDPC_decoderfunc_t nrLDPC_decoder;
extern nrLDPC_encoderfunc_t nrLDPC_encoder;
// inline functions:
#include "openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_init_mem.h"
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment