From 6186256816fe085a563aa3a9333746d4b799002d Mon Sep 17 00:00:00 2001 From: Raphael Vicente Rosa Date: Mon, 8 Mar 2021 11:58:55 -0300 Subject: [PATCH] Updates oai-enb-du to support USRP HW deployments - Updates oai-enb-du chart version to v0.1.1 - In Values includes field enableUSRP - false by default - du.conf (usrp): based on du.band7.tm1.25PRB.usrpb210.conf - run_enb_du.sh (usrp): adds cmds before run, uhd_images_downloader and uhd_usrp_probe --- oai-enb-du/Chart.yaml | 2 +- oai-enb-du/templates/_du_conf.tpl | 132 +++++++++++++++++ oai-enb-du/templates/_du_conf_usrp.tpl | 132 +++++++++++++++++ .../templates/bin/_run_enb_du_usrp.sh.tpl | 11 ++ oai-enb-du/templates/configmap-du.yaml | 136 ++---------------- oai-enb-du/values.yaml | 1 + 6 files changed, 287 insertions(+), 127 deletions(-) create mode 100644 oai-enb-du/templates/_du_conf.tpl create mode 100644 oai-enb-du/templates/_du_conf_usrp.tpl create mode 100644 oai-enb-du/templates/bin/_run_enb_du_usrp.sh.tpl diff --git a/oai-enb-du/Chart.yaml b/oai-enb-du/Chart.yaml index b55e58b9..065248c9 100644 --- a/oai-enb-du/Chart.yaml +++ b/oai-enb-du/Chart.yaml @@ -7,7 +7,7 @@ name: oai-enb-du description: OAI DU Chart kubeVersion: ">=1.17.0" type: application -version: 0.1.0 +version: 0.1.1 appVersion: v0.1.0 keywords: - onos diff --git a/oai-enb-du/templates/_du_conf.tpl b/oai-enb-du/templates/_du_conf.tpl new file mode 100644 index 00000000..039671ed --- /dev/null +++ b/oai-enb-du/templates/_du_conf.tpl @@ -0,0 +1,132 @@ +# SPDX-FileCopyrightText: 2020-present Open Networking Foundation +# +# SPDX-License-Identifier: LicenseRef-ONF-Member-1.0 + +{{ $duMode := index .Values "config" "oai-enb-du" "mode" }} + +Active_eNBs = ( "eNB-Eurecom-DU"); +# Asn1_verbosity, choice in: none, info, annoying + Asn1_verbosity = "none"; + + eNBs = + ( + { + ////////// Identification parameters: + eNB_CU_ID = {{ index .Values "config" "oai-enb-cu" "enbID" }}; + + eNB_name = "eNB-Eurecom-DU"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = {{ index .Values "config" "oai-enb-cu" "tac" }}; + plmn_list = ( { mcc = {{ index .Values "config" "oai-enb-cu" "plmnID" "mcc" }}; mnc = {{ index .Values "config" "oai-enb-cu" "plmnID" "mnc" }}; mnc_length = {{ index .Values "config" "oai-enb-cu" "plmnID" "length" }}; } ) + + tr_s_preference = "local_mac" + + nr_cellid = 12345678L + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "3GPP_eNODEB"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2680000000L; + uplink_frequency_offset = -120000000; + Nid_cell = 0; + N_RB_DL = 25; + Nid_cell_mbsfn = 0; + nb_antenna_ports = 1; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 90; + rx_gain = 125; + + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + } + ); + + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + } + ); + + MACRLCs = ( + { + num_cc = 1; + tr_s_preference = {{ index .Values "config" "oai-enb-du" "mode" | quote }}; + local_s_if_name = {{ index .Values "config" "oai-enb-du" "networks" "nfapi" "interface" | quote }}; + remote_s_address = {{ index .Values "config" "oai-ue" "networks" "nfapi" "address" | quote }}; + local_s_address = {{ index .Values "config" "oai-enb-du" "networks" "nfapi" "address" | quote }}; + local_s_portc = {{ index .Values "config" "oai-enb-du" "networks" "nfapi" "portc"}}; + remote_s_portc = {{ index .Values "config" "oai-ue" "networks" "nfapi" "portc"}}; + local_s_portd = {{ index .Values "config" "oai-enb-du" "networks" "nfapi" "portd"}}; + remote_s_portd = {{ index .Values "config" "oai-ue" "networks" "nfapi" "portd"}}; + tr_n_preference = "f1"; + local_n_if_name = {{ index .Values "config" "oai-enb-du" "networks" "f1" "interface" | quote }}; + remote_n_address = {{ index .Values "config" "oai-enb-cu" "networks" "f1" "address" | quote }}; + local_n_address = {{ index .Values "config" "oai-enb-du" "networks" "f1" "address" | quote }}; + local_n_portc = {{ index .Values "config" "oai-enb-du" "networks" "f1" "portc" }}; + remote_n_portc = {{ index .Values "config" "oai-enb-cu" "networks" "f1" "portc" }}; + local_n_portd = {{ index .Values "config" "oai-enb-du" "networks" "f1" "portd" }}; + remote_n_portd = {{ index .Values "config" "oai-enb-cu" "networks" "f1" "portd" }}; + } + ); + + log_config = { + global_log_level = "info"; + global_log_verbosity = "full"; + hw_log_level = "info"; + hw_log_verbosity = "full"; + phy_log_level = "info"; + phy_log_verbosity = "full"; + mac_log_level = "info"; + mac_log_verbosity = "full"; + rlc_log_level = "info"; + rlc_log_verbosity = "full"; + flexran_agent_log_level = "info"; + flexran_agent_log_verbosity = "full"; +}; + +NETWORK_CONTROLLER : { + FLEXRAN_ENABLED = "no"; + FLEXRAN_INTERFACE_NAME = "lo"; + FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; + FLEXRAN_PORT = 2210; + FLEXRAN_CACHE = "/mnt/oai_agent_cache"; + FLEXRAN_AWAIT_RECONF = "no"; +}; + +THREAD_STRUCT = ( +{ +#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + +{{- if eq $duMode "nfapi" }} +parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; +{{- else if eq $duMode "local_L1" }} +parallel_config = "PARALLEL_SINGLE_THREAD"; +{{- else }} +parallel_config = "PARALLEL_SINGLE_THREAD"; +{{- end }} + +# #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" +worker_config = "WORKER_ENABLE"; +} +); + + diff --git a/oai-enb-du/templates/_du_conf_usrp.tpl b/oai-enb-du/templates/_du_conf_usrp.tpl new file mode 100644 index 00000000..fd74b85b --- /dev/null +++ b/oai-enb-du/templates/_du_conf_usrp.tpl @@ -0,0 +1,132 @@ +# SPDX-FileCopyrightText: 2020-present Open Networking Foundation +# +# SPDX-License-Identifier: LicenseRef-ONF-Member-1.0 + +Active_eNBs = ( "eNB-Eurecom-DU"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + ////////// Identification parameters: + eNB_CU_ID = {{ index .Values "config" "oai-enb-cu" "enbID" }}; + + eNB_name = "eNB-Eurecom-DU"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = {{ index .Values "config" "oai-enb-cu" "tac" }}; + plmn_list = ( { mcc = {{ index .Values "config" "oai-enb-cu" "plmnID" "mcc" }}; mnc = {{ index .Values "config" "oai-enb-cu" "plmnID" "mnc" }}; mnc_length = {{ index .Values "config" "oai-enb-cu" "plmnID" "length" }}; } ) + + nr_cellid = 12345678L + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "3GPP_eNODEB"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2630000000L; + uplink_frequency_offset = -120000000; + Nid_cell = 0; + N_RB_DL = 25; + Nid_cell_mbsfn = 0; + nb_antenna_ports = 1; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 90; + rx_gain = 125; + + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + } + ); + + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + } +); + +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "f1"; + local_n_if_name = {{ index .Values "config" "oai-enb-du" "networks" "f1" "interface" | quote }}; + remote_n_address = {{ index .Values "config" "oai-enb-cu" "networks" "f1" "address" | quote }}; + local_n_address = {{ index .Values "config" "oai-enb-du" "networks" "f1" "address" | quote }}; + local_n_portc = 500; + remote_n_portc = 501; + local_n_portd = 600; + remote_n_portd = 601; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + } +); + +RUs = ( + { + local_rf = "yes"; + nb_tx = 1; + nb_rx = 1; + att_tx = 10; + att_rx = 10; + bands = [7]; + max_pdschReferenceSignalPower = -25; + max_rxgain = 125; + eNB_instances = [0]; + } +); + +log_config = { + global_log_level = "info"; + global_log_verbosity = "medium"; + hw_log_level = "info"; + hw_log_verbosity = "medium"; + phy_log_level = "info"; + phy_log_verbosity = "medium"; + mac_log_level = "info"; + mac_log_verbosity = "high"; + rlc_log_level = "info"; + rlc_log_verbosity = "medium"; + flexran_agent_log_level = "info"; + flexran_agent_log_verbosity = "medium"; +}; + +NETWORK_CONTROLLER : { + FLEXRAN_ENABLED = "no"; + FLEXRAN_INTERFACE_NAME = "lo"; + FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; + FLEXRAN_PORT = 2210; + FLEXRAN_CACHE = "/mnt/oai_agent_cache"; + FLEXRAN_AWAIT_RECONF = "no"; +}; + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_SINGLE_THREAD"; + # #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); diff --git a/oai-enb-du/templates/bin/_run_enb_du_usrp.sh.tpl b/oai-enb-du/templates/bin/_run_enb_du_usrp.sh.tpl new file mode 100644 index 00000000..e5e8071b --- /dev/null +++ b/oai-enb-du/templates/bin/_run_enb_du_usrp.sh.tpl @@ -0,0 +1,11 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2020-present Open Networking Foundation +# +# SPDX-License-Identifier: LicenseRef-ONF-Member-1.0 + +set -ex + +uhd_images_downloader +uhd_usrp_probe + +ENODEB=1 /opt/oai/bin/lte-softmodem -O /opt/oai/share/du.conf diff --git a/oai-enb-du/templates/configmap-du.yaml b/oai-enb-du/templates/configmap-du.yaml index 0d1fc34a..28719c7b 100644 --- a/oai-enb-du/templates/configmap-du.yaml +++ b/oai-enb-du/templates/configmap-du.yaml @@ -12,132 +12,16 @@ metadata: {{ tuple "oai-enb-du" . | include "oai-enb-du.metadata_labels" | indent 4 }} data: du.conf: | - Active_eNBs = ( "eNB-Eurecom-DU"); - # Asn1_verbosity, choice in: none, info, annoying - Asn1_verbosity = "none"; - - eNBs = - ( - { - ////////// Identification parameters: - eNB_CU_ID = {{ index .Values "config" "oai-enb-cu" "enbID" }}; - - eNB_name = "eNB-Eurecom-DU"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = {{ index .Values "config" "oai-enb-cu" "tac" }}; - plmn_list = ( { mcc = {{ index .Values "config" "oai-enb-cu" "plmnID" "mcc" }}; mnc = {{ index .Values "config" "oai-enb-cu" "plmnID" "mnc" }}; mnc_length = {{ index .Values "config" "oai-enb-cu" "plmnID" "length" }}; } ) - - tr_s_preference = "local_mac" - - nr_cellid = 12345678L - - ////////// Physical parameters: - - component_carriers = ( - { - node_function = "3GPP_eNODEB"; - node_timing = "synch_to_ext_device"; - node_synch_ref = 0; - frame_type = "FDD"; - tdd_config = 3; - tdd_config_s = 0; - prefix_type = "NORMAL"; - eutra_band = 7; - downlink_frequency = 2680000000L; - uplink_frequency_offset = -120000000; - Nid_cell = 0; - N_RB_DL = 25; - Nid_cell_mbsfn = 0; - nb_antenna_ports = 1; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - tx_gain = 90; - rx_gain = 125; - - pucch_deltaF_Format1 = "deltaF2"; - pucch_deltaF_Format1b = "deltaF3"; - pucch_deltaF_Format2 = "deltaF0"; - pucch_deltaF_Format2a = "deltaF0"; - pucch_deltaF_Format2b = "deltaF0"; - } - ); - - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - } - ); - - MACRLCs = ( - { - num_cc = 1; - tr_s_preference = {{ index .Values "config" "oai-enb-du" "mode" | quote }}; - local_s_if_name = {{ index .Values "config" "oai-enb-du" "networks" "nfapi" "interface" | quote }}; - remote_s_address = {{ index .Values "config" "oai-ue" "networks" "nfapi" "address" | quote }}; - local_s_address = {{ index .Values "config" "oai-enb-du" "networks" "nfapi" "address" | quote }}; - local_s_portc = {{ index .Values "config" "oai-enb-du" "networks" "nfapi" "portc"}}; - remote_s_portc = {{ index .Values "config" "oai-ue" "networks" "nfapi" "portc"}}; - local_s_portd = {{ index .Values "config" "oai-enb-du" "networks" "nfapi" "portd"}}; - remote_s_portd = {{ index .Values "config" "oai-ue" "networks" "nfapi" "portd"}}; - tr_n_preference = "f1"; - local_n_if_name = {{ index .Values "config" "oai-enb-du" "networks" "f1" "interface" | quote }}; - remote_n_address = {{ index .Values "config" "oai-enb-cu" "networks" "f1" "address" | quote }}; - local_n_address = {{ index .Values "config" "oai-enb-du" "networks" "f1" "address" | quote }}; - local_n_portc = {{ index .Values "config" "oai-enb-du" "networks" "f1" "portc" }}; - remote_n_portc = {{ index .Values "config" "oai-enb-cu" "networks" "f1" "portc" }}; - local_n_portd = {{ index .Values "config" "oai-enb-du" "networks" "f1" "portd" }}; - remote_n_portd = {{ index .Values "config" "oai-enb-cu" "networks" "f1" "portd" }}; - } - ); - - log_config = { - global_log_level = "info"; - global_log_verbosity = "full"; - hw_log_level = "info"; - hw_log_verbosity = "full"; - phy_log_level = "info"; - phy_log_verbosity = "full"; - mac_log_level = "info"; - mac_log_verbosity = "full"; - rlc_log_level = "info"; - rlc_log_verbosity = "full"; - flexran_agent_log_level = "info"; - flexran_agent_log_verbosity = "full"; - }; - - NETWORK_CONTROLLER : { - FLEXRAN_ENABLED = "no"; - FLEXRAN_INTERFACE_NAME = "lo"; - FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; - FLEXRAN_PORT = 2210; - FLEXRAN_CACHE = "/mnt/oai_agent_cache"; - FLEXRAN_AWAIT_RECONF = "no"; - }; - - THREAD_STRUCT = ( - { - #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" - - {{- if eq $duMode "nfapi" }} - parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; - {{- else if eq $duMode "local_L1" }} - parallel_config = "PARALLEL_SINGLE_THREAD"; - {{- else }} - parallel_config = "PARALLEL_SINGLE_THREAD"; - {{- end }} - - # #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" - worker_config = "WORKER_ENABLE"; - } - ); - +{{- if index .Values "config" "oai-enb-du" "enableUSRP" }} +{{ tuple "_du_conf_usrp.tpl" . | include "oai-enb-du.template" | indent 4 }} +{{- else }} +{{ tuple "_du_conf.tpl" . | include "oai-enb-du.template" | indent 4 }} +{{- end }} run_enb_du.sh: | +{{- if index .Values "config" "oai-enb-du" "enableUSRP" }} +{{ tuple "bin/_run_enb_du_usrp.sh.tpl" . | include "oai-enb-du.template" | indent 4 }} +{{- else }} {{ tuple "bin/_run_enb_du.sh.tpl" . | include "oai-enb-du.template" | indent 4 }} +{{- end }} init_enb_du.sh: | -{{ tuple "bin/_init_enb_du.sh.tpl" . | include "oai-enb-du.template" | indent 4 }} \ No newline at end of file +{{ tuple "bin/_init_enb_du.sh.tpl" . | include "oai-enb-du.template" | indent 4 }} diff --git a/oai-enb-du/values.yaml b/oai-enb-du/values.yaml index 46e91de7..6e4b8639 100644 --- a/oai-enb-du/values.yaml +++ b/oai-enb-du/values.yaml @@ -16,6 +16,7 @@ images: config: oai-enb-du: + enableUSRP: false mode: nfapi #or local_L1 for USRP and BasicSim networks: f1: