Compare commits

...

669 Commits

Author SHA1 Message Date
Raphael Defosseux
39ab3c1e9e * MR 1015: Multi-UE + more slots
This MR adds a multi-UE scheduler (proportional fair) for multiple UEs. Tested for two UEs, but should work for more. Additionally, it enables 12 DL slots and 2 UL slots (still fixed, will be read from the configuration file in a clean-up/follow-up MR).

* MR 1019: NASMESH: support for kernel version >= 5.6.0
he syntax for ndo_tx_timeout in Linux Kernel has changed since 5.6.0 i.e it has changed

* MR 1033: ue fixes
1. Write tx data to radio unit only on tx slots.
2. Fixed a bug in DL HARQ.
3. Disabled UE and some gNB side logs which were enabled (maybe by mistake) in previous MRs.
4. In UE, check if NDI toggled before reading SDU for PUSCH.
2021-02-11 12:21:21 +01:00
Robert Schmidt
54a2d698db Fix build: test for slot from within preprocessor 2021-02-09 16:46:44 +01:00
hardy
665688681b Merge remote-tracking branch 'origin/ue-fixes' into integration_2021_wk06_b 2021-02-09 10:54:58 +01:00
hardy
421cb60fa4 Merge remote-tracking branch 'origin/NR_DLUL_PF' into integration_2021_wk06_b 2021-02-09 10:49:28 +01:00
hardy
bcc009b2f9 Merge remote-tracking branch 'origin/nasmesh_kernel_5.8' into integration_2021_wk06_b 2021-02-09 10:48:57 +01:00
Sakthivel Velumani
8902902706 Merge branch 'develop' into ue-fixes 2021-02-08 15:06:17 +01:00
Sakthivel Velumani
3380f1a455 send data from MAC to PHY when NDI toggles 2021-02-08 12:49:32 +01:00
Robert Schmidt
b86fdaf59b Revert "Lower UE log level"
This reverts commit 71e297de9d.
2021-02-08 11:20:23 +01:00
Robert Schmidt
9b77575af2 Use the MAX_BWP_SIZE macro everywhere 2021-02-07 10:45:57 +01:00
Robert Schmidt
318c4e0fd7 Skip DL HARQ feedbacks if the timing does not match
As the precedent commit, this commit deals with the realtime problems
that we currently have on the CI bench.

For DL HARQ feedback, nFAPI does not give us the HARQ process ID.
Instead, we have to figure this out "from timing", i.e., if we trigger
PUCCH reception, we will get a message with HARQ if we instructed the
PHY to do so. If we have real-time problems, it seems (I cannot verify:
don't have real time problems) that we do not get the nFAPI message with
HARQ feedback. Thus, we need to skip the HARQ processes that should have
been processed in the past, which happens in this commit.
2021-02-07 10:45:57 +01:00
Robert Schmidt
f23890e0b9 Search correct UL HARQ, don't assert on late slot
At the time of this commit, the CI has realtime issues. This can mean
that the HARQ result is delivered in a delayed fashion. Before this
commit, we were asserting on whether the slot corresponds to the HARQ
process's expected feedback slot, but a particular feedback might be
delayed under realtime issues, and we actually don't care about the
timing since we get the HARQ process ID.

Instead, we loop through the HARQ processes for which we wait for a
feedback in the beginning until we have the right process (which did not
seem to cause a problem till now, but who knows.
2021-02-07 10:45:57 +01:00
Robert Schmidt
423a0e4afe Handle UL HARQ slot wrap around for slot = 0 2021-02-07 10:45:57 +01:00
Robert Schmidt
8bd3ec7602 Fix whitespace issues (review request) 2021-02-07 10:45:57 +01:00
Robert Schmidt
71fd526e12 Remove unused variables 2021-02-07 10:45:57 +01:00
Robert Schmidt
30d13ebf6d Lower various log levels 2021-02-07 10:45:57 +01:00
Robert Schmidt
77203ee989 Fix nr_dlschsim unitary simulator 2021-02-07 10:45:57 +01:00
ChiehChun
a8cc08ace5 Cannot allocate CCE error -> debug message 2021-02-07 10:45:57 +01:00
ChiehChun
8a823d22cf Better format dump_mac_stats() 2021-02-07 10:45:57 +01:00
ChiehChun
c51cb3f40b Enable 2 UL slots 2021-02-07 10:45:57 +01:00
Robert Schmidt
dcd591bd2b Schedule BSR0 UE only one at a time, in round-robin 2021-02-07 10:45:57 +01:00
Robert Schmidt
3b972f6766 ULSCH fix: Only allocate CCEs when necessary 2021-02-07 10:45:57 +01:00
Robert Schmidt
77de70c82f Calculate TBS for coefficient only when needed 2021-02-07 10:45:57 +01:00
ChiehChun
8bf2d1a12f Remove assert of allocate CSI PUCCH 2021-02-07 10:45:57 +01:00
ChiehChun
fde6c46ef1 Remove assertion for single UE 2021-02-07 10:45:57 +01:00
Robert Schmidt
6294ce715e Reorder pf_ul to process retransmission 2021-02-07 10:45:57 +01:00
ChiehChun
14614d74cf Find max coeff & Decrease n_rb_sched 2021-02-07 10:45:57 +01:00
ChiehChun
56831038d0 Check BSR & Create UE_sched for UL new transmission 2021-02-07 10:39:40 +01:00
Robert Schmidt
c8168085dd Calculate UL coefficient 2021-02-07 10:39:40 +01:00
ChiehChun
1b1411727c Calculate UL throughput & Initial ulsch_current_bytes 2021-02-07 10:39:40 +01:00
ChiehChun
cf725a1801 Create find_CCE in primitive 2021-02-07 10:39:40 +01:00
ChiehChun
bec348405b Find the largest contiguos region 2021-02-07 10:39:40 +01:00
ChiehChun
8f988e384d Add pf_ul & pseudo code 2021-02-07 10:39:40 +01:00
ChiehChun
5573b8e18c Change vrb_map_UL to rballoc_mask 2021-02-07 10:39:40 +01:00
ChiehChun
2becbb9210 Verify the same K2 2021-02-07 10:39:40 +01:00
ChiehChun
7da43c95d2 Change pre_precessor_ul type to bool
- To check the current slot is the scheduled slot(UL slot - K2) and
  only execute the post processor in scheduled slot.
2021-02-07 10:39:40 +01:00
ChiehChun
0234015f8e Check slot is DL slot to pre-schedule UL data 2021-02-07 10:39:40 +01:00
ChiehChun
2283e12560 Calculate rbSize from estimated buffer 2021-02-07 10:39:40 +01:00
ChiehChun
c7ffd5740f Add sched_ul_bytes/ulsch_current_bytes & Update in rx_sdu/schedule_ulsch 2021-02-07 10:39:40 +01:00
ChiehChun
4d0a2e4877 Save selected UL HARQ PID in post-processor 2021-02-07 10:39:40 +01:00
Robert Schmidt
4b1be522a5 Add estimated_ul_buffer & Update in DTCH 2021-02-07 10:39:40 +01:00
ChiehChun
989aade7b8 Log lcid default case & pirntout MAC PDU 2021-02-07 10:39:40 +01:00
ChiehChun
21e9339427 Add short/long BSR Table & Log the BSR value 2021-02-07 10:39:40 +01:00
ChiehChun
c316f2fc57 Correct bit ordering in struct NR_BSR_LONG 2021-02-07 10:39:40 +01:00
ChiehChun
a95346d169 Modify the case of truncated BSR 2021-02-07 10:39:40 +01:00
ChiehChun
1ff770ff20 Add CE & BSR pointer 2021-02-07 10:39:40 +01:00
ChiehChun
2b6a651aae Fix LCID of CRNTI for nr UE 2021-02-07 10:39:40 +01:00
ChiehChun
5e226b9e22 Remove assertion for single UE 2021-02-07 10:39:40 +01:00
ChiehChun
3bb4bddc0d Allocate DL new transmission 2021-02-07 10:39:40 +01:00
ChiehChun
a7cb83889a Find max coeff from UE_sched 2021-02-07 10:39:40 +01:00
ChiehChun
6d5634b8ce Check DL buf and Calculate the coeff to create UE_sched 2021-02-07 10:39:40 +01:00
ChiehChun
a3cc9f730b Add dlsch_current_bytes and Calculate throughput 2021-02-07 10:39:40 +01:00
ChiehChun
0dd0f5ce4a Create function for find CCE and retransmission 2021-02-07 10:39:40 +01:00
ChiehChun
13da3d6e8a Create nr_store_dlsch_buffer() 2021-02-07 10:39:40 +01:00
ChiehChun
68b03e9cb6 Create pf_dl function 2021-02-07 10:39:40 +01:00
ChiehChun
3b4ec2c82b Change vrb_map to rballoc_mask 2021-02-07 10:39:40 +01:00
ChiehChun
6c3897d4a7 Save selected DL HARQ PID in post-processor 2021-02-07 10:39:40 +01:00
ChiehChun
9fb45867a1 Initial num_pdcch_cand for multi-UE 2021-02-07 10:39:40 +01:00
Robert Schmidt
75dbf5fa4d Don't log retransmissions explicitly 2021-02-07 10:39:40 +01:00
Raymond Knopp
0496c15d27 Remove PHY HARQ round_trials logs 2021-02-07 10:39:40 +01:00
Cedric Roux
16b9f4ed60 Increase RLC buffer size to 10MB, warn when buffer full 2021-02-07 10:39:40 +01:00
Robert Schmidt
ca47955293 Bugfix: check that retransmission can be allocated 2021-02-07 10:39:39 +01:00
Robert Schmidt
78da8c9345 Save TB in MAC, transmit TX_req also on retx 2021-02-07 10:39:39 +01:00
Robert Schmidt
80e23a179e Enable 12 slots
This commit enables more slots so that the "real UE" preprocessor can
schedule them. The DL phytest preprocessor continues to only schedule
slots 1 & 3.  This is because the OAI-UE needs to have PUCCH scheduled
at least six slots in advance.  Since we do not support this (yet), but
assume that two slots are enough, we schedule the UE only in slot 1 & 3
so it has 6 slots until slot 7 to send PUCCH.
2021-02-07 10:39:39 +01:00
Robert Schmidt
59cb9c87e0 Refactor nr_rx_sdu() 2021-02-07 10:39:39 +01:00
Robert Schmidt
0773229b1a Implement UL HARQ using NR_list_t 2021-02-07 10:39:39 +01:00
Robert Schmidt
a0d47c504c Create lists for UL HARQ management 2021-02-07 10:39:39 +01:00
Robert Schmidt
4ddd45f813 Implement DL HARQ using NR_list_t 2021-02-07 10:39:39 +01:00
Robert Schmidt
42710ee7ba Create lists for DL HARQ management 2021-02-07 10:39:39 +01:00
Raymond Knopp
a3867df5f3 cleanup after removing harq state in L0 2021-02-07 10:39:39 +01:00
Raymond Knopp
ee2ce7670d made L1 DLSCH encoding stateless. harq_pid/round information are not kept in PHY. Full channel encoding is performed for each transmission of a transport block.
Still to be done: test, then cleanup data structures and fix unitary simulations.
2021-02-07 10:39:39 +01:00
Robert Schmidt
d7f46a2ff2 Set RRC nrofHARQ_ProcessesForPDSCH to 16 2021-02-07 10:39:39 +01:00
Robert Schmidt
c9de1c70c0 Set secondaryCellGroup + default values in add_new_nr_ue() 2021-02-07 10:39:39 +01:00
Robert Schmidt
74cb9bf367 Refactor add_new_nr_ue() and mac_remove_nr_ue()
mac_remove_nr_ue(): no need to memset sched_ctrl, since it is done on
connection of a UE
2021-02-07 10:39:39 +01:00
Robert Schmidt
4a0efd6f48 mac_top_init_gNB(): do not init per-UE HARQ
the whole UE_sched_ctrl is initialized in add_new_nr_ue(), which will
also init the per-UE HARQ.
2021-02-07 10:39:39 +01:00
Robert Schmidt
77c7fe5b87 Create more generic NR_list_t with helper functions 2021-02-07 10:39:39 +01:00
Robert Schmidt
338d8debae Bugfix OAI UE: reset slot_for_feedback_ack to initial value 2021-02-07 10:39:39 +01:00
Robert Schmidt
e328a6ccf7 Make multiple passes over RLC to get all data 2021-02-07 10:39:39 +01:00
Robert Schmidt
76d154f07c Do not count down TBS 2021-02-07 10:39:39 +01:00
Robert Schmidt
a18ed9d92d Reorder DLSCH MAC PDU logic
Before this commit, the DLSCH scheduler would construct the MAC PDU by
reading RLC data into a memory on the stack, and then construct the PDU
with CEs first. There are at least two problems:
- we need to keep track of the exact number of bytes of CEs (cumbersome)
  to calculate the number of MAC SDUs to include
- we needlessly copy data around.

This commit does the following instead:
- write all CEs first (no need of keeping track of this in DLSCH and a
  separate function)
- then read MAC SDUs directly into nFAPI as much as possible or
  necessary, without recopying
2021-02-07 10:39:39 +01:00
Robert Schmidt
96e1f3597b Group PDCCH PDU per CC/BWP/CORESET in RA, and reuse in DLSCH 2021-02-07 10:39:39 +01:00
Robert Schmidt
c71412882d nr_schedule_ulsch(): only one PDCCH PDU per BWP and CORESET 2021-02-07 10:39:39 +01:00
Robert Schmidt
a26404c17f nr_schedule_ue_spec(): link TX_data/PDSCH PDU with common PDU index 2021-02-07 10:39:39 +01:00
Robert Schmidt
a6348e8567 nr_generate_Msg2(): link TX_data/PDSCH PDU with common PDU index 2021-02-07 10:39:39 +01:00
Robert Schmidt
28b78ee09c nr_schedule_ue_spec(): only one PDCCH PDU per BWP and CORESET 2021-02-07 10:39:39 +01:00
Robert Schmidt
55c6ce1598 Add small notice that we assume no concurrent RA 2021-02-07 10:39:39 +01:00
Robert Schmidt
089f821dd2 Separate nFAPI PDCCH allocation from nFAPI DCI allocation
According to SCF222, a single PDCCH allocation groups DCIs that are
within the same BWP and CORESET. Therefore, if we want to allocate
multiple DCIs, we need to decouple PDCCH allocation and DCI (previously
jointly done in nr_configure_pdcch()), especially to be forward
compatible.

***Note that as of this commit, we would still allocate different PDCCH
PDUs for multiple UEs (which we do not support yet, anyway)***

nr_configure_pdcch(): simply take out DCI allocation.

nr_generate_Msg2(): separately allocate dci_pdu in common RA SS, and
rename DCI payload variable. Also, reorganize the function so that it is
first checked for CCE allocation and messages nFAPI messages are
allocated afterwards.

nr_schedule_ue_spec(): separately allocate dci_pdu in UE-specific SS.
Rename DCI payload variable.

nr_schedule_ulsch(): separately allocate dci_pdu in UE-specific SS.
Rename DCI payload variable.

nr_fill_nfapi_dl_sib1_pdu(): separately allocate dci_pdu in common SS.
2021-02-07 10:39:39 +01:00
Robert Schmidt
0655cc481d No DCI PDU array in nr_fill_nfapi_dl_sib1_pdu() 2021-02-07 10:39:39 +01:00
Robert Schmidt
080b776097 No DCI PDU array in nr_schedule_ue_spec() 2021-02-07 10:39:39 +01:00
Robert Schmidt
86b1c0035d No DCI PDU array in nr_generate_Msg2() 2021-02-07 10:39:39 +01:00
Robert Schmidt
db792632c9 Refactor config_uldci() 2021-02-07 10:39:39 +01:00
Robert Schmidt
52ba0e277d Simplify config_uldci(): handle only one DCI 2021-02-07 10:39:39 +01:00
Robert Schmidt
1bf58a4482 Deleted commented code 2021-02-07 10:39:39 +01:00
Robert Schmidt
ccaa5abc55 Reformat fill_dci_pdu_rel15() 2021-02-07 10:39:39 +01:00
Robert Schmidt
0473074acf fill_dci_pdu_rel15(): handle one DCI at a time 2021-02-07 10:39:39 +01:00
Robert Schmidt
0d90ecfd62 Make dci_pdu in PDCCH PDU an array
SCF222 says that dci_pdu in PDCCH PDU
(nfapi_nr_dl_tti_pdcch_pdu_rel15_t) should be an array, and not its
members.
2021-02-07 10:39:39 +01:00
Robert Schmidt
83f7c4be5f Make passed secondaryCellGroup pointer const in prepare_dci() 2021-02-07 10:39:39 +01:00
Robert Schmidt
dc04e8cced Make passed pointers const in nr_dci_size() and get_transformPrecoding() 2021-02-07 10:39:39 +01:00
Robert Schmidt
d0ae11783a Integrate nr_fill_nfapi_dl_pdu() back into nr_schedule_ue_spec()
Initially, filling the PDCCH and PDSCH nFAPI messages was split into a
separate function (in an attempt to keep the code structure similar to
LTE). However, this proved as not helpful: the nr_fill_nfapi_dl_pdu()
just filled the messages, with a parameter list almost size as long as
the actual messages (because most parameters are kind of independent).
This made no sense, so we put it back.

Also, from an understanding POV, they just fill a message as specified
in SCF222, so it should not be a problem.
2021-02-07 10:39:39 +01:00
Robert Schmidt
71e297de9d Lower UE log level 2021-02-07 10:39:39 +01:00
Robert Schmidt
8f399a1c9e Disable logging of PUCCH 2021-02-07 10:39:39 +01:00
Robert Schmidt
a69ec6669a Assert on maximum number of used PUCCH resources 2021-02-07 10:39:39 +01:00
ChiehChun
62c58bd722 Use correct pucch_index_used 2021-02-07 10:39:39 +01:00
Robert Schmidt
943d55717e Scheduler: introduce BIT() macro 2021-02-07 10:39:39 +01:00
Robert Schmidt
614b2c1951 DLSCH: do not check for slot number 2021-02-07 10:39:39 +01:00
Robert Schmidt
aa948f707a Deallocate CCE if PUCCH allocation fails 2021-02-07 10:39:39 +01:00
Robert Schmidt
ac5ac8dd25 Clarify assumptions in nr_acknack_scheduling() 2021-02-07 10:39:39 +01:00
Robert Schmidt
1c75496ffa nr_schedule_pucch() for multiple UEs 2021-02-07 10:39:39 +01:00
Robert Schmidt
7879e6ad32 Remove (unnecessary) num_slots_per_tdd in DLSCH sched 2021-02-07 10:39:39 +01:00
Robert Schmidt
2225cd26fe Handle multiple TDD periods 2021-02-07 10:39:39 +01:00
Robert Schmidt
551b08c315 Skip CSI if present 2021-02-07 10:39:39 +01:00
Robert Schmidt
75f8591b9b Handle PUCCH frame/period wrap around 2021-02-07 10:39:39 +01:00
Robert Schmidt
d281e41a50 Assert on TDD period "wrap around" 2021-02-07 10:39:39 +01:00
Robert Schmidt
91fd4ddf7e rewrite nr_acknack_scheduling() 2021-02-07 10:39:39 +01:00
Robert Schmidt
c5968599b2 Add nr_fill_nfapi_pucch(): allocate PUCCH nFAPI message 2021-02-07 10:39:39 +01:00
Robert Schmidt
7a9ad3dbf7 Keep track of used PUCCH resources 2021-02-07 10:39:39 +01:00
Robert Schmidt
94d8147ece nr_csi_meas_reporting() for multiple UEs 2021-02-07 10:39:39 +01:00
Robert Schmidt
5a2caa5475 Refactor nr_csi_meas_reporting(): check only in slot 0 2021-02-06 20:50:28 +01:00
Robert Schmidt
b6ebdc2fab Refactor nr_get_csi_bitlen() 2021-02-06 20:50:28 +01:00
Robert Schmidt
49c7dbf214 Use three fields 2021-02-06 20:50:28 +01:00
Robert Schmidt
171f7842bc Rewrite PUCCH allocation (simplified, restricted)
- No dynamic allocation of PUCCH structures
- Use first PUCCH for HARQ (can only allocate for up to two slots in
  single PUCCH, simplistic nr_acknack_scheduling!)
- Use second PUCCH for CSI, do not multiplex!
2021-02-06 20:50:28 +01:00
Robert Schmidt
4e91f44839 Rename NR_sched_pucch to NR_sched_pucch_t 2021-02-06 20:50:28 +01:00
Robert Schmidt
a19a15cfb7 Enable logging of PUCCH 2021-02-06 20:50:28 +01:00
Francesco Mani
868f55513f rnti in pucch 0 indication 2021-02-06 20:50:28 +01:00
Raphael Defosseux
403db5f66e CI: adding conditional stages in the parent pipeline based on labels in Merge Requests
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2021-02-06 19:03:15 +01:00
Raphael Defosseux
0aff489c75 * MR 1027: SIB1 update
Update in SIB1 implementation to solve REG to CCE mapping issues and also correction in pdcch RE extraction when BWP_start>0.

* MR 1031: LTE/NR X2AP: fix content of SgNBAdditionRequest
Wireshark (version 3.3.2) was not happy. https://asn1.io/asn1playground/ was not happy.

* MR 1036: LTE ULSCH bugfix
Minor fix in the UL scheduler

* MR 1008: NR SA ITTI sim update for core connectivity
Updates for connections to 5G core node using ITTI sim. Usage documentation have also been added.

* MR 1025: Cleanup NR RA procedure - mostly UE
2021-02-06 14:25:07 +01:00
hardy
663dd1251c Merge remote-tracking branch 'origin/NR_RA_cleanup' into integration_2021_wk05 2021-02-05 12:00:38 +01:00
hardy
5d832308c6 Merge remote-tracking branch 'origin/NR_SA_itti_sim_wk48' into integration_2021_wk05 2021-02-05 11:43:54 +01:00
Thomas Schlichter
9c4714fd25 NR_UE: re-introduce mcs check for DCI format 0_0 and 0_1 2021-02-04 19:51:58 +01:00
Thomas Schlichter
ea0d24b935 NR_UE: discard DCI with bwp_indicator != 1
Even stricter check/hack for BWP ID.
Drop every DCI where this value is not '1'.
2021-02-04 19:27:56 +01:00
masayuki.harada
4f73692eb1 Merge remote-tracking branch 'remotes/origin/develop_SA_L3' into NR_SA_itti_sim_wk48 2021-02-03 22:37:25 +09:00
Thomas Schlichter
6add9968a8 Merge branch 'develop' into 'nasmesh_kernel_5.8'
# Conflicts:
#   openair2/NETWORK_DRIVER/MESH/device.c
2021-02-03 09:42:54 +01:00
Xue Song
6a3b7b40a5 Merge branch 'master' into develop_SA_L3
Conflicts:
	openair2/GNB_APP/gnb_config.c
	openair2/RRC/NR/rrc_gNB.c
	openair2/RRC/NR/rrc_gNB_NGAP.c
	openair2/RRC/NR_UE/rrc_UE.c
2021-02-03 14:58:07 +09:00
hardy
c00b44028b Merge remote-tracking branch 'origin/develop-sib1-update' into integration_2021_wk05 2021-02-02 15:40:22 +01:00
hardy
1d6eea64a4 Merge remote-tracking branch 'origin/bugfix-x2-SgNBAdditionRequest' into integration_2021_wk05 2021-02-02 15:39:38 +01:00
hardy
320b43c462 Merge remote-tracking branch 'origin/lte-ulsch-bugfix' into integration_2021_wk05 2021-02-02 15:38:54 +01:00
dir
82d40a654c Transform precoding related changes 2021-02-02 13:19:42 +01:00
Sakthivel Velumani
c9dcff3d7e Merge branch 'develop' into ue-fixes 2021-02-01 16:07:58 +01:00
Sakthivel Velumani
f44dc35bfd Reducing RX gain at gNB
1. Changed rx gain at gNB from 75 to 50. PUCCH works again with OAI-UE.
2. Disabling MAC layer retransmission logs.
2021-02-01 16:00:33 +01:00
Sakthivel Velumani
d973db9273 Fix for dlsch issue on caracal
1. Reducing rx gain at UE. Existing gain seems to saturate the receiver with full bw allocaiton.
2. Setting different dlsch bitmap for phytest mode.
2021-02-01 13:47:45 +01:00
Sakthivel Velumani
a25309363a Enabling a log for CI purpose 2021-02-01 13:41:53 +01:00
yoshio.inoue
7772e5c3b2 Merge remote-tracking branch 'fjt_dev/develop_SA_L3' into NR_SA_itti_sim_wk48 2021-02-01 21:38:25 +09:00
yoshio.inoue
c49220610d add TODO comments 2021-02-01 21:19:04 +09:00
Cedric Roux
94dad700c4 lte/nr x2ap: fix content of SgNBAdditionRequest
Wireshark (version 3.3.2) was not happy.
https://asn1.io/asn1playground/ was not happy.

Let's make them happy.

So then everyone is happy.
2021-02-01 11:48:44 +01:00
Wu.Jing
37f0198944 Revert "remove the commented code from rrc_gNB.c"
This reverts commit 15caed4d54.
2021-02-01 16:02:47 +09:00
Wu.Jing
c20fae1dea Merge branch 'develop_SA_SIM' into develop_SA_L3 2021-02-01 14:58:51 +09:00
He Shanyun
150221536c change output format for ran ue ngap id 2021-02-01 14:08:19 +09:00
Xue Song
a85f261b54 add license text
fix some problems
2021-02-01 13:59:56 +09:00
yincong
15caed4d54 remove the commented code from rrc_gNB.c 2021-02-01 12:27:37 +09:00
Sakthivel Velumani
a241df5006 Fixed compile warnings 2021-01-31 17:35:08 +01:00
Thomas Schlichter
bca9f74e66 Merge remote-tracking branch 'develop' into NR_RA_cleanup 2021-01-29 18:52:37 +01:00
Remi Hardy
3b2d50374a Integration 2021 wk04
MR1006 : itti enhancement
-new feature: creates itti queue during runtime 
-modified itti message instance

MR1012 : 5G NR: UL transform precoding (SC-FDMA)

MR1022 : Wireshark t hack ueid

MR997 : LTE uplink improvement
-LTE update about uplink performance improvement and some bug fixes from Fujitsu.
-Fix uplink calculation error in SCD and PHY layer.
-Add interference calculation for PUSCH.
-Update TPC control.
-Fix nFAPI hang-up
-Fix DRB is non active after Re-establishment.
-Msg3 PHICH problem.
-Add statistical logs.


MR1030 : CI RHEL container update
-CI adaptation to build the shared and target images on asterix and obelix Python framework

MR1023 : ci ue parallel
-Enables OAI UE parallelization in CI tests (where applicable)
2021-01-29 16:39:29 +01:00
Sakthivel Velumani
0eb2e06725 Moved pusch thread parameter to L1 in config file 2021-01-29 13:14:14 +01:00
cig
5a9014e960 Review of MR 1025
- bugfix in nr_ue_dci_configuration
- cleanup of irrelevant RA-related data structure members in UE
- moved msg1 init condition to MAC
- minor fixes concerning init_ra function
2021-01-29 12:44:28 +01:00
Robert Schmidt
f1cb44a005 Bugfix: decrease actual MCS value 2021-01-29 09:31:56 +01:00
hardy
099d40527a Merge remote-tracking branch 'origin/rh_ci_ue_parallel' into integration_2021_wk04_b 2021-01-29 07:42:43 +01:00
hardy
044f665730 Merge remote-tracking branch 'origin/ci-deploy-asterix' into integration_2021_wk04_b 2021-01-29 07:42:15 +01:00
hardy
5db5657df7 Merge remote-tracking branch 'origin/lte_uplink_improvement' into integration_2021_wk04_b 2021-01-29 07:41:47 +01:00
hardy
4a263eb69d Merge remote-tracking branch 'origin/wireshark-T-hack-ueid' into integration_2021_wk04_b 2021-01-29 07:41:11 +01:00
hardy
6e12f8f8d3 Merge remote-tracking branch 'origin/nr_ul_scfdma' into integration_2021_wk04_b 2021-01-29 07:40:42 +01:00
hardy
9c810b311d Merge remote-tracking branch 'origin/itti-enhancement' into integration_2021_wk04_b 2021-01-29 07:40:07 +01:00
hardy
62aec337bf Merge remote-tracking branch 'origin/flexran-repair-mme-mgmt' into integration_2021_wk04_b 2021-01-29 07:39:49 +01:00
rmagueta
62bc47c820 Minor update in SIB1 contents. do_SIB1_NR() only if SA. 2021-01-28 16:04:41 +00:00
Thomas Schlichter
92cb99b201 NR_UE: Add some more LOG_W() in case of ignoring DCI. 2021-01-28 10:14:44 +01:00
Thomas Schlichter
ac1bc7025b NR_UE: discard DCI with bwp_indicator == 0
Recently we stared using the BWP_indicator signalled in DCI, before we always assumed BWP_Id == 1.
Now "fake-DCI" with bandwidth_indicator == 0 lead to segmentation faults, so we discard these.
Note: There are still several placed where we assume BWP_Id == 1!
2021-01-28 09:36:00 +01:00
Thomas Schlichter
60471dd179 NR_UE: change message when RA succeeded, so CI recognizes it again 2021-01-28 09:33:47 +01:00
Xue Song
36487515c4 fix double definition in rrc_gNB_NGAP.c and nr_ngap_gnb.c 2021-01-28 14:20:35 +09:00
Thomas Schlichter
3eb04ffcf7 move unreachable LOG_D() in NR_IF_Module.c
Code between a 'switch' statement and its first 'case' statement is not reachable!
So move the LOG_D() statement just before the 'switch' statement.
2021-01-27 12:05:34 +01:00
Raphael Defosseux
747695e476 CI: fix string formatting for python3.5
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2021-01-26 09:51:59 +01:00
rmagueta
6e917c539f Fill SIB1 with more contents 2021-01-25 23:18:35 +00:00
Sakthivel Velumani
e913e2ebc8 disabling logs 2021-01-25 17:05:16 +01:00
Thomas Schlichter
f32297fefa fix cppcheck warnings 2021-01-25 14:32:32 +01:00
Thomas Schlichter
729adbcd4e fix nr_prachsim phy-simulator 2021-01-25 14:28:50 +01:00
Thomas Schlichter
aafe94c556 move definitions from defs_nr_UE.h back to nr-ue.c to fix compilation of LTE UE 2021-01-25 13:59:21 +01:00
Mohammed Ismail
c9e08d030b CI: html tab extention to add more details on built shared and target images
fix ssh connection when remote server has public key

Signed-off-by: Mohammed Ismail <mohammed.ismail@eurecom.fr>
2021-01-25 11:06:22 +01:00
Sakthivel Velumani
f6a502ada2 fixes
some more fixes that are missed out in previous commits
2021-01-25 11:03:37 +01:00
luis_pereira87
583d2cc0d4 Fix for NR_MAX_PDCCH_AGG_LEVEL 2021-01-24 12:14:48 +00:00
rmagueta
73b34936be Update MAX_DCI_CORESET to 16 as in 3GPP Rel 15 2021-01-23 20:16:05 +00:00
rmagueta
094f21a165 Fix REG to CCE mapping at UE 2021-01-23 18:40:30 +00:00
rmagueta
e2df86be88 Fix PDCCH extract RBs 2021-01-23 15:54:16 +00:00
rmagueta
70938bb907 Fix REG to CCE mapping at gNB 2021-01-22 17:18:37 +00:00
Sakthivel Velumani
3a1de4c879 Flaging that HARQ feedback has been sent
so that in the next frame when the same harq is not used the UE won't send feedback (this was a bug)
2021-01-22 15:50:44 +01:00
Sakthivel Velumani
3858af320f Write to USRP only when needed in TDD 2021-01-22 15:48:34 +01:00
hardy
d7220cee37 parameters typo in xml 2021-01-22 15:25:43 +01:00
Mohammed Ismail
15ee2bf2c4 [CI] adapted to build the image on asterix and obelix
Signed-off-by: Mohammed Ismail <mohammed.ismail@eurecom.fr>
2021-01-22 13:57:41 +01:00
Thomas Schlichter
df06b67d1e reduce logging output 2021-01-22 12:26:59 +01:00
Thomas Schlichter
a9bfdb2d6e NR_UE: use 'do_ra' instead of 'mac_enabled' to enable RA procedure 2021-01-22 12:09:04 +01:00
Thomas Schlichter
220c5b2ddf make sure MAC is enabled in nr-uesoftmodem 2021-01-22 12:06:41 +01:00
herlesupreeth
c59a99ceea NASMESH: support for kernel version >= 5.6.0 2021-01-21 19:18:35 +01:00
Thomas Schlichter
1cb657accc mention support for SC-FDMA in FEATURE_SET.md 2021-01-21 18:51:26 +01:00
Thomas Schlichter
c107b9b756 Merge remote-tracking branch 'develop' 2021-01-21 18:28:33 +01:00
hardy
9ea9a9bc02 adding ue parallelization to get rid of real time errors 2021-01-21 13:47:47 +01:00
Laurent Thomas
eddebae1e4 fix after code review 2021-01-21 13:47:18 +01:00
Cedric Roux
40f985a957 macpdu2wireshark: add UE id into scheduling request logging
Same logic as previous commit, same caveats.
2021-01-21 11:44:28 +01:00
Cedric Roux
23b24a3c8a T tracer macpdu2wireshark: add UE id
There was a problem with several UEs in the wireshark log. It seems that
wireshark needs the UE id otherwise it gets confused and sees retransmissions
where it's just another UE connecting and doing the same as a previous
UE.

Let's put kind of a UE id. Each RNTI seen by macpdu2wireshark gets an UE id
assigned the first time it's seen in a trace.

This is a bit hackish but seems to be fine.

We could have added UE_id in all the traces, that is change the T() calls
in the softmodem. It was less work to do it as it is, ie. only touch
macpdu2wireshark.c.

The RAR uses the same UE id all the time, may be a problem. To be refined
if needed.
2021-01-21 11:29:29 +01:00
Cedric Roux
4344b9108e macpdu2wireshark: trace scheduling requests
You need a recent version of wireshark for this to work properly.
Successfully tested with 3.3.2.
2021-01-21 11:26:02 +01:00
Thomas Schlichter
f1653c5f73 fix build of phy_simulators 2021-01-20 18:04:28 +01:00
cig
e8989b2015 Moved UE UL scheduling functions to new MAC file
- this commit was necessary because the location of the MAC UE
  functions does not reflect the context in which they are used
- therefore all UL scheduling-related functions have been moved
  to a new nr_ue_scheduler.c file
- and the irrelevant file rar_tools_nrUE.c has been deleted
  (nr_ue_process_rar moved to nr_ue_procedures)
- the new locations are supposed to make the file and functions
  organisations more structured and cleaner
2021-01-20 14:59:52 +01:00
cig
9f6a8da0ac UE UL scheduling review
- new data structure RAR_grant_t to handle RAR grant
- new common ul scheduler function
- new common ul pdu configuration function handling ul grants
- new function to fill ul_config_request
- moved pdu configuration code from process dci function
- merged procedures for Msg3 and PUSCH together in nr_ue_scheduler
- the same functions are now handling both PUSCH and Msg3
- relying on ul_config (no more RA Msg3 frame and slot storage)
- done some cleanup and logging in the process
2021-01-20 14:18:04 +01:00
yoshio.inoue
6bd2aab1f5 Merge remote-tracking branch 'fjt_dev/develop_SA_L3' into NR_SA_itti_sim_wk48 2021-01-20 10:36:15 +00:00
He Shanyun
e4ff0d5b31 Merge remote-tracking branch 'remotes/origin/master' into develop_SA_L3 2021-01-20 01:51:32 +00:00
masayuki.harada
1d414412a0 Merge remote-tracking branch 'remotes/origin/develop_SA_L3' into NR_SA_itti_sim_wk48 2021-01-18 14:29:12 +09:00
He Shanyun
b425e6f495 fix cppcheck error and warning 2021-01-16 12:04:00 +09:00
Thomas Schlichter
e3ac0404a7 fix printf() formats for unsigned integers in nr_ulsim 2021-01-15 17:09:28 +01:00
cig
35c4f94e1d Introduced a new function to retrieve the transformPrecoding status
- this return whether the transform precoder is enabled or not
- redundant configuration code has been migrated to the new function
- get_transformPrecoding is a common MAC function used already
  @ UE side, can be adopted by gNB too
2021-01-15 16:53:15 +01:00
cig
c99c04314d Moved code to retrieve RNTI type to a new function @ UE
- this will be later be necessary in DCI procedures which are dependent on
  the RNTI type
2021-01-15 16:53:15 +01:00
cig
fcd77ea1da Review Msg3 tranmission
- now transmitting resetting Msg3 slot and frame to -1 after transmission
- cleanup in Msg3 scheduling
- checked Msg3 pdu configuration against the 3GPP specs
2021-01-15 16:53:15 +01:00
cig
70028ba492 Fixed inconsistencies in the type of dci_format @ NR UE 2021-01-15 16:53:15 +01:00
cig
7946a0bdf1 Fixed warnings related to unused variables @ NR UE 2021-01-15 16:53:15 +01:00
cig
0f809dd4a2 Migration of UE MAC RA-related members to a new data struct
- new data struct is RA_config_t
- all RA-related members have been moved to the new struct
- static variables have been migrated too
2021-01-15 16:53:15 +01:00
cig
73fbbf50ed Cleanup MAC header files
- sorted out according to recurring logic that wants function
  prototypes in separate files from data struct and constants
  definitions, variables in separate .c files with inclusion
  of "extern" header files
- moved function prototypes to resective header files
- moved data structures and constants to respective header files
- merged unnecessary mac.h file into mac_defs.h @ MAC UE
- moved const variables suchs as tables to respective .c files
- moved extern references to respective extern.h files
2021-01-15 16:53:15 +01:00
cig
f09ee3e526 Cleanup and review of RA procedure after Msg3 transmission
- related to section 5 of 3GPP TS 38.321 specs
- handling of RA failure
- handling of RA completion
- first implementation of contention-based RA procedures
- minor fixes related to ue_get_rach and init_ra functions
2021-01-15 16:53:15 +01:00
cig
2e8e9b7dcf UE power measurements fixes
- RA preamble power computation review
- RSRP review
- PCmax computation
- Pathloss computation
- cleanup of reference to LTE
- minor fixes
2021-01-15 16:53:06 +01:00
Thomas Schlichter
7e93eef40c fix unsigned/signed warning regarding nr_(i)dft 2021-01-15 14:55:38 +01:00
Thomas Schlichter
691ad0bba0 Merge remote-tracking branch 'develop' into nr_ul_scfdma
Conflicts:
	openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
2021-01-15 14:54:37 +01:00
Remi Hardy
951fdfef7e MR957 : rlc v2: implement SOstart/SOend in NACK reporting
If we NACK without SOstart/SOend then the other end of the RLC channel will consider all the bytes as NACKed and will have to resend them all. 
If another status is then reported before all the bytes are sent, and because we don't use SOstart/SOend this status will NACK all the bytes again, then all the bytes are to be sent again. 
And the cycle repeats. It will end with a max retx reached (which triggers RLF, Radio Link Failure).

MR1010 : NR UE: Fix for error message - no active DLSCH
- Fixes for the following error message at UE: [PHY] [UE][FATAL] nr_slot_rx 1: no active DLSCH

MR994 : Cleanup softmodem main
- Introduces --dlsch-parallel command line option to set the number of threads for dlsch decoding. If set to 0 (default) no parallelization. 
- Some cleanup in tracing and in nr-uesoftmodem.c data.

MR999 : NR FR2 RA
- Temporary Fix of RA procedure for FR2 (both gNB and UE)
- Fixes in gold sequence initialization at UE
- Moves 2nd downlink to slot 3 instead of 2 to avoid clash with UL DCI (only 1 candidate per slot in FR2 currently)

MR988 : SIB1
Initial implementation of SIB1
2021-01-15 10:29:53 +01:00
hardy
213c948d84 Merge remote-tracking branch 'origin/develop-sib1' into integration_2021_wk02_wMR988
Conflicts:
	openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
	openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
2021-01-14 13:17:19 +01:00
cig
cd36314de9 Cleanup MAC UE of unused struct members 2021-01-11 18:36:43 +01:00
cig
ad230dcc31 UE Msg2 reception review
- enhancement of DL indication flow for Msg2 (RAR)
- merging interface procedures to handle DLSCH and RAR together
- better separation of MAC and PHY functionalities
- cleanup of double ambiguous functions to process RAR
- merging functions to process TA command into the ue_ta_procedures function
- enhancement of logging and formatting in the process
2021-01-11 18:36:43 +01:00
cig
b7e9a1b1c3 Cleanup of long-time unused nr_ue_process_dlsch 2021-01-11 18:36:43 +01:00
cig
3e893b0dfe Review of UE DL indication
- moved fill_dl_indication to phy procedures
- introduced a new function to fill the RX indication
- replaced redundant configuration code with the fill functions
- extended the function to fill the rx indication
- handling different dl pdus types
- cleanup of redundant code
2021-01-11 18:36:37 +01:00
hardy
e5aabd88c2 Merge remote-tracking branch 'origin/cleanup_softmodem_main' into integration_2021_wk02 2021-01-11 14:54:04 +01:00
hardy
fe7a5a2dbd Merge remote-tracking branch 'origin/NR_FR2_RA' into integration_2021_wk02 2021-01-11 14:53:36 +01:00
hardy
1cff771937 Merge remote-tracking branch 'origin/NR_UE_dlsch_bugfix' into integration_2021_wk02 2021-01-11 14:52:40 +01:00
hardy
df88b0493e Merge remote-tracking branch 'origin/rlc-v2-bugfix-status-reporting' into integration_2021_wk02 2021-01-11 14:51:18 +01:00
Laurent
3b0c43c04b fix memory allocation error 2021-01-10 21:41:22 +01:00
Laurent
0dab0871c5 Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into itti-enhancement 2021-01-10 12:33:10 +01:00
francescomani
50aa4607d7 Merge branch 'NR_FR2_RA' of https://gitlab.eurecom.fr/oai/openairinterface5g into NR_FR2_RA 2021-01-09 17:07:03 +01:00
francescomani
6995eef871 moving initialization of msg3 frame and slot 2021-01-09 17:06:59 +01:00
rmagueta
ab107c98dd Fix RA BWP at UE 2021-01-09 15:58:54 +00:00
frtabu
a81f429c1f Merge branch 'cleanup_softmodem_main' of https://gitlab.eurecom.fr/oai/openairinterface5g into cleanup_softmodem_main 2021-01-08 18:26:23 +01:00
frtabu
6ec065fe2a add tpool thread name parameter, review fixes 2021-01-08 18:19:29 +01:00
Thomas Schlichter
41f319b02a add test cases for UL transform precoding (SC-FDMA) 2021-01-08 17:26:38 +01:00
Wang
b403567074 Update nr_gold_ue.c 2021-01-08 10:50:56 +01:00
frtabu
cbdfc1c933 add tpool thread name parameter, fi init 2021-01-08 01:22:23 +01:00
rmagueta
8bd539025b Minor correction 2021-01-07 23:00:07 +00:00
Shweta Shrivastava
41c55be847 Fix for error message - no active DLSCH 2021-01-07 13:40:22 -06:00
rmagueta
9544a181ea Merge remote-tracking branch 'origin/develop' into develop-sib1 2021-01-07 18:29:04 +00:00
rmagueta
223c8b9ad9 Fix REG mapping type for coreset0 2021-01-07 18:28:17 +00:00
Thomas Schlichter
d99099f316 Merge remote-tracking branch 'develop' into NR_FR2_RA
Conflicts:
	openair1/PHY/NR_REFSIG/nr_gold_ue.c
2021-01-07 17:00:13 +01:00
yoshio.inoue
a011f33251 Merge remote-tracking branch 'fjt_dev/develop_SA_L3' into NR_SA_itti_sim_wk48 2021-01-07 10:03:27 +00:00
Wu.Jing
f22a779881 Merge branch 'master' into develop_SA_L3 2021-01-07 13:55:40 +09:00
rmagueta
a6a56d23cb Fix in coreset0 transmission slot calculation 2021-01-06 14:39:09 +00:00
Raphael Defosseux
228be9225b Merge branch 'ci-fix-flexran-rtc-build-xenial' into 'develop'
CI: fix flexran-rtc build Xenial

See merge request oai/openairinterface5g!1007
2021-01-05 18:51:24 +01:00
Raphael Defosseux
7d5081f72a CI: patching pistache build in flexran-rtc for xenial VM build
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2021-01-05 13:57:19 +01:00
Laurent
ebccfe5117 add raw capture from UHD examples and fix a rfsim bug 2021-01-02 18:58:13 +01:00
Laurent
c4a91bcc62 scope, dirty replay 2020-12-29 19:00:51 +01:00
Laurent
014b35bca3 to relaunch CI (aborted) 2020-12-28 10:07:08 +01:00
cig
f4b8e780b4 RAR reception review @ UE
- fixes to backoff counter procedure
- updated received target power computation (TS 38.321 R16)
2020-12-27 19:38:03 +01:00
cig
a30c8075a2 Cleanup RA procedure @ UE
- review/cleanup of commented out descriptions
- logging
- indentation
- spacing
- typos
- cleanup of unused RA_tx_frame, RA_tx_slot members
2020-12-27 19:37:34 +01:00
cig
9aa7b5b432 RA initialization review according to 5.1.1 of TS 38.321 v16.2.1
- moved init code to new function init_RA
- moved relevant variables from MAC to prach_resources
- cleanup of unused struct members
- other minor fixes
2020-12-27 19:37:18 +01:00
cig
833d2ae47e Moved RA-RNTI computation to new function @ MAC UE 2020-12-27 19:37:06 +01:00
cig
b9a49238e6 Configuration of msg3_deltaPreamble @ UE
- according to clause 7.1.1. of TS 38.213
2020-12-27 19:36:33 +01:00
cig
9788aff8b7 AssertFatal cleanup @ UE
- focus: RA procedures, PHY procedures
2020-12-27 19:36:18 +01:00
cig
2bd1ab8732 UE get PRACH resources review @ MAC
- Moved code for SSB to RACH mapping config to new function
- Moved RA preambles configuration routine to new function
- Removed irrelevant arguments to nr_get_prach_resources
- turned some struct members and local vars into global vars
- added checks on the RA Type as per TS 38.321 clause 5.1.1
- minor cleanups
- currently only 4-step RA is available
2020-12-27 19:36:01 +01:00
cig
8eea13f782 Defined common MAX_BWP_SIZE @ MAC
- as defined by clause 12 "BWP Operation" TS 38.213
- cleaned up hardcoded usage
2020-12-27 19:35:25 +01:00
cig
4386f724dc Fixes for UE BWP Operation 3GPP TS 38.213 version 16.3.0 Release 16
- fetching configuration from RRC
- removed hardcoded params (e.g. bwp_id)
- added BWP Id members to MAC instance
- introduced offsetToCarrier
2020-12-27 19:29:28 +01:00
cig
ef1deccef8 Introduced RA type @ UE
- whether it is 2-step or 4-step RA
- added checks on CFRA and 2-step RA pointer members
- introduced enum and PRACH resources struct member
2020-12-27 19:28:47 +01:00
cig
1d2d96f34e Cleanup RA procedure
- removed irrelevant prach_config_enabled parameter
- cleanup of commented out code
- minor fixes
- enhancement of logging
2020-12-27 19:28:30 +01:00
cig
895d97d0e8 Cleanup UE mac_enabled conditions
- skipping RA procedures when MAC is disabled
- added mac_enabled flag that allows to disable RA and TA at UE from CL
2020-12-27 19:28:13 +01:00
cig
a21e858f4f Cleanup runmode @ UE side
- removed unused arguments to phy functions
- removed irrelevant conditions on UE run mode
- replaced hardcoded param with PHY UE stored value
2020-12-27 19:27:51 +01:00
cig
1c24adeef9 Cleanup NR UE
- focus: defs_nr_UE.h, nr-ue.c, phy_procedures_nr_ue.c, nr_init_ue.c
- removed long-time commented out code
- replaced hardcoded params
- removed unnecessary header inclusions
2020-12-27 19:26:18 +01:00
cig
a9cc183cf6 Moved definitions and extern variables in nr-ue.c to .h files
- extern vars to phy_extern_nr_ue.c
- def/undef to defs_nr_ue.h
2020-12-27 19:24:36 +01:00
cig
eea30e7250 Moved dl indication config code to fill_dl_indication function 2020-12-27 19:24:17 +01:00
cig
605f1e90e7 Replaced hardcoded Max PDSCH TBS value with globally defined parameter 2020-12-27 19:23:29 +01:00
cig
33dc5772e8 Cleaning up references to LTE in some NR UE functions
- replaced eNB naming with gNB
2020-12-27 19:23:01 +01:00
masayuki.harada
bbaef50932 Fix est buffer. 2020-12-27 20:19:33 +09:00
Laurent
d253301c1a intptr_t instead of int64_t for instance_t 2020-12-27 12:09:20 +01:00
Laurent
79d51ce645 reallocarray() doesn't exist in old Ubuntu 2020-12-26 11:05:42 +01:00
frtabu
58309dd730 simplify nrue command line parameter processing 2020-12-23 18:43:03 +01:00
Laurent
a432feda3e add external visibility for itti_create_queue 2020-12-23 14:29:40 +01:00
Laurent
42a110338c itti dynamic queue creation, and 64 bits instance id 2020-12-23 13:56:01 +01:00
frtabu
d3919b6af4 Merge branch 'develop' into cleanup_softmodem_main 2020-12-22 23:07:54 +01:00
dir
c5bce98b48 RRC, MAC changes to enable RFSIM testing of feature transform precoding.
- Enable -Z option to test Transform precoding on ULSIM.
- Set msg3_transformPrecoder to 0 in uplinkcommonconfig params in conf file to test on RFSIM.
2020-12-21 16:10:27 +02:00
dir
a17f00784c NR_SC_FDMA changes
- CDM groups used, multiple DMRS locations tested
- REMOVED compiler define NR_SC_FDMA
- enabled -Z option in ulsim for testing NR SC-FDMA
- Gnb UL Processing of LLRS even if last symbol allocated has no data
- transform precoding Enumerations used
2020-12-21 14:01:59 +02:00
dir
6b8ffb43c1 fix DFT bug identified by Laurent Thomas 2020-12-21 14:01:59 +02:00
He Shanyun
c6cd8f3731 fix build error of phy_sim 2020-12-21 08:05:24 +00:00
yaojie
d5696baf71 Fix merge conflict 2020-12-21 12:25:36 +09:00
rmagueta
0f3629ae92 Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into develop-sib1
 Conflicts:
	openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
2020-12-18 13:43:48 +00:00
Remi Hardy
d23a7e83f6 Integration 2020 wk51 2
MR991: Remove hack in LTE PDCP for noS1 mode  
- Removes a hack which was used when LTE PDCP was used for NR in noS1 mode

MR993: UL and DL fixes LDPC short codewords 
- Fix UL & DL LDPC decoding for short LDPC code, e.g. Z_c is not multiple of 8
- Fix DLSCH data transmission with multiple DMRS symbols per slot
- small TA fixes on OAI 5G NR UE
- Implemented CQI measurement at NR UE
- NR UE cleanup 

MR1000: doc: fix build directory in BASIC_SIM.md
2020-12-18 12:06:35 +01:00
Wu.Jing
37d52bdf60 Merge branch 'develop_SA_SIM' into develop_SA_L3
Conflicts:
	openair2/RRC/NR/nr_rrc_proto.h
	openair2/RRC/NR/rrc_gNB.c
	openair2/RRC/NR_UE/rrc_UE.c
	openair2/RRC/NR_UE/rrc_defs.h
	openair3/NGAP/ngap_gNB_nas_procedures.c
2020-12-18 17:38:07 +09:00
Wu.Jing
19118c13d1 Merge branch 'master' into develop_SA_L3 2020-12-18 11:52:59 +09:00
Xue Song
a53d6795c8 fix some errors about rrcReestablishment 2020-12-17 12:21:06 +09:00
rmagueta
dc4dd10d1a RA BWP fix at UE 2020-12-16 18:02:24 +00:00
hardy
fb14836f0d Merge remote-tracking branch 'origin/minor-fix-doc-basic-sim' into integration_2020_wk51_2 2020-12-16 11:10:05 +01:00
hardy
69cc0767c0 Merge remote-tracking branch 'origin/ldpc_short_codeword_fixes' into integration_2020_wk51_2 2020-12-16 11:09:56 +01:00
hardy
4d76288211 Merge remote-tracking branch 'origin/remove_nos1_hack_pdcp' into integration_2020_wk51_2 2020-12-16 11:09:31 +01:00
Thomas Schlichter
4626d507bd NR UE: fix compile error with UE_TIMING_TRACE enabled 2020-12-15 11:17:24 +01:00
masayuki.harada
50146dec06 Merge remote-tracking branch 'remotes/oai/develop' into lte_uplink_improvement
# Conflicts:
#	openair1/SCHED/phy_procedures_lte_eNb.c
#	openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
2020-12-15 19:01:43 +09:00
masayuki.harada
b125b93e9e Fix log and minor bugs. 2020-12-15 18:19:22 +09:00
Remi Hardy
e37c844b17 Integration 2020 wk51
MR960: 256 QAM demodulation routines  
- Added functions for demodulation of 256 QAM signals.
- Added a command line flag to enable mcs table entry in PDSCH-Config in RRC to use 2nd MCS table for PDSCH.
- Added an option for using 256 QAM mcs table in nr_dlsim.

MR989: Docker and Deployment improvements (CI)  
- Image generation for eNB --> template for configuration files and dedicated entrypoint in Ubuntu
- Docker-compose-based EPC deploy
- Traffic test fully validated using the `trf-gen` container
- Flexran-rtc support when deployed in a container (Not fully done for the X2 Handover part)
- Added docker-compose-based eNB deployment
- Retrieve logs for such eNB deploymnent 
- Functional and log  update of nsa fr1 test but valid for gNB terminate also (enhanced ping stats and gNB markers)

MR992: Fix data transmission in "do-ra" mode
- UL and DL Traffic works now in do-ra mode, but there are still some PUCCH issues remaining. These issues are harming the acknowledgement of DL packets, and thus leading to unnecessary retransmissions.
The relevant warnings at UE are:
`PUCCH Invalid pucch resource indicator: at line 1082 in function select_pucch_resource of file openair1/SCHED_NR_UE/pucch_uci_ue_nr.c`
and
`PUCCH Error for number of bits for acknowledgment : at line 909 in function get_downlink_ack of file openair1/SCHED_NR_UE/pucch_uci_ue_nr.c`
Note: UE needs rbconfig.raw and reconfig.raw files from the *currently* running gNB, as the C-RNTI is random and different for each run.
2020-12-15 09:41:05 +01:00
yaojie
96cf622e9e fix errors and add RRCReestablishmentComplete of UE 2020-12-15 14:23:39 +09:00
Raphael Defosseux
88ac8ec267 CI: fix auto-terminate methods
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-12-14 17:16:37 +01:00
hardy
02bb4ac913 Merge remote-tracking branch 'origin/fix_do_ra_data' into integration_2020_wk51 2020-12-14 13:33:38 +01:00
hardy
4e0e95aa49 Merge remote-tracking branch 'origin/ci-deploy-docker-compose' into integration_2020_wk51 2020-12-14 13:33:05 +01:00
hardy
3bccd95755 Merge remote-tracking branch 'origin/256_QAM_demod' into integration_2020_wk51 2020-12-14 13:32:29 +01:00
Thomas Schlichter
fda514b3ba rfsimulator: do not show "gap in reception" messages if complete slots are skipped (e.g. NR DL: gNB transmission, UE reception) 2020-12-14 12:06:11 +01:00
Thomas Schlichter
f905b29364 NR UE: decrease number of LOG_I() logging messages 2020-12-14 12:06:11 +01:00
Thomas Schlichter
5e0e07b6e2 NR UE: do not hardcode the UL harq_pid to 0 in phy_procedures_nrUE_TX() 2020-12-14 12:06:11 +01:00
Thomas Schlichter
a269ad840a NR UE: modify nr_gold_pdsch() to only generate gold sequence for current slot 2020-12-14 12:06:11 +01:00
Remi Hardy
ff21934860 adding more ping statistics 2020-12-14 11:55:03 +01:00
Xue Song
40e3c0ce95 modify rrcReestablishmentRequest 2020-12-14 18:50:12 +09:00
Francesco Mani
9fae23b625 quick fix for nb of rb allocated in phytest for ul 2020-12-11 18:14:06 +01:00
Cedric Roux
42dca06ae0 doc: fix build directory in BASIC_SIM.md 2020-12-11 11:11:27 +01:00
yaojie
7fa06a3a2b Add RRCReestablishment 2020-12-11 17:31:06 +09:00
He Shanyun
65bad0f5a8 fix cppcheck warning 2020-12-11 16:42:58 +09:00
He Shanyun
8c9753ca3c fix issue about error locking mutex_rxtx of L2 sim 2020-12-11 16:28:03 +09:00
Xue Song
9dce92eafe implement rrcReestablishmentRequest 2020-12-11 14:59:34 +09:00
He Shanyun
ec48bb8913 implement rrcReestablishmentComplete 2020-12-11 09:54:43 +09:00
rmagueta
58d2aafb5f Minor updates in documentation 2020-12-10 17:24:56 +00:00
rmagueta
06cb91d795 Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into develop-sib1
 Conflicts:
	openair2/LAYER2/NR_MAC_UE/mac_defs.h
	openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
	openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
2020-12-10 16:24:28 +00:00
rmagueta
205d98bdb9 Fix for TBS = 84 2020-12-10 16:13:42 +00:00
Francesco Mani
30dc2e094d Merge remote-tracking branch 'origin/develop' into NR_FR2_RA 2020-12-10 16:00:36 +01:00
Thomas Schlichter
ac73df698d Merge branch 'develop' into 'fix_do_ra_data'
# Conflicts:
#   openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
#   openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
2020-12-10 13:40:08 +01:00
Remi Hardy
b9b2f28911 Integration 2020 wk50
MR969: Develop oriecpriupdates  
Makes IF5 functionality compatible with ECPRI user-plane. 
Control-plane functionality for supporting third-party RRUs : provides an interface converting OAI-native RF parameters, a subset of LTE framing parameters, and RF streaming activation/deactivation to a wrapper (libthirdparty_transpro.so) which uses the proprietary interface of the RRU. 
This branch was tested with a commercial eCPRI RRU from AW2S.

MR980: Nr ul scheduler basis 
- cleanup of UL scheduler, and add interface preprocessor-postprocessor (in `NR_UE_sched_ctrl_t`)
- Postprocessor can (almost) handle multiple UEs. Preprocessor will follow soon (proportional fair scheduler)
- Preprocessor for phytest (always schedule 50 RBs due to OAI UE limitations) and real UE (as many resources as possible)
- Internal structures have been updated: the `UL_tti_req` structure became an array (as `UL_tti_req_ahead`) so that we can schedule in advance and mark resources as used. Before, we would keep the corresponding nfapi message structure per UE, which could get messy when we have many UEs.

There are no functional changes (UL/DL performance is the same). 

MR987: Nr phy mac if multi ue  
- Handles multiple UEs in `NR_IF_interface.c`
- Some minor clean up

MR979: Pusch decoder threads parameter  
- Added a config file parameter for specifying the number of threads to be used for PUSCH decoding.

MR982: nr pdcp: use pdcp config
-There was a problem with SN size. It was hardcoded to 12 bits (so max sn = 4095) but we configure the UE with 18 bits. 
Get the correct value from pdcp_Config.
- Store also discard_timer and t_reordering that will be used later by a proper NR PDCP layer 

MR984: NR FR2 SSB
- several fixes mainly concerning FR2 synchronization and RA both at gNB and UE
- SSB RRC signaling for FR2
- Coreset RRC for FR2
- SSB detection in FR2 for SSB index > 15
- Adjust sync function issue
- Fix for scheduling of MSG2 (issue with sl_ahead)
2020-12-10 13:22:12 +01:00
masayuki.harada
519ab68b21 Fix some merge miss. 2020-12-10 20:27:55 +09:00
Francesco Mani
ee54e20ed9 change assertion to error if no CCE is found 2020-12-10 10:30:23 +01:00
Francesco Mani
06d7664167 schedule 2nd DL slot in 3 instead of 2 2020-12-10 09:51:23 +01:00
rmagueta
8380136c3a SIB1 with dmrs-AdditionalPosition = pos2 2020-12-10 01:12:03 +00:00
Raphael Defosseux
22e90c7aa7 [CI] fix on the thark capture port number for S1AP
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-12-09 17:17:42 +01:00
Remi Hardy
a5475d3051 updating nsa fr1 test files 2020-12-09 16:29:41 +01:00
rmagueta
4eed33b082 Added documentation. Minor source code format fixes. 2020-12-09 14:59:55 +00:00
Francesco Mani
7a2786c323 Merge remote-tracking branch 'origin/develop' into NR_FR2_RA 2020-12-09 14:30:01 +01:00
Francesco Mani
f9e00c5168 bugfix in msg3 freq allocation at UE 2020-12-09 14:24:55 +01:00
Remi Hardy
98fd8279bf Merge remote-tracking branch 'origin/develop-oriecpriupdates' into rh_wk50_debug 2020-12-09 14:16:19 +01:00
Remi Hardy
3d8be663a0 Merge remote-tracking branch 'origin/NR_FR2_RRC_SSB' into rh_wk50_debug
Conflicts:
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
2020-12-09 13:16:41 +01:00
Remi Hardy
e9cf51f58d Merge remote-tracking branch 'origin/bugfix-nr-pdcp-sn-size' into rh_wk50_debug 2020-12-09 13:11:02 +01:00
Thomas Schlichter
4f98a626ce warning fixes 2020-12-09 11:40:00 +01:00
Francesco Mani
3bae6a046d workaround for UE to transmit msg3 2020-12-09 10:46:19 +01:00
Remi Hardy
68009c1cf7 [CI]: add missing PUSCH threads configuration for the CI-used gNB conf 2020-12-09 10:04:24 +01:00
Remi Hardy
ff0a2ca97c removing external sync clock 2020-12-09 10:00:19 +01:00
Remi Hardy
bc43ecd17f fix variable name after merge of MR980 and MR987 2020-12-09 09:55:50 +01:00
Remi Hardy
4a66c750ec Merge remote-tracking branch 'origin/pusch-mthread-scaling-fix' into rh_wk50_debug 2020-12-09 09:49:48 +01:00
Remi Hardy
ec94adaef5 Merge remote-tracking branch 'origin/NR-PHY-MAC-IF-multi-UE' into rh_wk50_debug 2020-12-09 09:48:40 +01:00
Remi Hardy
c04a2ff497 Merge remote-tracking branch 'origin/NR_UL_scheduler' into rh_wk50_debug 2020-12-09 09:47:16 +01:00
Remi Hardy
39d1774a11 fixing dependency issue for gNB build 2020-12-09 09:45:10 +01:00
Thomas Schlichter
1b2c8b3c56 Merge remote-tracking branch 'origin/develop' 2020-12-09 09:39:44 +01:00
cig
440e820f6d Moved code for timing alignment procedures to PHY UE procedures
- new function called ue_ta_procedures
- this makes the code more easier to read
- small cleanup was also done
2020-12-09 09:35:41 +01:00
cig
da9dde5bb7 Replaced redundant code for BW scaling computation
- using the get_bw_scaling function
- made it generic for DL/UL computations
2020-12-09 09:35:41 +01:00
cig
427d2d3977 Cleanup nr-uesoftmodem
- moved configuration of UE parameters to set_options function
- removed redundant loop over CCs
2020-12-09 09:35:41 +01:00
cig
f833d1d9c7 Debug code for USRP Noise Figure in nr_ue_rrc_measurements 2020-12-09 09:35:41 +01:00
cig
fb4248fe40 Cleanup and fixes definitions measurements structs gNB and UE
- set the proper platform variables definitions
- cleaned up commented out code
2020-12-09 09:35:41 +01:00
cig
52cb041693 Updated usage of channel model simulation in RFSIM 2020-12-09 09:35:41 +01:00
cig
3986d5764d Implemented CQI measurement at NR UE
- fixes for nr_ue_measurement function
- Introduced nr_rrc_measurement function
- removed unused params
- replaced hardcoded params
- code cleanup

temp
2020-12-09 09:35:40 +01:00
cig
5d16593b6b NR UE Code cleanup
- removed long time commented-out and unused code
- minor logging fixes
2020-12-09 09:35:40 +01:00
Thomas Schlichter
18bf5b5522 CI: add automatic tests for multiple DMRS positions to nr_dlsim 2020-12-09 09:08:43 +01:00
masayuki.harada
1de8776c43 Fix compile error 2020-12-09 13:59:49 +09:00
Hongzhi Wang
1bd84bf1fd update nr ue gold to simplified version 2020-12-08 16:02:04 +01:00
Rahul Gottipati
243190c038 Revert AMP_SHIFT value 2020-12-08 19:47:57 +05:30
Francesco Mani
e7edc37b5d k2 for msg3 in fr2 2020-12-08 15:03:08 +01:00
Francesco Mani
711a997fdb dynamic allocation of dl gold sequences at ue 2020-12-08 15:02:19 +01:00
Raphael Defosseux
268aa87c81 [CI] fix typo and few tunings
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-12-08 12:37:38 +01:00
He Shanyun
547d7b01b8 change the sleep location for the ittisim 2020-12-08 17:13:09 +09:00
frtabu
4338d5365b cancel thread pool modif 2020-12-07 23:46:14 +01:00
rmagueta
4be7f10efe nr_rrc_ue_decode_NR_SIB1_Message call was deleted from the PHY. It was used the UE FAPI interface to signal this to the MAC, who was send it to the RRC. 2020-12-07 19:30:45 +00:00
Raphael Defosseux
adb29da804 [CI] python code clean
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-12-07 17:50:50 +01:00
rmagueta
da77bf33b9 Fix for DMRS symbol without data 2020-12-07 16:36:50 +00:00
rmagueta
62d481f316 nr_dlsim and nr_ulsim segmentation fault issue solved 2020-12-07 12:25:23 +00:00
masayuki.harada
0555b108db Merge remote-tracking branch 'remotes/oai/develop' into lte_uplink_improvement 2020-12-07 21:17:59 +09:00
masayuki.harada
b0f5a37fba Fix indentation, merge miss and remove unnecessary comment. 2020-12-07 20:08:03 +09:00
frtabu
6d168eca61 Merge branch 'cleanup_softmodem_main' of https://gitlab.eurecom.fr/oai/openairinterface5g into cleanup_softmodem_main 2020-12-07 10:41:34 +01:00
frtabu
81da4ffce3 remove threadoffset option, doesn't seem to be defined in the develop code?? 2020-12-07 10:39:08 +01:00
Francesco Mani
50b629c6c2 fix for nb of slots in ue gold 2020-12-07 10:27:12 +01:00
frtabu
e97edafd3f remove threadoffset option, doesn't seem to be defined in the develop code?? 2020-12-07 01:02:23 +01:00
Francesco Mani
756c20c009 tentative fix for delayed RA procedure at UE 2020-12-04 16:49:19 +01:00
Francesco Mani
29a56fe527 tentative fix for delayed RA procedure at UE 2020-12-04 16:21:45 +01:00
Sakthivel Velumani
e5cd573ecb Added a local variable instead of global 2020-12-04 15:10:58 +01:00
hardy
bfeae0a0a4 fixing RA test iteration when failing 2020-12-04 13:05:42 +01:00
Robert Schmidt
13f0571a65 Fix log message: add newline, format 2020-12-04 11:07:18 +01:00
Robert Schmidt
3ae4744679 Single definition and declaration of nr_slots_per_frame 2020-12-04 11:07:18 +01:00
Robert Schmidt
1d7065c29c Remove DLSCH_pdu as it is not needed anymore 2020-12-04 11:07:18 +01:00
Robert Schmidt
89fc1e6e54 handle_nr_ulsch() for multiple UEs 2020-12-04 11:07:18 +01:00
Raphael Defosseux
a371f5580e Merge branch 'ci-deploy-docker-compose' of gitlab.eurecom.fr:oai/openairinterface5g into ci-deploy-docker-compose 2020-12-04 10:09:31 +01:00
Raphael Defosseux
e0731d54a0 Merge remote-tracking branch 'origin/develop' into ci-deploy-docker-compose 2020-12-04 10:08:40 +01:00
Remi Hardy
97249354c3 Update BUILD.md 2020-12-04 10:08:37 +01:00
Robert Schmidt
35e723d090 handle_nr_uci() for multiple UEs 2020-12-04 09:41:34 +01:00
Robert Schmidt
d9c7243ac1 Remove LTE/FlexRAN-related headers from NR MAC 2020-12-04 09:41:34 +01:00
Robert Schmidt
c71772e325 Remove LTE-related headers from NR PHY-MAC IF 2020-12-04 09:41:34 +01:00
frtabu
fdc1049a70 Fix phy simulators compilation, number of threads for dlsch configurable 2020-12-03 23:22:07 +01:00
Remi Hardy
9ea7df9210 func + log update of fr1 nsa test 2020-12-03 22:12:54 +01:00
Raphael Defosseux
ef49960a8a [CI][Docker] able to deploy/undeploy a monolithic eNB with a compose file:
-- The compose file still keeps a few template fields to be replaced
  -- initial scenario has a full UE attach / traffic test

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-12-03 18:40:05 +01:00
Cedric Roux
d262d152ec rlc v2: implement SOstart/SOend in NACK reporting
The necessity of SOstart/SOend was understood after email exchanges with
David Breaux <davidbreaux67@gmail.com>.

See openair2/LAYER2/rlc_v2/tests/test46.h for some details.

Basically if we NACK without SOstart/SOend then the other end of the RLC
channel will consider all the bytes as NACKed and will have to resend them
all. If another status is then reported before all the bytes are sent,
and because we don't use SOstart/SOend this status will NACK all the bytes
again, then all the bytes are to be sent again. And the cycle repeats.
It will end with a max retx reached (which triggers RLF, Radio Link Failure).

The function put_bit in openair2/LAYER2/rlc_v2/rlc_pdu.c has been changed
too, maybe introducing some performance issues.
2020-12-03 16:17:24 +01:00
matzakos
d64bc67b0c Add TDD configuration in ENDC X2 setup response message sent from eNB 2020-12-03 15:39:30 +01:00
Raymond Knopp
4f57de4e53 added example configuration for if5 eCPRI for AW2S RRU (with X2) 2020-12-03 15:00:36 +01:00
Raphael Defosseux
87b03d0000 [CI] moved image build into a separate class
also first docker-compose for a monolithic eNB

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-12-03 10:01:21 +01:00
Robert Schmidt
589ff862dc Improve retransmission messages in UL&DL 2020-12-03 09:52:41 +01:00
Robert Schmidt
f821a333d7 Fix nr_dlsim: remove current_harq_pid, selected in DL scheduler 2020-12-03 09:42:22 +01:00
matzakos
103fc806b3 Remove hack in LTE PDCP for noS1 mode 2020-12-03 00:31:23 +01:00
Robert Schmidt
5bb9a57ae9 Update SW_archi.md description 2020-12-02 18:42:47 +01:00
rmagueta
61a0e4f7b2 Fix creation of rbconfig.raw and reconfig.raw files in standalone mode 2020-12-02 17:28:02 +00:00
Robert Schmidt
12c6cd4481 Remove unused variable 2020-12-02 18:08:51 +01:00
Robert Schmidt
c110ad7dc6 Take out DL phytest slot limitation 2020-12-02 18:08:51 +01:00
Robert Schmidt
ec10d48b24 Reformat schedule_nr_prach() 2020-12-02 18:08:51 +01:00
Robert Schmidt
0e936a09ba Remove current_harq_pid: it is not needed 2020-12-02 18:08:51 +01:00
Robert Schmidt
3a37202beb Remove current_slot: it is not needed 2020-12-02 18:08:51 +01:00
Robert Schmidt
e99d3635db ULSCH: warn when retransmission, basic debug logging 2020-12-02 18:08:51 +01:00
Robert Schmidt
0c730d7aa1 Mark PRACH in vrb_map_UL 2020-12-02 18:08:51 +01:00
Robert Schmidt
70c3915d81 Schedule PRACH (internally) one frame in advance 2020-12-02 18:08:51 +01:00
Robert Schmidt
7a7c1bcc98 Calculate TBS in pre-processor and use the results in post-proc 2020-12-02 18:08:51 +01:00
Robert Schmidt
d8cecde925 Recalculate PUSCH saved params struct in Pre-processor 2020-12-02 18:08:51 +01:00
Robert Schmidt
8cb2317915 Create PUSCH saved params struct to avoid recomputation 2020-12-02 18:08:51 +01:00
Robert Schmidt
0d860454b0 ULSCH: Reorganize PUSCH PDU filling 2020-12-02 18:08:51 +01:00
Robert Schmidt
5762c943db Isolate TBS calculation in ULSCH, calculate some statistics 2020-12-02 18:08:51 +01:00
Robert Schmidt
644c364a4a Isolate DMRS N_PRB_DMRS in ULSCH 2020-12-02 18:08:51 +01:00
Robert Schmidt
fc0f0cd7e7 Isolate DMRS ul_dmrs_symb_pos and dmrs_cdm_grps_no_data in ULSCH 2020-12-02 18:08:51 +01:00
Robert Schmidt
85843b3e0e Isolate DMRS additional_pos, l_prime_mask in ULSCH 2020-12-02 18:08:51 +01:00
Robert Schmidt
0d2435460c Isolate DMRS config type in ULSCH 2020-12-02 18:08:51 +01:00
Robert Schmidt
c821dd0c94 Do not check for UE active state before ULSCH and DLSCH scheduler 2020-12-02 18:08:51 +01:00
Robert Schmidt
e4bbde77ef Isolate R&Qm in ULSCH 2020-12-02 18:08:51 +01:00
Robert Schmidt
a5cb42e773 Use variable sched_pusch 2020-12-02 18:08:51 +01:00
Robert Schmidt
f1a6a7e7a5 Isolate mcs_table in ULSCH 2020-12-02 18:08:51 +01:00
Robert Schmidt
a200beb585 Isolate HARQ in ULSCH 2020-12-02 18:08:51 +01:00
Robert Schmidt
b20954f6c0 Isolate TDA in ULSCH 2020-12-02 18:08:51 +01:00
Robert Schmidt
2599c68fa8 Isolate transform_precoding in ULSCH 2020-12-02 18:08:51 +01:00
Robert Schmidt
2958689fa4 config_uldci(): no rnti_types 2020-12-02 18:08:51 +01:00
Robert Schmidt
6df6cb9c9c UL_tti_req as pointer over multiple CCs 2020-12-02 18:08:51 +01:00
Robert Schmidt
0affd907b5 No dynamically alloced PUSCH, remove internal PDU 2020-12-02 18:08:51 +01:00
Robert Schmidt
a6a7c7a328 Move config_uldci() to primitives 2020-12-02 18:08:50 +01:00
Robert Schmidt
d2ac57088b Fix filling of DCI 0_0 in config_uldci() 2020-12-02 18:08:50 +01:00
Robert Schmidt
9ca626b37a Avoid copy from UL_tti_req_ahead into Ul_tti_req 2020-12-02 18:08:50 +01:00
Robert Schmidt
c219edfed3 Fix dlsim: Use UL_tti_req_ahead 2020-12-02 18:08:50 +01:00
Robert Schmidt
e6435cf7a2 Create separate phytest UL preprocessor 2020-12-02 18:08:50 +01:00
Robert Schmidt
cfc6044a6e Use function pointer to call UL pre-processor 2020-12-02 18:08:50 +01:00
Robert Schmidt
9ccc76474a PUCCH scheduling: allocate in UL_tti_req_ahead 2020-12-02 18:08:50 +01:00
Robert Schmidt
b202ab7d3d RA Msg3 allocation: check in vrb_map_UL, allocate in UL_tti_req_ahead 2020-12-02 18:08:50 +01:00
Robert Schmidt
e300b072c0 Use vrb_map_UL for PUSCH 2020-12-02 18:08:50 +01:00
Robert Schmidt
a232482b47 vrb_map_UL for every slot 2020-12-02 18:08:50 +01:00
Robert Schmidt
2b1a01c012 UL Post-processor: enable multi-UE handling 2020-12-02 18:08:50 +01:00
Robert Schmidt
327e3e706d Perform UL slot check in pre-processor 2020-12-02 18:08:50 +01:00
Robert Schmidt
2e53fdea9c Rename NR_sched_pusch_t and use for Freq Alloc + MCS 2020-12-02 18:08:50 +01:00
Robert Schmidt
ee6cdc1359 Create UL preprocessor, allocate CCE, re-use DL structures 2020-12-02 18:08:50 +01:00
Robert Schmidt
415a843ac4 Add active_ubwp to NR_UE_sched_ctrl_t 2020-12-02 18:08:50 +01:00
Robert Schmidt
3eceba5062 Use UE's active DL BWP in UL sched 2020-12-02 18:08:50 +01:00
Robert Schmidt
f3b00ff144 UL_tti_req_ahead: pre-set slot and frame 2020-12-02 18:08:50 +01:00
Robert Schmidt
f45e8bbe0e UL_tti_req_ahead: Create PUSCH PDU directly within nr_fill_nfapi_ul_pdu()
Use a "future" UL_tti_req structure to save in between scheduling and
reception slots. Should also work for FDD.
2020-12-02 18:08:50 +01:00
rmagueta
104b8ab21a Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into develop-sib1 2020-12-02 16:28:38 +00:00
rmagueta
f4b20822d4 Fix build warnings 2020-12-02 16:27:20 +00:00
Hongzhi Wang
aa3317a009 set less dlsch thread by default 2020-12-02 11:36:57 +01:00
Raphael Defosseux
68e193c6cc [DOCKER] finalize RRU templates
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-12-02 11:25:06 +01:00
Robert Schmidt
ee9268feee Remove second clear_nr_nfapi_information call 2020-12-01 19:36:50 +01:00
Robert Schmidt
1cd46f4dfc Clean up nr_schedule_ulsch() 2020-12-01 19:36:50 +01:00
Robert Schmidt
c0e5a180bc Separate CCE allocation, MCS, RB Alloc in UL sched 2020-12-01 19:36:50 +01:00
Robert Schmidt
5244da263e Clean up select_ul_harq_pid() and nr_schedule_ulsch() 2020-12-01 19:36:50 +01:00
Robert Schmidt
53d8fbf487 Remove schedule_fapi_ul_pdu() 2020-12-01 19:36:50 +01:00
Robert Schmidt
c8e607a18c Create separate nr_schedule_ulsch(), move helper functions 2020-12-01 19:36:50 +01:00
Robert Schmidt
2481075122 Add debug output for nr_rate_matching_ldpc() asserts 2020-12-01 19:36:50 +01:00
Robert Schmidt
75a1562d7f Remove unused (commented) copy_nr_ulreq() 2020-12-01 19:36:50 +01:00
Remi Hardy
dfb110bf80 Integration 2020 wk49
MR968: Bugfix nr ldpc size typo
- fix the copy of the decoded data bytes at the end of the processing of an LDPC segment 
 
MR962: Remove x2 gnb hardcoding
- Removes hardcoding of some x2 configuration parameters used in ENDC setup request message at gNB side  

MR949: rlc v2: change time keeping
- RLC has timers. We need to keep track of time. 
We introduce rlc_tick() and call it in eNB_dlsch_ulsch_scheduler, which is called every subframe, both in FDD and TDD.
2020-12-01 19:35:15 +01:00
Raymond Knopp
d9b7d43ec6 rebase and fix non paralellized errors 2020-12-01 18:26:07 +01:00
Francesco Mani
ecdd7a7f62 taking aggregation level and nr of candidates from config at ue 2020-12-01 16:19:59 +01:00
cig
05d4b9205b Do configuration of DRB UM in RA mode
- do DRB preconfiguration for deafult C-RNTI if !do_ra
- moved redundant configuration code at RLC layer to new RLC functions
2020-12-01 15:10:04 +01:00
cig
76a2a7559c Removed exit call in PDCP PDU handling functions 2020-12-01 15:10:04 +01:00
cig
1a78bd8b1a Replaced information message with assertion in nr_l2_init_ue 2020-12-01 15:10:04 +01:00
cig
8f7b041d7c Cleanup of hardcoded C-RNTI
- Giving C-RNTI as an input to DRB preconfiguration
- Set C-RNTI from UE configuration for higher layer function calls
2020-12-01 15:10:04 +01:00
cig
33bab5ba4a Changes to support DL IP traffic and timing adjustments in do-ra mode:
- enabled procedures that were already called for phy-test mode
- enabled setup of DRB for the current C-RNTI
- enhanced information, debugging and warning logging at MAC/RLC/PDCP level
2020-12-01 15:09:57 +01:00
Raphael Defosseux
2d6fea51b3 Merge remote-tracking branch 'origin/oc-docker-october-improvements' into ci-deploy-docker-compose 2020-12-01 10:09:02 +01:00
yaojie
dfba9dd767 add temporary data for PDUSessionResourceReleaseResponseTransfer 2020-12-01 17:30:47 +09:00
Raphael Defosseux
b29b88380c [CI]: flexran-rtc support when deployed in a container.
-- Not completed for X2 Handover case

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-11-30 22:27:15 +01:00
rmagueta
c8dfaf8eb9 Improvements to decode SIB1 in 3rd party implementations and OAI UE with the same gNB configurations 2020-11-30 19:11:01 +00:00
hardy
92b8b12208 OAI UE Build : use --ninja and change timeout to 1200 2020-11-30 14:04:53 +01:00
rmagueta
46de16b6e1 Minor updates in LOGs 2020-11-30 12:26:12 +00:00
Francesco Mani
1acf4a68f2 mib ssb in mac structure, prach scheduled accordingly 2020-11-30 12:56:10 +01:00
Sakthivel Velumani
24bf54b2af fixed one more build error 2020-11-30 11:44:31 +01:00
zhenghuangkun
88699deb81 Merge branch fujitsu_lte_contribution into lte_uplink_improvement 2020-11-30 18:56:26 +09:00
hardy
923c5f9d31 Merge remote-tracking branch 'origin/rlc-v2-tick' into integration_2020_wk49 2020-11-30 10:35:24 +01:00
hardy
279a721d23 Merge remote-tracking branch 'origin/remove_x2_gnb_hardcoding' into integration_2020_wk49 2020-11-30 10:34:52 +01:00
hardy
cfdd0b2220 Merge remote-tracking branch 'origin/bugfix-nr-ldpc-size-typo' into integration_2020_wk49 2020-11-30 10:34:27 +01:00
masayuki.harada
20f1d347ac Fix DCI0 aggregation and call ulsch scheduling. 2020-11-30 12:00:23 +09:00
Ding Yumei
a332423d97 fix segmentation fault(mac head error) 2020-11-30 11:30:58 +09:00
Ding Yumei
67da5c7cf3 fix segmentation fault(ccch/dcch length eror) 2020-11-30 11:30:46 +09:00
Ding Yumei
0dd16fb6f5 fix segmentation fault(ul error) 2020-11-30 11:30:32 +09:00
Ding Yumei
1568055310 fix segmentation fault(ul dtch length error) 2020-11-30 11:30:18 +09:00
zhenghuangkun
e64593246b Fix: rfsim abnormal CCCH reception. 2020-11-30 11:29:58 +09:00
zhenghuangkun
6d0ef37c8e Modify DRB_active array size to NB_RB_MAX -2 2020-11-30 11:13:53 +09:00
Haruki NAOI
5db6e75bb1 fix warning. 2020-11-30 11:12:45 +09:00
Haruki NAOI
18becc60fc Fix: rfsim abnormal CCCH reception. 2020-11-30 11:04:03 +09:00
Haruki NAOI
fc595236b3 add logs. 2020-11-30 10:55:39 +09:00
Haruki NAOI
1a320bc6d4 Fix: SNR feedback to PUSCH TPC and PUCCH TPC of default scheduler. 2020-11-30 10:55:19 +09:00
Haruki NAOI
de568b2d88 Change default value of pusch signal power threshold. 2020-11-30 10:45:50 +09:00
masayuki.harada
b54c32b70d Change UL DCI aggregation level by DL cqi.
(cherry picked from commit 175c59ae3aedf612777cd1c8c88b6d6f254b9334)
2020-11-30 10:45:34 +09:00
Cedric Roux
f36a1ef93f nr pdcp: use pdcp config
There was a problem with SN size. It was hardcoded to 12 bits (so max
sn = 4095) but we configure the UE with 18 bits. After a while, iperf
didn't work anymore because of this (what a surprise!).

So let's get the correct value from pdcp_Config.

And while we're at it, let's store also discard_timer and t_reordering
that will be used later by a proper NR PDCP layer (which is currently
work in progress).
2020-11-29 07:41:26 +01:00
Raphael Defosseux
329a823d5d CI: fix image build log collection
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-11-28 22:40:29 +01:00
Raphael Defosseux
858a1dc090 [DOCKER] remove log folder (contains the install logs)
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-11-28 22:35:47 +01:00
Raphael Defosseux
4639a59a51 [CI][Docker]: Finalize docker-compose-based EPC deployment
- Fix pcap capture commands
  - added support for FlexRan-RTC and Traffic-Generator

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-11-28 21:24:10 +01:00
rmagueta
548015929e Minor correction 2020-11-28 01:49:00 +00:00
rmagueta
a365bde8da Minor correction: y cannot be zero 2020-11-28 01:32:31 +00:00
rmagueta
a3b633d26c Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into develop-sib1
 Conflicts:
	openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
	openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
2020-11-27 17:37:15 +00:00
Hongzhi Wang
9ef0107a6e bug fix ue parallelization 2020-11-27 17:46:07 +01:00
frtabu
0dcf4ef8f8 remove L2L1 task, parallelisation as config option 2020-11-27 17:37:45 +01:00
Rahul Gottipati
9ec1bea7b2 Add option for 256 qam mcs table in nr_dlsim 2020-11-27 20:41:27 +05:30
Khodr Saaifan
1488750db1 Fix LDPC ULSCH decoding (CRC NOK) for short LDPC code, e.g. Z_c is not multiple of 8 2020-11-27 15:56:15 +01:00
Parminder Singh
334bf336b7 Updated TBS calculation for multiple DMRS positions in a slot
- TBS calculation was done wothout considering mulilple DMRS symbols in
  a slot, which is corrected now.
2020-11-27 15:56:15 +01:00
Thomas Schlichter
d7d2faa0bf fix cppcheck warning in rrc_gNB_internode.c 2020-11-27 15:56:15 +01:00
Thomas Schlichter
fe89c40052 NR UE: initialize ul_time_alignment structure 2020-11-27 15:56:14 +01:00
Thomas Schlichter
010321e582 NR UE: fix USRP write timestamp when applying new timing_advance value 2020-11-27 15:56:14 +01:00
Raphael Defosseux
6aa126485f [CI][Docker] Building docker images in python framework
- only on Ubuntu and Docker
- No back ground computing to paralellize RHEL/Ubuntu
- No image clean up

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-11-27 15:53:55 +01:00
Khodr Saaifan
4b1d496923 Fix false CRC NOK in LDPC decoding for PDSCH for short code word, e.g. Z_c is not multiple of 8 2020-11-27 15:42:58 +01:00
yoshio.inoue
11000594a9 Correction of description 2020-11-27 22:56:39 +09:00
Sakthivel Velumani
437d893ee5 resolved build error 2020-11-27 14:48:11 +01:00
yoshio.inoue
420396e855 Add documentation on how to use the ITTI simulator 2020-11-27 22:46:18 +09:00
Francesco Mani
8a9e242856 Merge remote-tracking branch 'origin/develop' into NR_FR2_RRC_SSB 2020-11-27 11:33:52 +01:00
Rahul Gottipati
a7229204a9 Added 256 QAM demodulation routines for PDSCH 2020-11-27 14:58:41 +05:30
Robert Schmidt
ed0c12ba19 Avoid useless loop 2020-11-27 10:25:02 +01:00
Robert Schmidt
53b197fd16 Fix: when adding an MME through FlexRAN, set port 2020-11-27 10:25:02 +01:00
Haruki NAOI
39b9ffd69b Add DC removing to signal power measurement. 2020-11-27 17:27:00 +09:00
masayuki.harada
cb927c7f9a Add statistics logs.
(cherry picked from commit cf8f14edf4a261e1df72579423786d39ba6d97f9)
2020-11-27 17:06:11 +09:00
Haruki NAOI
7243b6d67a Avoid Segfault with abnormal MAC header.
(cherry picked from commit 04c5431468c9102dd625a73d9e5219b40b638fe3)
(cherry picked from commit 17880778c848406e562f98c20f7b7a6428502279)
(cherry picked from commit a26f44c197e854dd4261267a3695932392f09265)
2020-11-27 16:26:11 +09:00
Haruki NAOI
deeded689d Fix: guard multiple UL scheduling for same UE.
(cherry picked from commit 57caca9ba87fda3f73aa30d86f4af01a6062224c)
2020-11-27 15:24:26 +09:00
masayuki.harada
6c99c9a255 Fix receive pucch 1a and power adjustment of pucch.
(cherry picked from commit 6d5a40bd826de160ddf55599f61d1359cfba3fa4)
2020-11-27 15:24:07 +09:00
masayuki.harada
7eea980827 Fix sr detection.
(cherry picked from commit 5482843b9a9dfd25abe74afb04a40c117da3bac4)
2020-11-27 15:03:19 +09:00
masayuki.harada
1f54b131b5 Fix pucch functions.
(cherry picked from commit 3bed7dc69db8dc43b28b62553f12834efbca349b)
2020-11-27 14:54:10 +09:00
masayuki.harada
ad4a22fa0f Fix PUCCH noise estimation.
(cherry picked from commit 51634853671e07ef3013bc44ec79fc38c0646147)
2020-11-27 14:45:27 +09:00
masayuki.harada
174069e26e Fix calculation of pucch interference power.
(cherry picked from commit 0622f7d40523e39334708ce4b9b0ee68e8fb2bf1)
2020-11-27 14:33:41 +09:00
masayuki.harada
029c08b9d5 Replace from dB_fixed_times10 function to dB_fixed_x10.
(cherry picked from commit de93d8f0aa9e6d7380bd159901a41aa36f257298)
2020-11-27 14:21:22 +09:00
masayuki.harada
9ad810bab4 Fix ul_cqi and tpc filtering.
(cherry picked from commit 120ea0950e1f52c1c5dd1d0dd4f7080e66d7ee93)
2020-11-27 12:37:09 +09:00
masayuki.harada
fbd0156a8f Add pusch signal threshold to config file.
(cherry picked from commit 6f3d14e74663e75f2eaf3cd1c1348d5d028e3379)
2020-11-27 11:14:09 +09:00
Ding Yumei
548eaae610 fix Msg3 PHICH issue and C-RNTI DRB active issue 2020-11-27 11:12:31 +09:00
zhenghuangkun
df5e22efee Modify CQI timer to 64 subframe 2020-11-27 11:09:56 +09:00
zhenghuangkun
d00297aeb9 Modify UL timer and CQI timer to 64 subframe 2020-11-27 11:04:20 +09:00
Haruki NAOI
6103d9ec55 Fix: calculate signal_power and interference_power per symbol from DMRS. 2020-11-27 10:55:52 +09:00
Haruki NAOI
76998f7d75 Fix: signal_power and interference_power issue from DRS.
SHA-1: 9bb7664a234535b01518977440b3c4f3d14a8ee3
SHA-1: c299d006d833e8ffc6c01039feaeda2e7b1598cc
2020-11-27 10:55:36 +09:00
Kuroiwa Kenichi
80f83843f0 Initialize scheduled_ul_bytes
(cherry picked from commit 4a18e26f8c1dfb80a5af2fac4104b06b648a598c)
2020-11-27 10:55:16 +09:00
Haruki NAOI
7a89100a9f fix compilation. 2020-11-27 10:54:02 +09:00
Kuroiwa Kenichi
934cc715f8 Initialize scheduled_ul_bytes
(cherry picked from commit b0d6c5150db520bd7840d1604c3f82a0b59bc218)
2020-11-27 10:22:48 +09:00
masayuki.harada
4cce76382a Fix assertion in ulsch dem
(cherry picked from commit dcd188e961422194c9c85636ea7c74ca0cc5101d)
2020-11-27 10:10:06 +09:00
Haruki NAOI
179775b72c Temporary: change tpc filter.
(cherry picked from commit d82fc4805ef9032c9bfd9705fef702a6e130f7b2)

# Conflicts:
#	openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
2020-11-27 10:08:27 +09:00
Haruki NAOI
52dfba49cd Fix: smooth ULSCH AMC and TPC control.
(cherry picked from commit 56720c68864f6b04409deb00676e59a41c8f050b)
2020-11-27 10:07:56 +09:00
Haruki NAOI
b573fd4dbd Fix: The remaining UL buffer size is incorrectly calculated and UL scheduling does not occur. (scheduled_ul_bytes is not subtracted correctly when receiving NACK rarely.)
(cherry picked from commit 2fb4823b57320c4c4e4d800ae9bb0570f18ad353)
2020-11-27 09:44:39 +09:00
masayuki.harada
05eb88f068 Fix scheduled_ul_bytes size remain when no crc report has come from L1.
(cherry picked from commit ce10221c2761fb3058ccb77b73ba87f97d5e2cd2)
2020-11-27 09:41:56 +09:00
Raphael Defosseux
9af06d7ec5 [DOCKER] fix in dockerfile, cannot have comment in same line
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-11-26 20:31:36 +01:00
Raphael Defosseux
df33499980 [CI] Added support for docker-compose based deployment for EPC
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-11-26 18:38:38 +01:00
rmagueta
39ac342cfa Flag --sa added in the softmodem-common to indicate the standalone mode 2020-11-26 16:44:26 +00:00
rmagueta
2d5ad4d0b1 Minor updates in the SIB1 content 2020-11-26 16:05:07 +00:00
Raphael Defosseux
f3a6746042 Merge remote-tracking branch 'origin/ci-ul-iperf-from-trf-container' into rh_ci_fix_autoterminate 2020-11-26 12:04:08 +01:00
Raphael Defosseux
29618c5e7a CI: fix autoterminate with multiple servers
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-11-26 12:03:25 +01:00
Cedric Roux
6f9fe2681c rlc v2: add tick for UE 2020-11-26 11:53:22 +01:00
Cedric Roux
2c9d1b9d84 HACK: let the gNB compile again
This is messy, sorry. I don't have time to cleanup
cmake_targets/CMakeLists.txt.
2020-11-26 11:53:22 +01:00
Cedric Roux
25ab3a5ed3 rlc v2: change time keeping
RLC has timers. We need to keep track of time. We chose to not use
realtime but 'processing time'. That is we send a tick to RLC for every
subframe when it is processed by the softmodem. Before this commit we
used to increase time in the function mac_rlc_status_ind which may not be
called every subframe (especially in TDD mode). So we need another way
to keep track of time.

We introduce rlc_tick() and call it in eNB_dlsch_ulsch_scheduler, which
is called every subframe, both in FDD and TDD.

We also call rlc_tick() in the function ru_thread_synch() because
pdcp_run() and rrc_rx_tx() are called there too.

It may not be the best solution. To be revised if needed.

Note: the UE has not been touched. Some modification is needed for the UE
too, most probably.
2020-11-26 11:53:22 +01:00
Haruki NAOI
ffdc67daa4 Add: PUSCH AMC using average BLER.
(cherry picked from commit 1ab0a979fdbcc933ae249838841dc7f61c0e5aba)
2020-11-26 18:44:44 +09:00
Haruki NAOI
55207a5062 Fix: add SNR filter for ULSCH AMC. 2020-11-26 18:28:56 +09:00
Haruki NAOI
66f99a9020 Fix: ULSCH AMC by instantaneous SINR value. 2020-11-26 18:21:13 +09:00
Xue Song
ce3a97080a Modify RRCReconfiguration message 2020-11-26 18:19:59 +09:00
Haruki NAOI
1b61e10af6 fix compilation. 2020-11-26 18:07:21 +09:00
masayuki.harada
04d6de7d58 add variables TPC command interval and forgetting filter of UL SNR. 2020-11-26 18:04:14 +09:00
Haruki NAOI
dbb8a8924e Fix: TPC control with average SNR value.
(cherry picked from commit 243c90f647a1f97dc3a1486502dc6263b5705e39)
2020-11-26 17:57:41 +09:00
Haruki NAOI
2edcf2647c Fix: freq_offset_estimation overflow.
(cherry picked from commit 5e7eb7c94857f5765bb7f18afc7f4c748acb048b)
2020-11-26 17:43:06 +09:00
Haruki NAOI
ce405789d3 Fix: interference power measurement on DRS. 2020-11-26 17:38:56 +09:00
yaojie
59c2b9eb06 fixed warnings and add ie for PDUSessionResourceReleaseCommandTransfer 2020-11-26 15:56:39 +09:00
rmagueta
81d64b3dec Minor corrections 2020-11-26 03:12:59 +00:00
rmagueta
9bbe4f7cd8 Minor corrections 2020-11-25 22:21:24 +00:00
rmagueta
1d8a61f9e5 Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into develop-sib1
 Conflicts:
	openair1/PHY/NR_TRANSPORT/nr_dlsch.c
	openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
	openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
	openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
	openair2/RRC/NR/L2_nr_interface.c
	openair2/RRC/NR_UE/rrc_UE.c
	openair2/RRC/NR_UE/rrc_defs.h
2020-11-25 18:17:39 +00:00
Francesco Mani
ba40f3c758 fix in sync position at UE and other minor issues 2020-11-25 18:11:33 +01:00
rmagueta
e9109ee9e1 New folder for gNB NR-5GC config files 2020-11-25 16:16:54 +00:00
rmagueta
301fd47406 SIB1: Added more parameters to the message 2020-11-25 16:08:57 +00:00
Sakthivel Velumani
f9c3ff3ca3 Updated the config files 2020-11-25 11:12:32 +01:00
Xue Song
6e2f63bf1f Add rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND and rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE 2020-11-25 18:55:59 +09:00
yaojie
7034159e8e add sleep between RRCReconfigurationComplete and RegistrationComplete 2020-11-25 10:52:06 +09:00
Sakthivel Velumani
80ea03931c Added no of thread to config file
The thread count would me minimum of (no of cores in the machine) or (parameter mentioned in config file)
2020-11-24 15:07:07 +01:00
wu.jing
0fdc671177 fix merge problems in ittisim 2020-11-24 10:44:09 +00:00
wu.jing
c994c2ad8f Merge branch 'develop_SA_SIM' into develop_SA_L3
Conflicts:
	common/utils/ocp_itti/intertask_interface.h
	openair2/COMMON/gtpv1_u_messages_types.h
	openair2/GNB_APP/gnb_config.c
	openair2/RRC/NR/MESSAGES/asn1_msg.c
	openair2/RRC/NR/nr_rrc_proto.h
	openair2/RRC/NR/rrc_gNB.c
	openair2/RRC/NR/rrc_gNB_NGAP.c
	openair2/RRC/NR_UE/rrc_UE.c
	openair3/NAS/NR_UE/nr_nas_msg_sim.h
	openair3/NGAP/ngap_gNB_nas_procedures.c
2020-11-24 09:15:52 +00:00
Francesco Mani
d5af323ab2 taking into account sl_ahead when scheduling msg2 2020-11-24 09:08:20 +01:00
yaojie
716e16151a fixed the problem of pdu-session replace e-rab 2020-11-24 16:56:47 +09:00
wu.jing
2473722717 fix ittisim build error after merge 2020-11-24 14:06:51 +08:00
wu.jing
f3d51a58fb Merge branch 'develop_SA_RRC' into develop_SA_SIM
Conflicts:
	common/utils/ocp_itti/intertask_interface.h
	openair2/RRC/NR/rrc_gNB.c
	openair2/RRC/NR/rrc_gNB_NGAP.c
	openair2/RRC/NR_UE/rrc_UE.c
	openair2/RRC/NR_UE/rrc_defs.h
	openair3/NGAP/ngap_gNB_nas_procedures.c
2020-11-24 05:15:06 +00:00
wu.jing
d987c0919f Merge branch 'master' into develop_SA_L3 2020-11-24 04:57:19 +00:00
Xue Song
598eeb79d4 Derive keys from kgnb 2020-11-24 11:58:33 +09:00
rmagueta
c02287171a File configuration for the SA. 2020-11-23 23:39:18 +00:00
Francesco Mani
a5d45a2c19 indentation in gNB MAC rach functions 2020-11-23 19:19:48 +01:00
Francesco Mani
9e7c66d2c8 indentation in phy_procedures ue 2020-11-23 18:17:53 +01:00
Francesco Mani
31bcd10cea Merge branch 'NR_FR2_RRC_SSB' of https://gitlab.eurecom.fr/oai/openairinterface5g into NR_FR2_RRC_SSB 2020-11-23 18:16:41 +01:00
Francesco Mani
3e1959c8dd increase size of RA window definition for fr2 2020-11-23 18:16:34 +01:00
Francesco Mani
0075aefe31 fix in mac ue mib procedures 2020-11-23 17:58:56 +01:00
Hongzhi Wang
ee949c97f4 timing drift fix for FR2 2020-11-23 17:57:24 +01:00
Sakthivel Velumani
f55a4dd8e0 Remove hard-coding of no of threads
Script added to set the no of threads according to run-time conditions of the machine.
2020-11-23 16:45:59 +01:00
Raphael Defosseux
e9b6d0705d [docker] adding entrypoint and template generation to dockerfile for u18
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-11-23 16:31:45 +01:00
Francesco Mani
c5b7a3a441 fix scheduling msg2 2020-11-23 16:08:01 +01:00
yaojie
ac9028110d add NGAP_UERadioCapabilityInfoIndication 2020-11-23 17:40:42 +09:00
Florian Kaltenberger
9d71921859 fixing in UE processing of coreset_freq_dom 2020-11-23 08:55:26 +01:00
yaojie
2ed816d98c fix the task name of itti_alloc_new_message 2020-11-23 14:37:59 +09:00
rmagueta
93d93c81dd Minor correction in the fill_dmrs_mask() function 2020-11-20 19:19:20 +00:00
Florian Kaltenberger
e3b3fa82b8 Merge branch 'NR_FR2_RRC_SSB' of https://gitlab.eurecom.fr/oai/openairinterface5g into NR_FR2_RRC_SSB 2020-11-20 14:13:54 +01:00
hardy
708f34eeec fixing auto-terminate function to kill all RAN nodes 2020-11-20 11:59:40 +01:00
yaojie
9d579b7a47 fix errors and warnings 2020-11-20 14:39:45 +09:00
Cedric Roux
3889336f98 fix a nasty typo 2020-11-19 15:59:47 +01:00
Hongzhi Wang
8ab6b41a27 Merge branch 'NR_FR2_RRC_SSB' of https://gitlab.eurecom.fr/oai/openairinterface5g into NR_FR2_RRC_SSB 2020-11-19 15:36:07 +01:00
Hongzhi Wang
88a6a92c31 bug fix adjust sync 2020-11-19 15:34:48 +01:00
Francesco Mani
de6650f023 modifications in RRC for lower number of RBs 2020-11-19 15:25:31 +01:00
rmagueta
f86437c519 Minor correction of rnti_type in the fapi_nr_ue_l1 2020-11-19 14:16:22 +00:00
rmagueta
479019a70f Minor correction in the gNB_scheduler 2020-11-19 11:06:54 +00:00
rmagueta
252a9151cd Merge branch 'develop-sib1' of https://gitlab.eurecom.fr/oai/openairinterface5g into develop-sib1
 Conflicts:
	ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
	openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
	openair2/LAYER2/NR_MAC_gNB/mac_proto.h
	openair2/RRC/NR/rrc_gNB_reconfig.c
	openair2/RRC/NR_UE/rrc_defs.h
2020-11-19 10:55:17 +00:00
rmagueta
4d290f71cf Minor correction in the gNB_scheduler 2020-11-19 10:53:08 +00:00
rmagueta
3b9bdfc7d4 Minor corrections 2020-11-19 10:18:09 +00:00
rmagueta
749d6af42e Merge develop-sib1 into this branch 2020-11-19 02:22:47 +00:00
rmagueta
b97e1b578b Merge develop into this branch 2020-11-18 13:06:08 +00:00
rmagueta
f184239f10 Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into develop-sib1
 Conflicts:
	openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
	openair2/LAYER2/NR_MAC_gNB/mac_proto.h
	openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
	openair2/RRC/NR/L2_nr_interface.c
	openair2/RRC/NR/MESSAGES/asn1_msg.c
	openair2/RRC/NR/rrc_gNB.c
2020-11-18 11:57:46 +00:00
rmagueta
ee516a07c8 Add TDDIndex 4 in config file. 2020-11-18 11:28:37 +00:00
yaojie
f8f489ec22 add NGAP UE CONTEXT RELEASE MESSAGE 2020-11-18 18:33:58 +09:00
yaojie
959681424c fix some errors and warnings. 2020-11-18 03:12:59 +00:00
Florian Kaltenberger
e595ec0d8d Merge remote-tracking branch 'origin/develop' into NR_FR2_RRC_SSB 2020-11-17 13:57:51 +01:00
Xue Song
e524cd9482 Add rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ
Add rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP
Fix some problems about pdu session setup
2020-11-17 19:03:55 +09:00
matzakos
d36879e4ce Add support for more nrNRB configurations in X2 ENDC setup request message 2020-11-16 15:19:39 +01:00
matzakos
f26f096f5e Remove redundant debugging logs 2020-11-16 15:19:39 +01:00
matzakos
0a60085d87 Increase size of array storing PDCP PDU to be aligned with the expected size 2020-11-16 15:19:39 +01:00
matzakos
39f057f11c Remove non-mandatory SULFreqBandItem from X2 ENDC Setup Request message 2020-11-16 15:19:39 +01:00
matzakos
648ef92ac7 Remove hardcoding of x2 configuration parameters used in ENDC setup request message at gNB side 2020-11-16 15:19:39 +01:00
Raphael Defosseux
152f73458d [DOCKER] fixes after review
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-11-16 13:32:44 +01:00
Mohammed Ismail
da5a034e2b updated
Signed-off-by: Mohammed Ismail <mohammed.ismail@eurecom.fr>
2020-11-16 13:32:44 +01:00
Mohammed Ismail
a9a334f294 updated: Python scripts to generate eNB's templates for container images
Signed-off-by: Mohammed Ismail <mohammed.ismail@eurecom.fr>
2020-11-16 13:32:44 +01:00
Raphael Defosseux
abf2693b38 [OC][docker][build] support for new RHEL8.3 version
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-11-16 13:32:44 +01:00
Mohammed Ismail
af1495f124 script for config files generation
Signed-off-by: Mohammed Ismail <mohammed.ismail@eurecom.fr>
2020-11-16 13:32:44 +01:00
Raphael Defosseux
524354aebc OC: fix typos
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-11-16 13:32:44 +01:00
Mohammed Ismail
d4d0776774 sctp_event_subscribe updated
Signed-off-by: Mohammed Ismail <mohammed.ismail@eurecom.fr>
2020-11-16 13:32:44 +01:00
Raphael Defosseux
86c1ba3c19 CI: fix UL iperf from TRF container
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-11-16 13:11:37 +01:00
rmagueta
2177e83ca7 Coreset0 / SIB1 configured using the computed BWP considering the 3GPP. 2020-11-14 23:53:23 +00:00
rmagueta
461406ab01 Coreset0 / SIB1 configured using the configuration file. 2020-11-14 14:51:32 +00:00
rmagueta
aa676235a3 Minor fixes on used BWP of coreset0. 2020-11-13 18:56:32 +00:00
rmagueta
17312d685f Minor fixes on used BWP. 2020-11-13 12:07:53 +00:00
Florian Kaltenberger
ec060cbc62 fixing the filling of the ssb_mask_list (hopefully) for long bitmap (FR2) 2020-11-12 19:02:14 +01:00
Florian Kaltenberger
4e9c155464 Merge branch 'NR_FR2_RRC_SSB' of https://gitlab.eurecom.fr/oai/openairinterface5g into NR_FR2_RRC_SSB 2020-11-12 14:31:28 +01:00
rmagueta
1daaa7c6a3 BWP fixes 2020-11-12 09:59:37 +00:00
Francesco Mani
471c8eb8e1 bugfix for long ssb bitmap in fix scc 2020-11-12 10:20:49 +01:00
He Shanyun
d1a055ff70 implement pdusession establishment request 2020-11-12 03:06:10 +00:00
Florian Kaltenberger
781ec26cf2 also fixing PRACH issue in UE + config files 2020-11-11 15:38:21 +01:00
Francesco Mani
ef486e8f59 bugfix in csi meas reporting 2020-11-11 14:21:53 +01:00
Francesco Mani
39e33016c9 Merge branch 'NR_FR2_RRC_SSB' of https://gitlab.eurecom.fr/oai/openairinterface5g into NR_FR2_RRC_SSB 2020-11-11 14:21:27 +01:00
Florian Kaltenberger
7109841f07 Merge remote-tracking branch 'origin/nr_prach_fr2' into NR_FR2_RRC_SSB 2020-11-11 14:06:51 +01:00
Francesco Mani
671167572e Merge remote-tracking branch 'origin/nr_prach_fr2' into NR_FR2_RRC_SSB 2020-11-11 07:31:37 +01:00
rmagueta
11cb336dcc Correction of the offset and number of RBs of coreset0. Using the interleaver. 2020-11-11 04:49:19 +00:00
Florian Kaltenberger
ed97e21649 fixing prach config for FR2 2020-11-10 21:53:02 +01:00
Francesco Mani
b1bffcee81 extend bitmap for SSB in RRC to FR2 2020-11-10 19:03:29 +01:00
Xue Song
04897ab64f Fix GTPU's IP setting error 2020-11-09 08:32:57 +00:00
yaojie
bce573e64e fix process NGAP_INITIAL_CONTEXT_SETUP_REQ 2020-11-06 10:36:56 +00:00
He Shanyun
3d75f3c199 deal with Registration Accept 2020-11-06 08:21:01 +00:00
zhenghuangkun
d395831a54 Fix error registration complete 2020-11-06 07:44:58 +00:00
zhenghuangkun
86a3bfc0d6 Modify registration complete 2020-11-06 07:20:12 +00:00
zhenghuangkun
4041f14d1f Modify registration complete 2020-11-06 07:17:23 +00:00
zhenghuangkun
0e2e5f4c7e add nas message for registration complete 2020-11-06 05:30:11 +00:00
yaojie
56b1d24ff4 fix error InitialContextSetupResponse 2020-11-05 10:10:29 +00:00
Xue Song
7bef73bfa8 set nas message container for security mode complete 2020-11-05 07:57:05 +00:00
He Shanyun
1a9fd6028f set authentication code for security mode complete 2020-11-05 01:20:46 +00:00
rmagueta
976c2b2e84 Fill SIB1 with configuration values 2020-11-04 11:52:55 +00:00
rmagueta
578b17dec6 First baseline implementation of SIB1 2020-11-04 00:00:24 +00:00
rmagueta
45911fb8f0 Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into develop-sib1
 Conflicts:
	openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
	openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
	openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
	openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
	openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
2020-11-03 19:41:52 +00:00
rmagueta
6e0b0049ea Coreset0 frequency allocation update 2020-11-03 18:58:56 +00:00
Xue Song
89eae04132 Add NAS Security Mode Complete 2020-11-03 09:58:23 +00:00
rmagueta
23f5277d29 Decoding and xer_fprint of SIB1 at UE 2020-11-03 02:31:46 +00:00
rmagueta
d07e2ecc3b Minor correction: removing mac header 2020-11-02 12:44:00 +00:00
He Shanyun
947194a271 implement authentication response 2020-11-02 09:51:03 +00:00
rmagueta
290d9691f7 SIB1 PDSCH implementation 2020-10-31 19:56:04 +00:00
rmagueta
ac0dc9d3aa Transmission of SIB1 2020-10-30 17:01:51 +00:00
He Shanyun
63795a6c94 implement identityresponse 2020-10-30 08:34:52 +00:00
Xue Song
9fddd09dc3 Fix build warning
Modify SecurityModeFailure
2020-10-29 07:31:26 +00:00
zhenghuangkun
881a6d4afc add nas message for registration complete 2020-10-29 05:43:59 +00:00
yaojie
c2c84a9318 Add Downlink(NAS Identity Request)/Uplink(NAS Identity Response) 2020-10-29 14:24:32 +09:00
rmagueta
4f525854d0 Update nr_extract_dci_info() for the NR_RNTI_SI case. 2020-10-28 16:39:09 +00:00
Xue Song
b6e038e044 add NAS up/downlink 2020-10-28 09:54:03 +00:00
He Shanyun
f2bb26a91b add decode and encode for registration accept 2020-10-28 05:59:58 +00:00
Xue Song
ca4e85553f Add ITTI_SIM in rrc_gNB_generate_RRCRelease 2020-10-28 05:34:46 +00:00
Xue Song
456329b527 modify RRCRelease 2020-10-28 02:56:55 +00:00
He Shanyun
4843f90716 fix build error of phy simulator 2020-10-28 02:49:10 +00:00
Xue Song
90fbe805bb modify RRCRelease 2020-10-28 02:05:01 +00:00
He Shanyun
52f92b7ce0 set mnc 2020-10-28 01:44:18 +00:00
yaojie
58b390c7e0 fix error: Initialize NGAP_CONF_MODE for ittiSIM 2020-10-28 01:17:09 +00:00
He Shanyun
90a10cd051 set amf setid and regionid for registration request 2020-10-27 11:06:23 +00:00
rmagueta
807b3e90b8 RNTI_SI: update to 0xFFFF 2020-10-27 00:30:03 +00:00
rmagueta
cdf72e6d3e Creation of fill_default_coresetZero() and fill_default_searchSpaceZero(). Resource allocation and transmission of the DCI of SIB1. Partial implementation of the reception of the DCI of SIB1. 2020-10-24 22:45:19 +01:00
rmagueta
9100b28b47 Get type0_PDCCH_CSS_config parameters at the gNB. SIB1 initialization has been added at SI initialization. SIB1 was transmitted with static parameters. 2020-10-18 00:25:31 +01:00
rmagueta
ddb538a30e MIB NR: pdcch_ConfigSIB1 selection and fill using the configuration file, and using a dynamic method. 2020-10-15 11:55:28 +01:00
rmagueta
f2d5bce803 MIB NR: pdcch_ConfigSIB1 selection and fill 2020-10-12 12:11:19 +01:00
rmagueta
413ab9bc57 MIB NR: pdcch_ConfigSIB1 selection and fill 2020-10-12 11:59:04 +01:00
498 changed files with 25577 additions and 24711 deletions

View File

@@ -38,6 +38,10 @@ def nodeExecutor = params.nodeExecutor
// VM Lockable resources
def vmResource = params.vmLockableResource
// Tags to shorten pipeline duration
def doMandatoryTests = false
def doFullTestsuite = false
pipeline {
agent {
label nodeExecutor
@@ -46,31 +50,6 @@ pipeline {
disableConcurrentBuilds()
timestamps()
gitLabConnection('OAI GitLab')
gitlabBuilds(builds: [
"Build gNB-USRP",
"Build nr-UE-USRP",
"Build eNB-USRP",
"Build basic-sim",
"Build phy-sim",
"Build eNB-ethernet",
"Build UE-ethernet",
"Analysis with cppcheck",
"Test phy-sim",
"Test basic-sim",
"Test L1-sim",
"Test RF-sim",
"Test L2-sim",
"Test-Mono-FDD-Band7",
"Test-Mono-TDD-Band40",
"Test-IF4p5-FDD-Band7",
"Test-IF4p5-TDD-Band40",
"Test-Mono-FDD-Band13-LTE-M",
"Test-IF4p5-TDD-Band38-Multi-RRU",
"Test-eNB-OAI-UE-FDD-Band7",
"Test-Mono-FDD-Band13-X2-HO",
"Test-TDD-Band78-gNB-NR-UE",
"Test-OCP-FDD-Band7"
])
ansiColor('xterm')
}
@@ -93,6 +72,33 @@ pipeline {
if (fileExists("flexran")) {
sh "rm -Rf flexran > /dev/null 2>&1"
}
echo '\u2705 \u001B[32mVerify Labels\u001B[0m'
if ("MERGE".equals(env.gitlabActionType)) {
LABEL_CHECK = sh returnStdout: true, script: 'ci-scripts/checkGitLabMergeRequestLabels.sh --mr-id ' + env.gitlabMergeRequestIid
LABEL_CHECK = LABEL_CHECK.trim()
if (LABEL_CHECK == 'NONE') {
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Your merge request has none of the mandatory labels:\n\n"
message += " - BUILD-ONLY\n"
message += " - 4G-LTE\n"
message += " - 5G-NR\n"
message += " - CI\n\n"
message += "Not performing CI due to lack of labels"
addGitLabMRComment comment: message
error('Not performing CI due to lack of labels')
} else if (LABEL_CHECK == 'FULL') {
doMandatoryTests = true
doFullTestsuite = true
} else if (LABEL_CHECK == 'SHORTEN-5G') {
doMandatoryTests = true
} else {
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): We will perform only build stages on your Merge Request"
addGitLabMRComment comment: message
}
} else {
doMandatoryTests = true
doFullTestsuite = true
}
}
}
}
@@ -135,7 +141,7 @@ pipeline {
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow
sh "./ci-scripts/checkCodingFormattingRules.sh"
}
if (doFlexranCtrlTest) {
if (doFlexranCtrlTest && doMandatoryTests) {
sh "mkdir flexran"
dir ('flexran') {
withCredentials([
@@ -375,6 +381,9 @@ pipeline {
stage ("VM-based tests") {
stages {
stage ("Test physical simulators") {
when {
expression {doMandatoryTests}
}
steps {
lock (vmResource) {
script {
@@ -393,7 +402,7 @@ pipeline {
}
stage ("Build Flexran Controller") {
when {
expression {doFlexranCtrlTest}
expression {doFlexranCtrlTest && doMandatoryTests}
}
steps {
lock (vmResource) {
@@ -410,6 +419,9 @@ pipeline {
}
}
stage ("Test basic simulator") {
when {
expression {doMandatoryTests}
}
steps {
lock (vmResource) {
script {
@@ -427,6 +439,9 @@ pipeline {
}
}
stage ("Test L1 simulator") {
when {
expression {doMandatoryTests}
}
steps {
lock (vmResource) {
script {
@@ -444,6 +459,9 @@ pipeline {
}
}
stage ("Test RF simulator") {
when {
expression {doMandatoryTests}
}
steps {
lock (vmResource) {
script {
@@ -461,6 +479,9 @@ pipeline {
}
}
stage ("Test L2 simulator") {
when {
expression {doFullTestsuite}
}
steps {
lock (vmResource) {
script {
@@ -478,6 +499,9 @@ pipeline {
}
}
stage ("Destroy all Virtual Machines") {
when {
expression {doMandatoryTests}
}
steps {
lock (vmResource) {
sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
@@ -487,6 +511,9 @@ pipeline {
}
}
stage ("Test MONOLITHIC - FDD - Band 7 - B210") {
when {
expression {doFullTestsuite}
}
steps {
script {
triggerSlaveJob ('eNB-CI-FDD-Band7-B210', 'Test-Mono-FDD-Band7')
@@ -506,6 +533,9 @@ pipeline {
}
}
stage ("Test MONOLITHIC - TDD - Band 40 - B210") {
when {
expression {doFullTestsuite}
}
steps {
script {
triggerSlaveJob ('eNB-CI-TDD-Band40-B210', 'Test-Mono-TDD-Band40')
@@ -525,6 +555,9 @@ pipeline {
}
}
stage ("Test IF4p5 - FDD - Band 7 - B210") {
when {
expression {doFullTestsuite}
}
steps {
script {
sh "sleep 60"
@@ -545,6 +578,9 @@ pipeline {
}
}
stage ("Test IF4p5 - TDD - Band 40 - B210") {
when {
expression {doFullTestsuite}
}
steps {
script {
sh "sleep 60"
@@ -565,6 +601,9 @@ pipeline {
}
}
stage ("Test MONOLITHIC - FDD - Band 13 - B210") {
when {
expression {doFullTestsuite}
}
steps {
script {
sh "sleep 60"
@@ -585,6 +624,9 @@ pipeline {
}
}
stage ("Test X2 Handover - FDD - Band 13 - B210") {
when {
expression {doFullTestsuite}
}
steps {
script {
sh "sleep 60"
@@ -605,6 +647,9 @@ pipeline {
}
}
stage ("Test IF4p5 - TDD - Band 38 - B210 - MultiRRU") {
when {
expression {doFullTestsuite}
}
steps {
script {
triggerSlaveJob ('eNB-CI-IF4p5-TDD-Band38-MultiRRU-B210', 'Test-IF4p5-TDD-Band38-Multi-RRU')
@@ -624,6 +669,9 @@ pipeline {
}
}
stage ("Test OAI UE - FDD - Band 20 - B200") {
when {
expression {doFullTestsuite}
}
steps {
script {
triggerSlaveJobNoGitLab ('UE-CI-FDD-Band20-B200')
@@ -643,6 +691,9 @@ pipeline {
}
}
stage ("Test OAI UE - OAI eNB - FDD - Band 7 - B200") {
when {
expression {doFullTestsuite}
}
steps {
script {
// Delayed trigger on slave job, so it is always the last one to run
@@ -664,6 +715,9 @@ pipeline {
}
}
stage ("Test OAI NR UE - OAI gNB - TDD - Band 78 - N300") {
when {
expression {doMandatoryTests}
}
steps {
script {
triggerSlaveJob ('gNB-nrUE-MONO-TDD-Band78-N300', 'Test-TDD-Band78-gNB-NR-UE')
@@ -683,6 +737,9 @@ pipeline {
}
}
stage ("Test OAI OCP-eNB - FDD - Band 7 - B210") {
when {
expression {doFullTestsuite}
}
steps {
script {
triggerSlaveJob ('OCPeNB-FDD-Band7-B210', 'Test-OCP-FDD-Band7')
@@ -705,6 +762,7 @@ pipeline {
post {
always {
script {
if (doMandatoryTests) {
dir ('archives') {
sh "if [ -d basic_sim/test ] || [ -d phy_sim/test ] || [ -d l2_sim/test ]; then zip -r -qq vm_tests_logs.zip */test ; fi"
}
@@ -720,6 +778,7 @@ pipeline {
archiveArtifacts artifacts: 'test_simulator_results.html'
}
}
}
}
}
}

View File

@@ -41,7 +41,7 @@ import constants as CONST
#-----------------------------------------------------------
def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,HELP):
def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
py_param_file_present = False
@@ -79,6 +79,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,HELP):
RAN.ranRepository=matchReg.group(1)
HTML.ranRepository=matchReg.group(1)
ldpc.ranRepository=matchReg.group(1)
CONTAINERS.ranRepository=matchReg.group(1)
elif re.match('^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
if re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
@@ -90,6 +91,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,HELP):
CiTestObj.ranAllowMerge = True
RAN.ranAllowMerge=True
HTML.ranAllowMerge=True
CONTAINERS.ranAllowMerge=True
elif re.match('^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
if re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
@@ -99,6 +101,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,HELP):
RAN.ranBranch=matchReg.group(1)
HTML.ranBranch=matchReg.group(1)
ldpc.ranBranch=matchReg.group(1)
CONTAINERS.ranBranch=matchReg.group(1)
elif re.match('^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
if re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
@@ -108,6 +111,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,HELP):
RAN.ranCommitID=matchReg.group(1)
HTML.ranCommitID=matchReg.group(1)
ldpc.ranCommitID=matchReg.group(1)
CONTAINERS.ranCommitID=matchReg.group(1)
elif re.match('^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
if re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
@@ -117,50 +121,63 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,HELP):
RAN.ranTargetBranch=matchReg.group(1)
HTML.ranTargetBranch=matchReg.group(1)
ldpc.ranTargetBranch=matchReg.group(1)
CONTAINERS.ranTargetBranch=matchReg.group(1)
elif re.match('^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
if re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBIPAddress=matchReg.group(1)
ldpc.eNBIpAddr=matchReg.group(1)
CONTAINERS.eNBIPAddress=matchReg.group(1)
elif re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB1IPAddress=matchReg.group(1)
CONTAINERS.eNB1IPAddress=matchReg.group(1)
elif re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB2IPAddress=matchReg.group(1)
CONTAINERS.eNB2IPAddress=matchReg.group(1)
elif re.match('^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
if re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBUserName=matchReg.group(1)
ldpc.eNBUserName=matchReg.group(1)
CONTAINERS.eNBUserName=matchReg.group(1)
elif re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB1UserName=matchReg.group(1)
CONTAINERS.eNB1UserName=matchReg.group(1)
elif re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB2UserName=matchReg.group(1)
CONTAINERS.eNB2UserName=matchReg.group(1)
elif re.match('^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
if re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBPassword=matchReg.group(1)
ldpc.eNBPassWord=matchReg.group(1)
CONTAINERS.eNBPassword=matchReg.group(1)
elif re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB1Password=matchReg.group(1)
CONTAINERS.eNB1Password=matchReg.group(1)
elif re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB2Password=matchReg.group(1)
CONTAINERS.eNB2Password=matchReg.group(1)
elif re.match('^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
if re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBSourceCodePath=matchReg.group(1)
ldpc.eNBSourceCodePath=matchReg.group(1)
CONTAINERS.eNBSourceCodePath=matchReg.group(1)
elif re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB1SourceCodePath=matchReg.group(1)
CONTAINERS.eNB1SourceCodePath=matchReg.group(1)
elif re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB2SourceCodePath=matchReg.group(1)
CONTAINERS.eNB2SourceCodePath=matchReg.group(1)
elif re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE)
EPC.IPAddress=matchReg.group(1)

View File

@@ -178,6 +178,8 @@ function build_on_vm {
echo "mkdir -p cmake_targets/log" >> $VM_CMDS
echo "chmod 777 cmake_targets/log" >> $VM_CMDS
echo "cp /home/ubuntu/zip-install.txt cmake_targets/log" >> $VM_CMDS
# Patching the pistache build for Xenial (cmake too old for new commits)
echo "sed -i -e 's@cd pistache@cd pistache \&\& git checkout -f 9a65f40975fafca5bb5370ba6d0d00f42cbc4356@' ./tools/install_dependencies" >> $VM_CMDS
echo "echo \"./tools/install_dependencies \"" >> $VM_CMDS
echo "./tools/install_dependencies > cmake_targets/log/install-build.txt 2>&1" >> $VM_CMDS
echo "echo \"mkdir build\"" >> $VM_CMDS

View File

@@ -0,0 +1,83 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 7 23:04:51 2020
@author: hardy
"""
import yaml
import sys
import subprocess
def main():
f_yaml=sys.argv[1]
f_sh=sys.argv[2]
#filename='py_params_template.yaml'
with open(f_yaml,'r') as file:
# The FullLoader parameter handles the conversion from YAML
# scalar values to Python the dictionary format
print('Loading '+f_yaml)
params = yaml.load(file,Loader=yaml.FullLoader)
with open(f_sh,'w') as f:
f.write('#!/bin/sh\n')
for i in range (0, len(params['steps'])):
step=params['steps'][i].split(',')
mode=step[0]
f_xml=step[1]
line='python3 main.py ' + \
'--mode='+ mode + ' ' + \
'--ranRepository=' + params['ranRepository'] + ' ' + \
'--ranBranch=' + params['ranBranch'] + ' ' + \
'--ranCommitID=' + params['ranCommitID'] + ' ' + \
'--ranAllowMerge=' + params['ranAllowMerge'] + ' ' + \
'--ranTargetBranch=' + params['ranTargetBranch'] + ' ' + \
\
'--ADBIPAddress=' + params['ADB']['ADBIPAddress'] + ' ' + \
'--ADBUserName=' + params['ADB']['ADBUserName'] + ' ' + \
'--ADBPassword=' + params['ADB']['ADBPassword'] + ' ' + \
\
'--UEIPAddress=' + params['UE']['UEIPAddress'] + ' ' + \
'--UEUserName=' + params['UE']['UEUserName'] + ' ' + \
'--UEPassword=' + params['UE']['UEPassword'] + ' ' + \
'--UESourceCodePath=' + params['UE']['UESourceCodePath'] + ' ' + \
\
'--EPCIPAddress=' + params['EPC']['EPCIPAddress'] + ' ' + \
'--EPCUserName=' + params['EPC']['EPCUserName'] + ' ' + \
'--EPCPassword=' + params['EPC']['EPCPassword'] + ' ' + \
'--EPCSourceCodePath=' + params['EPC']['EPCSourceCodePath'] + ' ' + \
'--EPCType=' + params['EPC']['EPCType'] + ' ' + \
\
'--eNBIPAddress=' + params['RAN'][0]['eNBIPAddress'] + ' ' + \
'--eNBUserName=' + params['RAN'][0]['eNBUserName'] + ' ' + \
'--eNBPassword=' + params['RAN'][0]['eNBPassword'] + ' ' + \
'--eNBSourceCodePath=' + params['RAN'][0]['eNBSourceCodePath'] + ' ' + \
\
'--eNB1IPAddress=' + params['RAN'][1]['eNB1IPAddress'] + ' ' + \
'--eNB1UserName=' + params['RAN'][1]['eNB1UserName'] + ' ' + \
'--eNB1Password=' + params['RAN'][1]['eNB1Password'] + ' ' + \
'--eNB1SourceCodePath=' + params['RAN'][1]['eNB1SourceCodePath'] + ' '
if mode!="InitiateHtml":
line+='--XMLTestFile=' + f_xml
#if mode is InitiateHTML we have a special processing to mention all xml files from the list
#loop starting at 1 to avoid the xml file mentioned with InitiateHtml in yaml file (file is none)
else:
for i in range (1, len(params['steps'])):
step=params['steps'][i].split(',')
f_xml=step[1]
line+='--XMLTestFile=' + f_xml+' '
line+='\n'
print(line)
f.write(line)
subprocess.call(['chmod','777',f_sh])
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,46 @@
ranRepository : https://gitlab.eurecom.fr/oai/openairinterface5g.git
ranBranch : BRANCH_NAME
ranCommitID : COMMIT_ID
ranAllowMerge : 'true'
ranTargetBranch : develop
steps:
- InitiateHtml,none
- TesteNB,xml_files/fr1_multi_node_build.xml
- TesteNB,xml_files/fr1_epc_start.xml
- TesteNB,xml_files/fr1_ran_ue_base.xml #ue toggle, nodes initialize, ue toggle, ping, nodes terminate
- TesteNB,xml_files/fr1_epc_closure.xml
ADB: #on Caracal
ADBIPAddress : 192.168.18.196
ADBUserName : oaici
ADBPassword : KkexF6CErOi1fNuebCPsuIVK
RAN:
- eNBIPAddress : 192.168.18.199 #eNB on Minimassive
eNBUserName : oaicicd
eNBPassword : HzB*nkryaITdVd08TKlT#2Z5a!7M#~qn
eNBSourceCodePath : /tmp/CI-FR1-eNB
- eNB1IPAddress : 192.168.18.198 #gNB on Mozart
eNB1UserName : oaicicd
eNB1Password : 7zkDOFgh@w3HvRBMPTMh@BAx
eNB1SourceCodePath : /tmp/CI-FR1-gNB
EPC: #on Nikaia
EPCIPAddress : 192.168.18.99
EPCUserName : nikaia
EPCPassword : linux
EPCSourceCodePath : /tmp/CI-FR1-EPC
EPCType : ltebox
UE:
UEIPAddress : none
UEUserName : none
UEPassword : none
UESourceCodePath : none

View File

@@ -0,0 +1,108 @@
#!/bin/bash
#/*
# * 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
# */
function usage {
echo "OAI GitLab merge request applying script"
echo " Original Author: Raphael Defosseux"
echo ""
echo "Usage:"
echo "------"
echo ""
echo " checkGitLabMergeRequestLabels.sh [OPTIONS]"
echo ""
echo "Options:"
echo "------------------"
echo ""
echo " --mr-id ####"
echo " Specify the ID of the merge request."
echo ""
echo " --help OR -h"
echo " Print this help message."
echo ""
}
if [ $# -ne 2 ] && [ $# -ne 1 ]
then
echo "Syntax Error: not the correct number of arguments"
echo ""
usage
exit 1
fi
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-h|--help)
shift
usage
exit 0
;;
--mr-id)
MERGE_REQUEST_ID="$2"
shift
shift
;;
*)
echo "Syntax Error: unknown option: $key"
echo ""
usage
exit 1
esac
done
LABELS=`curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests/$MERGE_REQUEST_ID" | jq '.labels' || true`
IS_MR_BUILD_ONLY=`echo $LABELS | grep -c BUILD-ONLY || true`
IS_MR_CI=`echo $LABELS | grep -c CI || true`
IS_MR_4G=`echo $LABELS | grep -c 4G-LTE || true`
IS_MR_5G=`echo $LABELS | grep -c 5G-NR || true`
# First case: none is present! No CI
if [ $IS_MR_BUILD_ONLY -eq 0 ] && [ $IS_MR_CI -eq 0 ] && [ $IS_MR_4G -eq 0 ] && [ $IS_MR_5G -eq 0 ]
then
echo "NONE"
exit 0
fi
# Second case: Build-Only
if [ $IS_MR_BUILD_ONLY -eq 1 ]
then
echo "BUILD-ONLY"
exit 0
fi
# Third case: CI or 4G label --> Full CI run
if [ $IS_MR_4G -eq 1 ] || [ $IS_MR_CI -eq 1 ]
then
echo "FULL"
exit 0
fi
# Fourth case: 5G label
if [ $IS_MR_BUILD_ONLY -eq 0 ] && [ $IS_MR_CI -eq 0 ] && [ $IS_MR_4G -eq 0 ] && [ $IS_MR_5G -eq 1 ]
then
echo "SHORTEN-5G"
exit 0
fi

View File

@@ -0,0 +1,488 @@
#/*
# * 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
# */
#---------------------------------------------------------------------
# Python for CI of OAI-eNB + COTS-UE
#
# Required Python Version
# Python 3.x
#
# Required Python Package
# pexpect
#---------------------------------------------------------------------
#-----------------------------------------------------------
# Import
#-----------------------------------------------------------
import sys # arg
import re # reg
import logging
import os
import time
from multiprocessing import Process, Lock, SimpleQueue
from zipfile import ZipFile
#-----------------------------------------------------------
# OAI Testing modules
#-----------------------------------------------------------
import sshconnection as SSH
import helpreadme as HELP
import constants as CONST
#-----------------------------------------------------------
# Class Declaration
#-----------------------------------------------------------
class Containerize():
def __init__(self):
self.ranRepository = ''
self.ranBranch = ''
self.ranAllowMerge = False
self.ranCommitID = ''
self.ranTargetBranch = ''
self.eNBIPAddress = ''
self.eNBUserName = ''
self.eNBPassword = ''
self.eNBSourceCodePath = ''
self.eNB1IPAddress = ''
self.eNB1UserName = ''
self.eNB1Password = ''
self.eNB1SourceCodePath = ''
self.eNB2IPAddress = ''
self.eNB2UserName = ''
self.eNB2Password = ''
self.eNB2SourceCodePath = ''
self.forcedWorkspaceCleanup = False
self.imageKind = ''
self.eNB_instance = 0
self.eNB_serverId = ['', '', '']
self.yamlPath = ['', '', '']
self.eNB_logFile = ['', '', '']
self.testCase_id = ''
self.flexranCtrlDeployed = False
self.flexranCtrlIpAddress = ''
self.cli = ''
self.dockerfileprefix = ''
self.host = ''
self.allImagesSize = {}
self.collectInfo = {}
#-----------------------------------------------------------
# Container management functions
#-----------------------------------------------------------
def BuildImage(self, HTML):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
if self.eNB_serverId[self.eNB_instance] == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.eNB_serverId[self.eNB_instance] == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.eNB_serverId[self.eNB_instance] == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
lSourcePath = self.eNB2SourceCodePath
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
logging.debug('Building on server: ' + lIpAddr)
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
# Checking the hostname to get adapted on cli and dockerfileprefixes
mySSH.command('hostnamectl', '\$', 5)
result = re.search('Ubuntu|Red Hat', mySSH.getBefore())
self.host = result.group(0)
if self.host == 'Ubuntu':
self.cli = 'docker'
self.dockerfileprefix = '.ubuntu18'
elif self.host == 'Red Hat':
self.cli = 'podman'
self.dockerfileprefix = '.rhel8.2'
imageNames = []
result = re.search('eNB', self.imageKind)
# Creating a tupple with the imageName and the DockerFile prefix pattern on obelix
if result is not None:
imageNames.append(('oai-enb', 'eNB'))
else:
result = re.search('gNB', self.imageKind)
if result is not None:
imageNames.append(('oai-gnb', 'gNB'))
else:
result = re.search('all', self.imageKind)
if result is not None:
imageNames.append(('oai-enb', 'eNB'))
imageNames.append(('oai-gnb', 'gNB'))
imageNames.append(('oai-lte-ue', 'lteUE'))
imageNames.append(('oai-nr-ue', 'nrUE'))
if len(imageNames) == 0:
imageNames.append(('oai-enb', 'eNB'))
# Workaround for some servers, we need to erase completely the workspace
if self.forcedWorkspaceCleanup:
mySSH.command('echo ' + lPassWord + ' | sudo -S rm -Rf ' + lSourcePath, '\$', 15)
self.testCase_id = HTML.testCase_id
# on RedHat/CentOS .git extension is mandatory
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
if result is not None:
full_ran_repo_name = self.ranRepository
else:
full_ran_repo_name = self.ranRepository + '.git'
mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
mySSH.command('cd ' + lSourcePath, '\$', 5)
mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
# Raphael: here add a check if git clone or git fetch went smoothly
mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
mySSH.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
mySSH.command('mkdir -p cmake_targets/log', '\$', 5)
# if the commit ID is provided use it to point to it
if self.ranCommitID != '':
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5)
# if the branch is not develop, then it is a merge request and we need to do
# the potential merge. Note that merge conflicts should already been checked earlier
imageTag = 'develop'
if (self.ranAllowMerge):
imageTag = 'ci-temp'
if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
# if asterix, copy the entitlement and subscription manager configurations
if self.host == 'Red Hat':
mySSH.command('mkdir -p tmp/ca/', '\$', 5)
mySSH.command('mkdir -p tmp/entitlement/', '\$', 5)
mySSH.command('sudo cp /etc/rhsm/ca/redhat-uep.pem tmp/ca/', '\$', 5)
mySSH.command('sudo cp /etc/pki/entitlement/*.pem tmp/entitlement/', '\$', 5)
#mySSH.close()
#return 0
sharedimage = 'ran-build'
# Let's remove any previous run artifacts if still there
mySSH.command(self.cli + ' image prune --force', '\$', 5)
mySSH.command(self.cli + ' image rm ' + sharedimage + ':' + imageTag, '\$', 5)
for image,pattern in imageNames:
mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag, '\$', 5)
# Build the shared image
mySSH.command(self.cli + ' build --target ' + sharedimage + ' --tag ' + sharedimage + ':' + imageTag + ' --file docker/Dockerfile.ran' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1', '\$', 1600)
# Build the target image(s)
previousImage = sharedimage + ':' + imageTag
danglingShaOnes=[]
for image,pattern in imageNames:
# the archived Dockerfiles have "ran-build:latest" as base image
# we need to update them with proper tag
mySSH.command('sed -i -e "s#' + sharedimage + ':latest#' + sharedimage + ':' + imageTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5)
mySSH.command(self.cli + ' build --target ' + image + ' --tag ' + image + ':' + imageTag + ' --file docker/Dockerfile.' + pattern + self.dockerfileprefix + ' . > cmake_targets/log/' + image + '.log 2>&1', '\$', 1200)
# Retrieving the dangling image(s) for the log collection
mySSH.command(self.cli + ' images --filter "dangling=true" --filter "since=' + previousImage + '" -q | sed -e "s#^#sha=#"', '\$', 5)
result = re.search('sha=(?P<imageShaOne>[a-zA-Z0-9\-\_]+)', mySSH.getBefore())
if result is not None:
danglingShaOnes.append((image, result.group('imageShaOne')))
previousImage = image + ':' + imageTag
imageTag = 'ci-temp'
# First verify if images were properly created.
status = True
mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' ' + sharedimage + ':' + imageTag, '\$', 5)
if mySSH.getBefore().count('No such object') != 0:
logging.error('Could not build properly ran-build')
status = False
else:
result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', mySSH.getBefore())
if result is not None:
imageSize = float(result.group('size'))
imageSize = imageSize / 1000
if imageSize < 1000:
logging.debug('\u001B[1m ran-build size is ' + ('%.0f' % imageSize) + ' kbytes\u001B[0m')
self.allImagesSize['ran-build'] = str(round(imageSize,1)) + ' kbytes'
else:
imageSize = imageSize / 1000
if imageSize < 1000:
logging.debug('\u001B[1m ran-build size is ' + ('%.0f' % imageSize) + ' Mbytes\u001B[0m')
self.allImagesSize['ran-build'] = str(round(imageSize,1)) + ' Mbytes'
else:
imageSize = imageSize / 1000
logging.debug('\u001B[1m ran-build size is ' + ('%.3f' % imageSize) + ' Gbytes\u001B[0m')
self.allImagesSize['ran-build'] = str(round(imageSize,1)) + ' Gbytes'
else:
logging.debug('ran-build size is unknown')
for image,pattern in imageNames:
mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' ' + image + ':' + imageTag, '\$', 5)
if mySSH.getBefore().count('No such object') != 0:
logging.error('Could not build properly ' + image)
status = False
else:
result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', mySSH.getBefore())
if result is not None:
imageSize = float(result.group('size'))
imageSize = imageSize / 1000
if imageSize < 1000:
logging.debug('\u001B[1m ' + image + ' size is ' + ('%.0f' % imageSize) + ' kbytes\u001B[0m')
self.allImagesSize[image] = str(round(imageSize,1)) + ' kbytes'
else:
imageSize = imageSize / 1000
if imageSize < 1000:
logging.debug('\u001B[1m ' + image + ' size is ' + ('%.0f' % imageSize) + ' Mbytes\u001B[0m')
self.allImagesSize[image] = str(round(imageSize,1)) + ' Mbytes'
else:
imageSize = imageSize / 1000
logging.debug('\u001B[1m ' + image + ' size is ' + ('%.3f' % imageSize) + ' Gbytes\u001B[0m')
self.allImagesSize[image] = str(round(imageSize,1)) + ' Gbytes'
else:
logging.debug('ran-build size is unknown')
if not status:
mySSH.close()
logging.error('\u001B[1m Building OAI Images Failed\u001B[0m')
HTML.CreateHtmlTestRow(self.imageKind, 'KO', CONST.ALL_PROCESSES_OK)
#HTML.CreateHtmlNextTabHeaderTestRow(self.collectInfo, self.allImagesSize)
HTML.CreateHtmlTabFooter(False)
sys.exit(1)
# Recover build logs, for the moment only possible when build is successful
mySSH.command(self.cli + ' create --name test ' + sharedimage + ':' + imageTag, '\$', 5)
mySSH.command('mkdir -p cmake_targets/log/ran-build', '\$', 5)
mySSH.command(self.cli + ' cp test:/oai-ran/cmake_targets/log/. cmake_targets/log/ran-build', '\$', 5)
mySSH.command(self.cli + ' rm -f test', '\$', 5)
for image,shaone in danglingShaOnes:
mySSH.command('mkdir -p cmake_targets/log/' + image, '\$', 5)
mySSH.command(self.cli + ' create --name test ' + shaone, '\$', 5)
mySSH.command(self.cli + ' cp test:/oai-ran/cmake_targets/log/. cmake_targets/log/' + image, '\$', 5)
mySSH.command(self.cli + ' rm -f test', '\$', 5)
mySSH.command(self.cli + ' image prune --force', '\$', 5)
mySSH.command('cd cmake_targets', '\$', 5)
mySSH.command('mkdir -p build_log_' + self.testCase_id, '\$', 5)
mySSH.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5)
#mySSH.close()
mySSH.command('cd /tmp/CI-eNB/cmake_targets', '\$', 5)
if (os.path.isfile('./build_log_' + self.testCase_id + '.zip')):
os.remove('./build_log_' + self.testCase_id + '.zip')
mySSH.command('zip -r -qq build_log_' + self.testCase_id + '.zip build_log_' + self.testCase_id, '\$', 5)
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/build_log_' + self.testCase_id + '.zip', '.')
#mySSH.command('rm -f build_log_' + self.testCase_id + '.zip','\$', 5)
mySSH.close()
ZipFile('build_log_' + self.testCase_id + '.zip').extractall('.')
#Trying to identify the errors and warnings for each built images
imageNames1 = imageNames
shared = ('ran-build','ran')
imageNames1.insert(0, shared)
for image,pattern in imageNames1:
files = {}
file_list = [f for f in os.listdir('build_log_' + self.testCase_id + '/' + image) if os.path.isfile(os.path.join('build_log_' + self.testCase_id + '/' + image, f)) and f.endswith('.txt')]
for fil in file_list:
errorandwarnings = {}
warningsNo = 0
errorsNo = 0
with open('build_log_{}/{}/{}'.format(self.testCase_id,image,fil), mode='r') as inputfile:
for line in inputfile:
result = re.search(' ERROR ', str(line))
if result is not None:
errorsNo += 1
result = re.search(' error:', str(line))
if result is not None:
errorsNo += 1
result = re.search(' WARNING ', str(line))
if result is not None:
warningsNo += 1
result = re.search(' warning:', str(line))
if result is not None:
warningsNo += 1
errorandwarnings['errors'] = errorsNo
errorandwarnings['warnings'] = warningsNo
errorandwarnings['status'] = status
files[fil] = errorandwarnings
self.collectInfo[image] = files
logging.info('\u001B[1m Building OAI Image(s) Pass\u001B[0m')
HTML.CreateHtmlTestRow(self.imageKind, 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlNextTabHeaderTestRow(self.collectInfo, self.allImagesSize)
def DeployObject(self, HTML, EPC):
if self.eNB_serverId[self.eNB_instance] == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.eNB_serverId[self.eNB_instance] == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.eNB_serverId[self.eNB_instance] == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
lSourcePath = self.eNB2SourceCodePath
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m')
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
# Putting the CPUs in a good state, we do that only on a few servers
mySSH.command('hostname', '\$', 5)
result = re.search('obelix|asterix', mySSH.getBefore())
if result is not None:
mySSH.command('if command -v cpupower &> /dev/null; then echo ' + lPassWord + ' | sudo -S cpupower idle-set -D 0; fi', '\$', 5)
time.sleep(5)
mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5)
mySSH.command('cp docker-compose.yml ci-docker-compose.yml', '\$', 5)
imageTag = 'develop'
if (self.ranAllowMerge):
imageTag = 'ci-temp'
mySSH.command('sed -i -e "s/image: oai-enb:latest/image: oai-enb:' + imageTag + '/" ci-docker-compose.yml', '\$', 2)
localMmeIpAddr = EPC.MmeIPAddress
mySSH.command('sed -i -e "s/CI_MME_IP_ADDR/' + localMmeIpAddr + '/" ci-docker-compose.yml', '\$', 2)
if self.flexranCtrlDeployed:
mySSH.command('sed -i -e \'s/FLEXRAN_ENABLED:.*/FLEXRAN_ENABLED: "yes"/\' ci-docker-compose.yml', '\$', 2)
mySSH.command('sed -i -e "s/CI_FLEXRAN_CTL_IP_ADDR/' + self.flexranCtrlIpAddress + '/" ci-docker-compose.yml', '\$', 2)
else:
mySSH.command('sed -i -e "s/FLEXRAN_ENABLED:.*$/FLEXRAN_ENABLED: \"no\"/" ci-docker-compose.yml', '\$', 2)
mySSH.command('sed -i -e "s/CI_FLEXRAN_CTL_IP_ADDR/127.0.0.1/" ci-docker-compose.yml', '\$', 2)
# Currently support only one
mySSH.command('docker-compose --file ci-docker-compose.yml config --services | sed -e "s@^@service=@"', '\$', 2)
result = re.search('service=(?P<svc_name>[a-zA-Z0-9\_]+)', mySSH.getBefore())
if result is not None:
svcName = result.group('svc_name')
mySSH.command('docker-compose --file ci-docker-compose.yml up -d ' + svcName, '\$', 2)
# Checking Status
mySSH.command('docker-compose --file ci-docker-compose.yml config', '\$', 5)
result = re.search('container_name: (?P<container_name>[a-zA-Z0-9\-\_]+)', mySSH.getBefore())
unhealthyNb = 0
healthyNb = 0
startingNb = 0
containerName = ''
if result is not None:
containerName = result.group('container_name')
time.sleep(5)
cnt = 0
while (cnt < 3):
mySSH.command('docker inspect --format=\'{{.State.Health.Status}}\' ' + containerName, '\$', 5)
unhealthyNb = mySSH.getBefore().count('unhealthy')
healthyNb = mySSH.getBefore().count('healthy') - unhealthyNb
startingNb = mySSH.getBefore().count('starting')
if healthyNb == 1:
cnt = 10
else:
time.sleep(10)
cnt += 1
logging.debug(' -- ' + str(healthyNb) + ' healthy container(s)')
logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)')
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
status = False
if healthyNb == 1:
cnt = 0
while (cnt < 20):
mySSH.command('docker logs ' + containerName + ' | egrep --text --color=never -i "wait|sync|Starting"', '\$', 30)
result = re.search('got sync|Starting F1AP at CU', mySSH.getBefore())
if result is None:
time.sleep(6)
cnt += 1
else:
cnt = 100
status = True
logging.info('\u001B[1m Deploying OAI object Pass\u001B[0m')
time.sleep(10)
mySSH.close()
self.testCase_id = HTML.testCase_id
self.eNB_logFile[self.eNB_instance] = 'enb_' + self.testCase_id + '.log'
if status:
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
else:
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
def UndeployObject(self, HTML, RAN):
logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m')
if self.eNB_serverId[self.eNB_instance] == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.eNB_serverId[self.eNB_instance] == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.eNB_serverId[self.eNB_instance] == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
lSourcePath = self.eNB2SourceCodePath
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m')
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5)
# Currently support only one
mySSH.command('docker-compose --file ci-docker-compose.yml config', '\$', 5)
result = re.search('container_name: (?P<container_name>[a-zA-Z0-9\-\_]+)', mySSH.getBefore())
if result is not None:
containerName = result.group('container_name')
mySSH.command('docker kill --signal INT ' + containerName, '\$', 30)
time.sleep(5)
mySSH.command('docker logs ' + containerName + ' > ' + lSourcePath + '/cmake_targets/' + self.eNB_logFile[self.eNB_instance], '\$', 30)
mySSH.command('docker rm -f ' + containerName, '\$', 30)
# Putting the CPUs back in a idle state, we do that only on a few servers
mySSH.command('hostname', '\$', 5)
result = re.search('obelix|asterix', mySSH.getBefore())
if result is not None:
mySSH.command('if command -v cpupower &> /dev/null; then echo ' + lPassWord + ' | sudo -S cpupower idle-set -E; fi', '\$', 5)
mySSH.close()
# Analyzing log file!
copyin_res = mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/' + self.eNB_logFile[self.eNB_instance], '.')
nodeB_prefix = 'e'
if (copyin_res == -1):
HTML.htmleNBFailureMsg='Could not copy ' + nodeB_prefix + 'NB logfile to analyze it!'
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
else:
logging.debug('\u001B[1m Analyzing ' + nodeB_prefix + 'NB logfile \u001B[0m ' + self.eNB_logFile[self.eNB_instance])
logStatus = RAN.AnalyzeLogFile_eNB(self.eNB_logFile[self.eNB_instance], HTML)
if (logStatus < 0):
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', logStatus)
else:
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)

View File

@@ -42,6 +42,7 @@ import xml.etree.ElementTree as ET
import logging
import datetime
import signal
import statistics as stat
from multiprocessing import Process, Lock, SimpleQueue
logging.basicConfig(
level=logging.DEBUG,
@@ -53,6 +54,52 @@ import helpreadme as HELP
import constants as CONST
import sshconnection
#-----------------------------------------------------------
# Utility functions
#-----------------------------------------------------------
def GetPingTimeAnalysis(ping_log_file):
#ping time values read from file
t_ping=[]
#ping stats (dictionary) to be returned by the function
ping_stat={}
if (os.path.isfile(ping_log_file)):
with open(ping_log_file,"r") as f:
for line in f:
#looking for time=xxx ms field
result=re.match('^.+time=(?P<ping_time>[0-9\.]+)',line)
if result != None:
t_ping.append(float(result.group('ping_time')))
#initial stats
ping_stat['min_0']=min(t_ping)
ping_stat['mean_0']=stat.mean(t_ping)
ping_stat['median_0']=stat.median(t_ping)
ping_stat['max_0']=max(t_ping)
#get index of max value
max_loc=t_ping.index(max(t_ping))
ping_stat['max_loc']=max_loc
#remove it
t_ping.pop(max_loc)
#new stats after removing max value
ping_stat['min_1']=min(t_ping)
ping_stat['mean_1']=stat.mean(t_ping)
ping_stat['median_1']=stat.median(t_ping)
ping_stat['max_1']=max(t_ping)
return ping_stat
else:
logging.error("Ping log file does not exist")
return -1
#-----------------------------------------------------------
# OaiCiTest Class Definition
#-----------------------------------------------------------
@@ -185,7 +232,7 @@ class OaiCiTest():
SSH.command('mkdir -p log', '\$', 5)
SSH.command('chmod 777 log', '\$', 5)
# no need to remove in log (git clean did the trick)
SSH.command('stdbuf -o0 ./build_oai ' + self.Build_OAI_UE_args + ' 2>&1 | stdbuf -o0 tee compile_oai_ue.log', 'Bypassing the Tests|build have failed', 900)
SSH.command('stdbuf -o0 ./build_oai ' + self.Build_OAI_UE_args + ' 2>&1 | stdbuf -o0 tee compile_oai_ue.log', 'Bypassing the Tests|build have failed', 1200)
SSH.command('ls ran_build/build', '\$', 3)
SSH.command('ls ran_build/build', '\$', 3)
buildStatus = True
@@ -216,7 +263,7 @@ class OaiCiTest():
HTML.CreateHtmlTabFooter(False)
self.ConditionalExit()
def CheckFlexranCtrlInstallation(self,RAN,EPC):
def CheckFlexranCtrlInstallation(self,RAN,EPC,CONTAINERS):
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '':
return
SSH = sshconnection.SSHConnection()
@@ -225,7 +272,18 @@ class OaiCiTest():
result = re.search('/opt/flexran_rtc/build/rt_controller', SSH.getBefore())
if result is not None:
RAN.flexranCtrlInstalled=True
RAN.flexranCtrlIpAddress=EPC.IPAddress
logging.debug('Flexran Controller is installed')
else:
# Maybe flexran-rtc is deployed into a container
SSH.command('docker inspect --format="FLEX_RTC_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" prod-flexran-rtc', '\$', 5)
result = re.search('FLEX_RTC_IP_ADDR = (?P<flex_ip_addr>[0-9\.]+)', SSH.getBefore())
if result is not None:
RAN.flexranCtrlDeployed=True
RAN.flexranCtrlIpAddress=result.group('flex_ip_addr')
CONTAINERS.flexranCtrlDeployed=True
CONTAINERS.flexranCtrlIpAddress=result.group('flex_ip_addr')
logging.debug('Flexran Controller is deployed: ' + RAN.flexranCtrlIpAddress)
SSH.close()
def InitializeFlexranCtrl(self, HTML,RAN,EPC):
@@ -547,7 +605,7 @@ class OaiCiTest():
HTML.htmlUEFailureMsg='nr-uesoftmodem did NOT synced'
HTML.CreateHtmlTestRow(self.air_interface + ' ' + self.Initialize_OAI_UE_args, 'KO', CONST.OAI_UE_PROCESS_COULD_NOT_SYNC, 'OAI UE')
logging.error('\033[91mInitialize OAI UE Failed! \033[0m')
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
def checkDevTTYisUnlocked(self):
SSH = sshconnection.SSHConnection()
@@ -625,7 +683,7 @@ class OaiCiTest():
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
self.checkDevTTYisUnlocked()
def AttachCatM(self,HTML,RAN,COTS_UE):
def AttachCatM(self,HTML,RAN,COTS_UE,EPC):
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
@@ -698,7 +756,7 @@ class OaiCiTest():
html_cell = '<pre style="background-color:white">CAT-M module Attachment Failed</pre>'
html_queue.put(html_cell)
HTML.CreateHtmlTestRowQueue('N/A', 'KO', 1, html_queue)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
def PingCatM(self,HTML,RAN,EPC,COTS_UE):
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
@@ -709,7 +767,7 @@ class OaiCiTest():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
return
try:
statusQueue = SimpleQueue()
@@ -730,7 +788,7 @@ class OaiCiTest():
moduleIPAddr = result.group('ipaddr')
else:
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
return
ping_time = re.findall("-c (\d+)",str(self.ping_args))
device_id = 'catm'
@@ -794,7 +852,7 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', 1, statusQueue)
else:
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', 1, statusQueue)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
except:
os.kill(os.getppid(),signal.SIGUSR1)
@@ -895,7 +953,7 @@ class OaiCiTest():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
return
multi_jobs = []
status_queue = SimpleQueue()
@@ -914,7 +972,7 @@ class OaiCiTest():
if (status_queue.empty()):
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
return
else:
attach_status = True
@@ -943,7 +1001,7 @@ class OaiCiTest():
time.sleep(5)
else:
HTML.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
def DetachUE_common(self, device_id, idx,COTS_UE):
try:
@@ -976,7 +1034,7 @@ class OaiCiTest():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
return
multi_jobs = []
cnt = 0
@@ -1227,6 +1285,8 @@ class OaiCiTest():
if lDataConnectionState == 3:
dataConnectionState = 'Data State: SUSPENDED'
result = re.search('mDataConnectionReason=(?P<dataConnectionReason>[0-9a-zA-Z_]+)', SSH.getBefore())
time.sleep(1)
SSH.close()
dataConnectionReason = 'Data Reason: UNKNOWN'
if result is not None:
dataConnectionReason = 'Data Reason: ' + result.group('dataConnectionReason')
@@ -1240,7 +1300,6 @@ class OaiCiTest():
qMsg = serviceState + '\n' + dataConnectionState + '\n' + dataConnectionReason
statusQueue.put(qMsg)
lock.release()
SSH.close()
except:
os.kill(os.getppid(),signal.SIGUSR1)
@@ -1267,12 +1326,12 @@ class OaiCiTest():
i += 1
for job in multi_jobs:
job.join()
if RAN.flexranCtrlInstalled and RAN.flexranCtrlStarted:
if (RAN.flexranCtrlInstalled and RAN.flexranCtrlStarted) or RAN.flexranCtrlDeployed:
SSH = sshconnection.SSHConnection()
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
SSH.command('cd /opt/flexran_rtc', '\$', 5)
SSH.command('curl http://localhost:9999/stats | jq \'.\' > log/check_status_' + self.testCase_id + '.log 2>&1', '\$', 5)
SSH.command('cat log/check_status_' + self.testCase_id + '.log | jq \'.eNB_config[0].UE\' | grep -c rnti | sed -e "s#^#Nb Connected UE = #"', '\$', 5)
SSH.command('cd ' + EPC.SourceCodePath + '/scripts', '\$', 5)
SSH.command('curl http://' + RAN.flexranCtrlIpAddress + ':9999/stats | jq \'.\' > check_status_' + self.testCase_id + '.log 2>&1', '\$', 5)
SSH.command('cat check_status_' + self.testCase_id + '.log | jq \'.eNB_config[0].UE\' | grep -c rnti | sed -e "s#^#Nb Connected UE = #"', '\$', 5)
result = re.search('Nb Connected UE = (?P<nb_ues>[0-9]+)', SSH.getBefore())
passStatus = True
if result is not None:
@@ -1291,7 +1350,7 @@ class OaiCiTest():
if (status_queue.empty()):
HTML.CreateHtmlTestRow(htmlOptions, 'KO', CONST.ALL_PROCESSES_OK)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
else:
check_status = True
html_queue = SimpleQueue()
@@ -1307,7 +1366,7 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(htmlOptions, 'OK', len(self.UEDevices), html_queue)
else:
HTML.CreateHtmlTestRowQueue(htmlOptions, 'KO', len(self.UEDevices), html_queue)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
def GetAllUEIPAddresses(self):
SSH = sshconnection.SSHConnection()
@@ -1397,17 +1456,26 @@ class OaiCiTest():
if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
launchFromTrfContainer = True
if launchFromTrfContainer:
ping_status = SSH.command('docker exec -it prod-trf-gen /bin/bash -c "ping ' + self.ping_args + ' ' + UE_IPAddress + '" 2>&1 | tee ping_' + self.testCase_id + '_' + device_id + '.log', '\$', int(ping_time[0])*1.5)
ping_status = SSH.command('docker exec -it prod-trf-gen /bin/bash -c "ping ' + self.ping_args + ' ' + UE_IPAddress + '" 2>&1 | tee ping_' + self.testCase_id + '_' + device_id + '.log', '\$', int(ping_time[0])*1.5)
else:
ping_status = SSH.command('stdbuf -o0 ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 | stdbuf -o0 tee ping_' + self.testCase_id + '_' + device_id + '.log', '\$', int(ping_time[0])*1.5)
#copy the ping log file to have it locally for analysis (ping stats)
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '.')
else:
#ping log file is on the python executor
cmd = 'ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + device_id + '.log'
message = cmd + '\n'
logging.debug(cmd)
ret = subprocess.run(cmd, shell=True)
ping_status = ret.returncode
#copy the ping log file to an other folder for log collection (source and destination are EPC)
SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'ping_' + self.testCase_id + '_' + device_id + '.log', EPC.SourceCodePath + '/scripts')
#copy the ping log file to have it locally for analysis (ping stats)
logging.debug(EPC.SourceCodePath + 'ping_' + self.testCase_id + '_' + device_id + '.log')
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath +'/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '.')
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
#cat is executed on EPC
SSH.command('cat ' + EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
# TIMEOUT CASE
if ping_status < 0:
@@ -1416,6 +1484,7 @@ class OaiCiTest():
SSH.close()
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message)
return
#search is done on cat result
result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', SSH.getBefore())
if result is None:
message = 'Packet Loss Not Found!'
@@ -1450,7 +1519,27 @@ class OaiCiTest():
logging.debug('\u001B[1;34m ' + min_msg + '\u001B[0m')
logging.debug('\u001B[1;34m ' + avg_msg + '\u001B[0m')
logging.debug('\u001B[1;34m ' + max_msg + '\u001B[0m')
qMsg = pal_msg + '\n' + min_msg + '\n' + avg_msg + '\n' + max_msg
#adding extra ping stats from local file
ping_log_file='ping_' + self.testCase_id + '_' + device_id + '.log'
logging.debug('Analyzing Ping log file : ' + os.getcwd() + '/' + ping_log_file)
ping_stat=GetPingTimeAnalysis(ping_log_file)
ping_stat_msg=''
if (ping_stat!=-1) and (len(ping_stat)!=0):
ping_stat_msg+='Ping stats before removing largest value : \n'
ping_stat_msg+='RTT(Min) : ' + str("{:.2f}".format(ping_stat['min_0'])) + 'ms \n'
ping_stat_msg+='RTT(Mean) : ' + str("{:.2f}".format(ping_stat['mean_0'])) + 'ms \n'
ping_stat_msg+='RTT(Median) : ' + str("{:.2f}".format(ping_stat['median_0'])) + 'ms \n'
ping_stat_msg+='RTT(Max) : ' + str("{:.2f}".format(ping_stat['max_0'])) + 'ms \n'
ping_stat_msg+='Max Index : ' + str(ping_stat['max_loc']) + '\n'
ping_stat_msg+='Ping stats after removing largest value : \n'
ping_stat_msg+='RTT(Min) : ' + str("{:.2f}".format(ping_stat['min_1'])) + 'ms \n'
ping_stat_msg+='RTT(Mean) : ' + str("{:.2f}".format(ping_stat['mean_1'])) + 'ms \n'
ping_stat_msg+='RTT(Median) : ' + str("{:.2f}".format(ping_stat['median_1'])) + 'ms \n'
ping_stat_msg+='RTT(Max) : ' + str("{:.2f}".format(ping_stat['max_1'])) + 'ms \n'
#building html message
qMsg = pal_msg + '\n' + min_msg + '\n' + avg_msg + '\n' + max_msg + '\n' + ping_stat_msg
packetLossOK = True
if packetloss is not None:
if float(packetloss) > float(self.ping_packetloss_threshold):
@@ -1485,7 +1574,7 @@ class OaiCiTest():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
return
ping_from_eNB = re.search('oaitun_enb1', str(self.ping_args))
if ping_from_eNB is not None:
@@ -1587,12 +1676,12 @@ class OaiCiTest():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
return
ueIpStatus = self.GetAllUEIPAddresses()
if (ueIpStatus < 0):
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
return
multi_jobs = []
i = 0
@@ -1610,7 +1699,7 @@ class OaiCiTest():
if (status_queue.empty()):
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.ALL_PROCESSES_OK)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
else:
ping_status = True
html_queue = SimpleQueue()
@@ -1627,7 +1716,7 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', len(self.UEDevices), html_queue)
else:
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
def Iperf_ComputeTime(self):
result = re.search('-t (?P<iperf_time>\d+)', str(self.iperf_args))
@@ -1934,15 +2023,34 @@ class OaiCiTest():
ret = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, encoding='utf-8')
if ret.stdout is not None:
EPC_Iperf_UE_IPAddress = ret.stdout.strip()
# When using a docker-based deployment, IPERF client shall be launched from trf container
launchFromTrfContainer = False
if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
launchFromTrfContainer = True
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
SSH.command('docker inspect --format="TRF_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" prod-trf-gen', '\$', 5)
result = re.search('TRF_IP_ADDR = (?P<trf_ip_addr>[0-9\.]+)', SSH.getBefore())
if result is not None:
EPC_Iperf_UE_IPAddress = result.group('trf_ip_addr')
SSH.close()
port = 5001 + idx
udpOptions = ''
if udpIperf:
udpOptions = '-u '
if launchFromEpc:
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
SSH.command('cd ' + EPC.SourceCodePath + '/scripts', '\$', 5)
SSH.command('rm -f iperf_server_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
if udpIperf:
SSH.command('echo $USER; nohup iperf -u -s -i 1 -p ' + str(port) + ' > iperf_server_' + self.testCase_id + '_' + device_id + '.log &', EPC.UserName, 5)
if launchFromTrfContainer:
if self.ueIperfVersion == self.dummyIperfVersion:
prefix = ''
else:
prefix = ''
if self.ueIperfVersion == '2.0.5':
prefix = '/iperf-2.0.5/bin/'
SSH.command('docker exec -d prod-trf-gen /bin/bash -c "nohup ' + prefix + 'iperf ' + udpOptions + '-s -i 1 -p ' + str(port) + ' > iperf_server_' + self.testCase_id + '_' + device_id + '.log &"', '\$', 5)
else:
SSH.command('echo $USER; nohup iperf -s -i 1 -p ' + str(port) + ' > iperf_server_' + self.testCase_id + '_' + device_id + '.log &', EPC.UserName, 5)
SSH.command('echo $USER; nohup iperf ' + udpOptions + '-s -i 1 -p ' + str(port) + ' > iperf_server_' + self.testCase_id + '_' + device_id + '.log &', EPC.UserName, 5)
SSH.close()
else:
if self.ueIperfVersion == self.dummyIperfVersion:
@@ -1951,10 +2059,7 @@ class OaiCiTest():
prefix = ''
if self.ueIperfVersion == '2.0.5':
prefix = '/opt/iperf-2.0.5/bin/'
if udpIperf:
cmd = 'nohup ' + prefix + 'iperf -u -s -i 1 -p ' + str(port) + ' > iperf_server_' + self.testCase_id + '_' + device_id + '.log 2>&1 &'
else:
cmd = 'nohup ' + prefix + 'iperf -s -i 1 -p ' + str(port) + ' > iperf_server_' + self.testCase_id + '_' + device_id + '.log 2>&1 &'
cmd = 'nohup ' + prefix + 'iperf ' + udpOptions + '-s -i 1 -p ' + str(port) + ' > iperf_server_' + self.testCase_id + '_' + device_id + '.log 2>&1 &'
logging.debug(cmd)
subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, encoding='utf-8')
time.sleep(0.5)
@@ -2000,13 +2105,16 @@ class OaiCiTest():
# Kill iperf server on EPC side
if launchFromEpc:
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
SSH.command('killall --signal SIGKILL iperf', EPC.UserName, 5)
if launchFromTrfContainer:
SSH.command('docker exec -it prod-trf-gen /bin/bash -c "killall --signal SIGKILL iperf"', '\$', 5)
else:
SSH.command('killall --signal SIGKILL iperf', EPC.UserName, 5)
SSH.close()
else:
cmd = 'killall --signal SIGKILL iperf'
logging.debug(cmd)
subprocess.run(cmd, shell=True)
time.sleep(1)
time.sleep(1)
SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_server_' + self.testCase_id + '_' + device_id + '.log', EPC.SourceCodePath + '/scripts')
# in case of failure, retrieve server log
if (clientStatus == -1) or (clientStatus == -2):
@@ -2014,6 +2122,10 @@ class OaiCiTest():
time.sleep(1)
if (os.path.isfile('iperf_server_' + self.testCase_id + '_' + device_id + '.log')):
os.remove('iperf_server_' + self.testCase_id + '_' + device_id + '.log')
if launchFromTrfContainer:
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
SSH.command('docker cp prod-trf-gen:/iperf-2.0.5/iperf_server_' + self.testCase_id + '_' + device_id + '.log ' + EPC.SourceCodePath + '/scripts', '\$', 5)
SSH.close()
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath+ '/scripts/iperf_server_' + self.testCase_id + '_' + device_id + '.log', '.')
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options)
# in case of OAI-UE
@@ -2212,8 +2324,16 @@ class OaiCiTest():
else:
SSH.copyin(self.ADBIPAddress, self.ADBUserName, self.ADBPassword, EPC.SourceCodePath + '/scripts/iperf_server_' + self.testCase_id + '_' + device_id + '.log', '.')
# fromdos has to be called on the python executor not on ADB server
cmd = 'fromdos -o iperf_server_' + self.testCase_id + '_' + device_id + '.log'
subprocess.run(cmd, shell=True)
cmd = 'fromdos -o iperf_server_' + self.testCase_id + '_' + device_id + '.log 2>&1 > /dev/null'
try:
subprocess.run(cmd, shell=True)
except:
pass
cmd = 'dos2unix -o iperf_server_' + self.testCase_id + '_' + device_id + '.log 2>&1 > /dev/null'
try:
subprocess.run(cmd, shell=True)
except:
pass
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options)
# in case of OAI UE:
@@ -2237,7 +2357,7 @@ class OaiCiTest():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
return
server_on_enb = re.search('-R', str(self.iperf_args))
if server_on_enb is not None:
@@ -2335,7 +2455,7 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'OK', len(self.UEDevices), html_queue)
else:
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
def Iperf(self,HTML,RAN,EPC,COTS_UE):
result = re.search('noS1', str(RAN.Initialize_eNB_args))
@@ -2353,13 +2473,13 @@ class OaiCiTest():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
if (pStatus < 0):
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
return
ueIpStatus = self.GetAllUEIPAddresses()
if (ueIpStatus < 0):
logging.debug('going here')
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
return
self.dummyIperfVersion = '2.0.10'
@@ -2390,7 +2510,7 @@ class OaiCiTest():
if (status_queue.empty()):
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.ALL_PROCESSES_OK)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
else:
iperf_status = True
iperf_noperf = False
@@ -2412,7 +2532,7 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'OK', len(self.UEDevices), html_queue)
else:
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
def CheckProcessExist(self, check_eNB, check_OAI_UE,RAN,EPC):
multi_jobs = []
@@ -2832,7 +2952,7 @@ class OaiCiTest():
job.join()
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
def TerminateOAIUE(self,HTML,RAN,COTS_UE):
def TerminateOAIUE(self,HTML,RAN,COTS_UE,EPC):
SSH = sshconnection.SSHConnection()
SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
SSH.command('cd ' + self.UESourceCodePath + '/cmake_targets', '\$', 5)
@@ -2873,11 +2993,11 @@ class OaiCiTest():
# Not an error then
if (logStatus != CONST.OAI_UE_PROCESS_COULD_NOT_SYNC) or (ueAction != 'Sniffing'):
self.Initialize_OAI_UE_args = ''
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
else:
if (logStatus == CONST.OAI_UE_PROCESS_COULD_NOT_SYNC):
self.Initialize_OAI_UE_args = ''
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE)
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
else:
logging.debug('\u001B[1m' + ueAction + ' Completed \u001B[0m')
HTML.htmlUEFailureMsg='<b>' + ueAction + ' Completed</b>\n' + HTML.htmlUEFailureMsg
@@ -2886,7 +3006,7 @@ class OaiCiTest():
else:
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
def AutoTerminateUEandeNB(self,HTML,RAN,COTS_UE):
def AutoTerminateUEandeNB(self,HTML,RAN,COTS_UE,EPC):
if (self.ADBIPAddress != 'none'):
self.testCase_id = 'AUTO-KILL-UE'
HTML.testCase_id=self.testCase_id
@@ -2900,15 +3020,19 @@ class OaiCiTest():
self.desc = 'Automatic Termination of OAI-UE'
HTML.desc='Automatic Termination of OAI-UE'
self.ShowTestID()
self.TerminateOAIUE(HTML,RAN,COTS_UE)
self.TerminateOAIUE(HTML,RAN,COTS_UE,EPC)
if (RAN.Initialize_eNB_args != ''):
self.testCase_id = 'AUTO-KILL-eNB'
self.testCase_id = 'AUTO-KILL-RAN'
HTML.testCase_id=self.testCase_id
self.desc = 'Automatic Termination of eNB'
HTML.desc='Automatic Termination of eNB'
self.desc = 'Automatic Termination of all RAN nodes'
HTML.desc='Automatic Termination of RAN nodes'
self.ShowTestID()
RAN.eNB_instance=0
RAN.TerminateeNB()
#terminate all RAN nodes eNB/gNB/OCP
for instance in range(0, len(RAN.air_interface)):
if RAN.air_interface[instance]!='':
logging.debug('Auto Termination of Instance ' + str(instance) + ' : ' + RAN.air_interface[instance])
RAN.eNB_instance=instance
RAN.TerminateeNB(HTML,EPC)
if RAN.flexranCtrlInstalled and RAN.flexranCtrlStarted:
self.testCase_id = 'AUTO-KILL-flexran-ctl'
HTML.testCase_id=self.testCase_id
@@ -3050,7 +3174,7 @@ class OaiCiTest():
SSH.command('cd ' + SourceCodePath, '\$', 5)
SSH.command('cd cmake_targets', '\$', 5)
SSH.command('rm -f build.log.zip', '\$', 5)
SSH.command('zip build.log.zip build_log_*/*', '\$', 60)
SSH.command('zip -r build.log.zip build_log_*/*', '\$', 60)
SSH.close()
def LogCollectPing(self,EPC):

View File

@@ -215,7 +215,7 @@ log_config = {
NETWORK_CONTROLLER : {
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -215,7 +215,7 @@ log_config = {
NETWORK_CONTROLLER : {
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -215,7 +215,7 @@ log_config = {
NETWORK_CONTROLLER : {
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -112,7 +112,7 @@ log_config = {
NETWORK_CONTROLLER : {
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -112,7 +112,7 @@ log_config = {
NETWORK_CONTROLLER : {
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -112,7 +112,7 @@ log_config = {
NETWORK_CONTROLLER : {
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -239,7 +239,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "eth0";
FLEXRAN_IPV4_ADDRESS = "CI_MME_IP_ADDR";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -448,7 +448,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -251,7 +251,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "eth0";
FLEXRAN_IPV4_ADDRESS = "CI_MME_IP_ADDR";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -395,7 +395,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "eth0";
FLEXRAN_IPV4_ADDRESS = "CI_MME_IP_ADDR";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -228,7 +228,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -228,7 +228,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -228,7 +228,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -226,7 +226,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -247,7 +247,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -256,7 +256,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "eth0";
FLEXRAN_IPV4_ADDRESS = "CI_MME_IP_ADDR";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -28,83 +28,85 @@ eNBs =
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;
pbch_repetition = "FALSE";
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 0;
pucch_nCS_AN = 0;
pucch_n1_AN = 0;
pdsch_referenceSignalPower = -25;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -96;
pusch_alpha = "AL1";
pucch_p0_Nominal = -104;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
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;
pbch_repetition = "FALSE";
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 0;
pucch_nCS_AN = 0;
pucch_n1_AN = 0;
pdsch_referenceSignalPower= -25;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;
*/
rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
pusch_p0_Nominal = -96;
pusch_alpha = "AL1";
pucch_p0_Nominal = -104;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
//Parameters for SIB18
rxPool_sc_CP_Len = "normal";
@@ -116,27 +118,28 @@ eNBs =
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
rxPool_ResourceConfig_offsetIndicator_choice = 0;
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
/* rxPool_dataHoppingConfig_hoppingParameter = 0;
rxPool_dataHoppingConfig_numSubbands = "ns1";
rxPool_dataHoppingConfig_rbOffset = 0;
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
/*
rxPool_dataHoppingConfig_hoppingParameter = 0;
rxPool_dataHoppingConfig_numSubbands = "ns1";
rxPool_dataHoppingConfig_rbOffset = 0;
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
*/
// Parameters for SIB19
discRxPool_cp_Len = "normal"
discRxPool_discPeriod = "rf32"
discRxPool_numRetx = 1;
discRxPool_numRepetition = 2;
discRxPool_ResourceConfig_prb_Num = 5;
discRxPool_ResourceConfig_prb_Start = 3;
discRxPool_ResourceConfig_prb_End = 21;
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
discRxPool_cp_Len = "normal"
discRxPool_discPeriod = "rf32"
discRxPool_numRetx = 1;
discRxPool_numRepetition = 2;
discRxPool_ResourceConfig_prb_Num = 5;
discRxPool_ResourceConfig_prb_Start = 3;
discRxPool_ResourceConfig_prb_End = 21;
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size= 5;
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
}
@@ -204,40 +207,43 @@ eNBs =
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
phy_test_mode = 0;
puSch10xSnr = 160;
puCch10xSnr = 160;
}
MACRLCs =
(
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
phy_test_mode = 0;
puSch10xSnr = 160;
puCch10xSnr = 160;
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
L1s =
(
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
eNB_instances = [0];
}
RUs =
(
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
eNB_instances = [0];
}
);
THREAD_STRUCT = (
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";
@@ -250,27 +256,27 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "eth0";
FLEXRAN_IPV4_ADDRESS = "CI_MME_IP_ADDR";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";
};
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";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
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";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};

View File

@@ -255,7 +255,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -266,7 +266,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 118;
eNB_instances = [0];
clock_src = "external";
# clock_src = "external";
}
);

View File

@@ -249,7 +249,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -244,7 +244,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "eth0";
FLEXRAN_IPV4_ADDRESS = "CI_MME_IP_ADDR";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -2,6 +2,7 @@ Active_gNBs = ( "gNB-Eurecom-5GNRBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
@@ -21,7 +22,10 @@ gNBs =
ssb_SubcarrierOffset = 31; //0;
pdsch_AntennaPorts = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = (
{
#spCellConfigCommon
@@ -246,6 +250,7 @@ L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 8;
}
);
@@ -260,7 +265,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
clock_src = "external";
# clock_src = "external";
}
);

View File

@@ -235,7 +235,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -235,7 +235,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -235,7 +235,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -254,7 +254,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -254,7 +254,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -254,7 +254,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";

View File

@@ -1,23 +1,25 @@
RUs = (
{
local_if_name = "lo";
remote_address = "127.0.0.1"
local_address = "127.0.0.2";
local_portc = 50000;
remote_portc = 50000;
local_portd = 50001;
remote_portd = 50001;
local_rf = "yes"
tr_preference = "udp_if4p5";
nb_tx = 1;
nb_rx = 1;
max_pdschReferenceSignalPower = -27;
max_rxgain = 115;
bands = [7];
}
RUs =
(
{
local_if_name = "lo";
remote_address = "127.0.0.1"
local_address = "127.0.0.2";
local_portc = 50000;
remote_portc = 50000;
local_portd = 50001;
remote_portd = 50001;
local_rf = "yes"
tr_preference = "udp_if4p5";
nb_tx = 1;
nb_rx = 1;
max_pdschReferenceSignalPower = -27;
max_rxgain = 115;
bands = [7];
}
);
THREAD_STRUCT = (
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";
@@ -26,19 +28,20 @@ THREAD_STRUCT = (
}
);
log_config = {
global_log_level ="error";
global_log_verbosity ="medium";
hw_log_level ="error";
hw_log_verbosity ="medium";
phy_log_level ="error";
phy_log_verbosity ="medium";
mac_log_level ="error";
mac_log_verbosity ="high";
rlc_log_level ="error";
rlc_log_verbosity ="medium";
pdcp_log_level ="error";
pdcp_log_verbosity ="medium";
rrc_log_level ="error";
rrc_log_verbosity ="medium";
log_config =
{
global_log_level ="error";
global_log_verbosity ="medium";
hw_log_level ="error";
hw_log_verbosity ="medium";
phy_log_level ="error";
phy_log_verbosity ="medium";
mac_log_level ="error";
mac_log_verbosity ="high";
rlc_log_level ="error";
rlc_log_verbosity ="medium";
pdcp_log_level ="error";
pdcp_log_verbosity ="medium";
rrc_log_level ="error";
rrc_log_verbosity ="medium";
};

View File

@@ -1,23 +1,25 @@
RUs = (
{
local_if_name = "lo";
remote_address = "127.0.0.1"
local_address = "127.0.0.2";
local_portc = 50000;
remote_portc = 50000;
local_portd = 50001;
remote_portd = 50001;
local_rf = "yes"
tr_preference = "udp_if4p5";
nb_tx = 1;
nb_rx = 1;
max_pdschReferenceSignalPower = -27;
max_rxgain = 115;
bands = [40];
}
RUs =
(
{
local_if_name = "lo";
remote_address = "127.0.0.1"
local_address = "127.0.0.2";
local_portc = 50000;
remote_portc = 50000;
local_portd = 50001;
remote_portd = 50001;
local_rf = "yes"
tr_preference = "udp_if4p5";
nb_tx = 1;
nb_rx = 1;
max_pdschReferenceSignalPower = -27;
max_rxgain = 115;
bands = [40];
}
);
THREAD_STRUCT = (
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";
@@ -26,19 +28,20 @@ THREAD_STRUCT = (
}
);
log_config = {
global_log_level ="error";
global_log_verbosity ="medium";
hw_log_level ="error";
hw_log_verbosity ="medium";
phy_log_level ="error";
phy_log_verbosity ="medium";
mac_log_level ="error";
mac_log_verbosity ="high";
rlc_log_level ="error";
rlc_log_verbosity ="medium";
pdcp_log_level ="error";
pdcp_log_verbosity ="medium";
rrc_log_level ="error";
rrc_log_verbosity ="medium";
log_config =
{
global_log_level ="error";
global_log_verbosity ="medium";
hw_log_level ="error";
hw_log_verbosity ="medium";
phy_log_level ="error";
phy_log_verbosity ="medium";
mac_log_level ="error";
mac_log_verbosity ="high";
rlc_log_level ="error";
rlc_log_verbosity ="medium";
pdcp_log_level ="error";
pdcp_log_verbosity ="medium";
rrc_log_level ="error";
rrc_log_verbosity ="medium";
};

View File

@@ -59,6 +59,7 @@ OAI_UE_PROCESS_NO_TUNNEL_INTERFACE = -24
OAI_UE_PROCESS_SEG_FAULT = -25
OAI_UE_PROCESS_NO_MBMS_MSGS = -26
OAI_UE_PROCESS_OK = +6
INVALID_PARAMETER = -50
UE_STATUS_DETACHED = 0
UE_STATUS_DETACHING = 1

View File

@@ -46,7 +46,6 @@ from multiprocessing import Process, Lock, SimpleQueue
import sshconnection as SSH
import helpreadme as HELP
import constants as CONST
import html
#-----------------------------------------------------------
# Class Declaration
@@ -61,18 +60,18 @@ class EPCManagement():
self.SourceCodePath = ''
self.Type = ''
self.PcapFileName = ''
self.htmlObj = None
self.testCase_id = ''
self.MmeIPAddress = ''
self.containerPrefix = 'prod'
self.mmeConfFile = 'mme.conf'
self.yamlPath = ''
#-----------------------------------------------------------
# EPC management functions
#-----------------------------------------------------------
def InitializeHSS(self):
def InitializeHSS(self, HTML):
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
HELP.GenericHelp(CONST.Version)
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
@@ -114,10 +113,9 @@ class EPCManagement():
else:
logging.error('This option should not occur!')
mySSH.close()
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
def InitializeMME(self):
def InitializeMME(self, HTML):
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
HELP.GenericHelp(CONST.Version)
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
@@ -153,8 +151,7 @@ class EPCManagement():
else:
logging.error('This option should not occur!')
mySSH.close()
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
def SetMmeIPAddress(self):
# Not an error if we don't need an EPC
@@ -175,7 +172,7 @@ class EPCManagement():
else:
self.MmeIPAddress = self.IPAddress
def InitializeSPGW(self):
def InitializeSPGW(self, HTML):
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
HELP.GenericHelp(CONST.Version)
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
@@ -212,15 +209,14 @@ class EPCManagement():
else:
logging.error('This option should not occur!')
mySSH.close()
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
def CheckHSSProcess(self, status_queue):
try:
mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-hss /bin/bash -c "ps aux | grep oai_hss"', '\$', 5)
mySSH.command('docker top ' + self.containerPrefix + '-oai-hss', '\$', 5)
else:
mySSH.command('stdbuf -o0 ps -aux | grep --color=never hss | grep -v grep', '\$', 5)
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
@@ -245,7 +241,7 @@ class EPCManagement():
mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-mme /bin/bash -c "ps aux | grep oai_mme"', '\$', 5)
mySSH.command('docker top ' + self.containerPrefix + '-oai-mme', '\$', 5)
else:
mySSH.command('stdbuf -o0 ps -aux | grep --color=never mme | grep -v grep', '\$', 5)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
@@ -272,11 +268,11 @@ class EPCManagement():
mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "ps aux | grep oai_spgwc"', '\$', 5)
result = re.search('oai_spgwc -o -c ', mySSH.getBefore())
mySSH.command('docker top ' + self.containerPrefix + '-oai-spgwc', '\$', 5)
result = re.search('oai_spgwc -', mySSH.getBefore())
if result is not None:
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "ps aux | grep oai_spgwu"', '\$', 5)
result = re.search('oai_spgwu -o -c ', mySSH.getBefore())
mySSH.command('docker top ' + self.containerPrefix + '-oai-spgwu-tiny', '\$', 5)
result = re.search('oai_spgwu -', mySSH.getBefore())
elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
mySSH.command('stdbuf -o0 ps -aux | grep --color=never spgw | grep -v grep', '\$', 5)
result = re.search('spgwu -c ', mySSH.getBefore())
@@ -297,7 +293,7 @@ class EPCManagement():
except:
os.kill(os.getppid(),signal.SIGUSR1)
def TerminateHSS(self):
def TerminateHSS(self, HTML):
mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
@@ -330,10 +326,9 @@ class EPCManagement():
else:
logging.error('This should not happen!')
mySSH.close()
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
def TerminateMME(self):
def TerminateMME(self, HTML):
mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
@@ -357,10 +352,9 @@ class EPCManagement():
else:
logging.error('This should not happen!')
mySSH.close()
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
def TerminateSPGW(self):
def TerminateSPGW(self, HTML):
mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
@@ -401,8 +395,155 @@ class EPCManagement():
else:
logging.error('This should not happen!')
mySSH.close()
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
def DeployEpc(self, HTML):
logging.debug('Trying to deploy')
if not re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
HTML.CreateHtmlTabFooter(False)
sys.exit('Deploy not possible with this EPC type: ' + self.Type)
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
HELP.GenericHelp(CONST.Version)
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
sys.exit('Insufficient EPC Parameters')
mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password)
mySSH.command('docker-compose --version', '\$', 5)
result = re.search('docker-compose version 1', mySSH.getBefore())
if result is None:
mySSH.close()
HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
HTML.CreateHtmlTabFooter(False)
sys.exit('docker-compose not installed on ' + self.IPAddress)
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
mySSH.command('if [ -d ' + self.SourceCodePath + '/logs ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/logs ; fi', '\$', 5)
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts ' + self.SourceCodePath + '/logs', '\$', 5)
# deploying and configuring the cassandra database
# container names and services are currently hard-coded.
# they could be recovered by:
# - docker-compose config --services
# - docker-compose config | grep container_name
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/docker-compose.yml', self.SourceCodePath + '/scripts')
mySSH.command('wget --quiet --tries=3 --retry-connrefused https://raw.githubusercontent.com/OPENAIRINTERFACE/openair-hss/develop/src/hss_rel14/db/oai_db.cql', '\$', 30)
mySSH.command('docker-compose down', '\$', 60)
mySSH.command('docker-compose up -d db_init', '\$', 60)
# databases take time...
time.sleep(10)
cnt = 0
db_init_status = False
while (cnt < 10):
mySSH.command('docker logs prod-db-init', '\$', 5)
result = re.search('OK', mySSH.getBefore())
if result is not None:
cnt = 10
db_init_status = True
else:
time.sleep(5)
cnt += 1
mySSH.command('docker rm -f prod-db-init', '\$', 5)
if not db_init_status:
HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
HTML.CreateHtmlTabFooter(False)
sys.exit('Cassandra DB deployment/configuration went wrong!')
# deploying EPC cNFs
mySSH.command('docker-compose up -d oai_spgwu', '\$', 60)
listOfContainers = 'prod-cassandra prod-oai-hss prod-oai-mme prod-oai-spgwc prod-oai-spgwu-tiny'
expectedHealthyContainers = 5
# Checking for additional services
mySSH.command('docker-compose config', '\$', 5)
configResponse = mySSH.getBefore()
if configResponse.count('flexran_rtc') == 1:
mySSH.command('docker-compose up -d flexran_rtc', '\$', 60)
listOfContainers += ' prod-flexran-rtc'
expectedHealthyContainers += 1
if configResponse.count('trf_gen') == 1:
mySSH.command('docker-compose up -d trf_gen', '\$', 60)
listOfContainers += ' prod-trf-gen'
expectedHealthyContainers += 1
# Checking if all are healthy
cnt = 0
while (cnt < 3):
mySSH.command('docker inspect --format=\'{{.State.Health.Status}}\' ' + listOfContainers, '\$', 10)
unhealthyNb = mySSH.getBefore().count('unhealthy')
healthyNb = mySSH.getBefore().count('healthy') - unhealthyNb
startingNb = mySSH.getBefore().count('starting')
if healthyNb == expectedHealthyContainers:
cnt = 10
else:
time.sleep(10)
cnt += 1
logging.debug(' -- ' + str(healthyNb) + ' healthy container(s)')
logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)')
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
if healthyNb == expectedHealthyContainers:
mySSH.command('docker exec -d prod-oai-hss /bin/bash -c "nohup tshark -i any -f \'port 9042 or port 3868\' -w /tmp/hss_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
mySSH.command('docker exec -d prod-oai-mme /bin/bash -c "nohup tshark -i any -f \'port 3868 or port 2123 or port 36412\' -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
mySSH.command('docker exec -d prod-oai-spgwc /bin/bash -c "nohup tshark -i any -f \'port 2123 or port 8805\' -w /tmp/spgwc_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
# on SPGW-U, not capturing on SGI to avoid huge file
mySSH.command('docker exec -d prod-oai-spgwu-tiny /bin/bash -c "nohup tshark -i any -f \'port 8805\' -w /tmp/spgwu_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
mySSH.close()
logging.debug('Deployment OK')
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
else:
mySSH.close()
logging.debug('Deployment went wrong')
HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
def UndeployEpc(self, HTML):
logging.debug('Trying to undeploy')
# No check down, we suppose everything done before.
mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password)
# Recovering logs and pcap files
mySSH.command('cd ' + self.SourceCodePath + '/logs', '\$', 5)
mySSH.command('docker exec -it prod-oai-hss /bin/bash -c "killall --signal SIGINT oai_hss tshark"', '\$', 5)
mySSH.command('docker exec -it prod-oai-mme /bin/bash -c "killall --signal SIGINT tshark"', '\$', 5)
mySSH.command('docker exec -it prod-oai-spgwc /bin/bash -c "killall --signal SIGINT oai_spgwc tshark"', '\$', 5)
mySSH.command('docker exec -it prod-oai-spgwu-tiny /bin/bash -c "killall --signal SIGINT tshark"', '\$', 5)
mySSH.command('docker logs prod-oai-hss > hss_' + self.testCase_id + '.log', '\$', 5)
mySSH.command('docker logs prod-oai-mme > mme_' + self.testCase_id + '.log', '\$', 5)
mySSH.command('docker logs prod-oai-spgwc > spgwc_' + self.testCase_id + '.log', '\$', 5)
mySSH.command('docker logs prod-oai-spgwu-tiny > spgwu_' + self.testCase_id + '.log', '\$', 5)
mySSH.command('docker cp prod-oai-hss:/tmp/hss_check_run.pcap hss_' + self.testCase_id + '.pcap', '\$', 60)
mySSH.command('docker cp prod-oai-mme:/tmp/mme_check_run.pcap mme_' + self.testCase_id + '.pcap', '\$', 60)
mySSH.command('docker cp prod-oai-spgwc:/tmp/spgwc_check_run.pcap spgwc_' + self.testCase_id + '.pcap', '\$', 60)
mySSH.command('docker cp prod-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap spgwu_' + self.testCase_id + '.pcap', '\$', 60)
# Remove all
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
listOfContainers = 'prod-cassandra prod-oai-hss prod-oai-mme prod-oai-spgwc prod-oai-spgwu-tiny'
nbContainers = 5
# Checking for additional services
mySSH.command('docker-compose config', '\$', 5)
configResponse = mySSH.getBefore()
if configResponse.count('flexran_rtc') == 1:
listOfContainers += ' prod-flexran-rtc'
nbContainers += 1
if configResponse.count('trf_gen') == 1:
listOfContainers += ' prod-trf-gen'
nbContainers += 1
mySSH.command('docker-compose down', '\$', 60)
mySSH.command('docker inspect --format=\'{{.State.Health.Status}}\' ' + listOfContainers, '\$', 10)
noMoreContainerNb = mySSH.getBefore().count('No such object')
mySSH.command('docker inspect --format=\'{{.Name}}\' prod-oai-public-net prod-oai-private-net', '\$', 10)
noMoreNetworkNb = mySSH.getBefore().count('No such object')
mySSH.close()
if noMoreContainerNb == nbContainers and noMoreNetworkNb == 2:
logging.debug('Undeployment OK')
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
else:
logging.debug('Undeployment went wrong')
HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
def LogCollectHSS(self):
mySSH = SSH.SSHConnection()
@@ -410,9 +551,17 @@ class EPCManagement():
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
mySSH.command('rm -f hss.log.zip', '\$', 5)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/openair-hss/hss_check_run.log .', '\$', 60)
mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/tmp/hss_check_run.pcap .', '\$', 60)
mySSH.command('zip hss.log.zip hss_check_run.*', '\$', 60)
mySSH.command('docker inspect prod-oai-hss', '\$', 10)
result = re.search('No such object', mySSH.getBefore())
if result is not None:
mySSH.command('cd ../logs', '\$', 5)
mySSH.command('rm -f hss.log.zip', '\$', 5)
mySSH.command('zip hss.log.zip hss_*.*', '\$', 60)
mySSH.command('mv hss.log.zip ../scripts', '\$', 60)
else:
mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/openair-hss/hss_check_run.log .', '\$', 60)
mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/tmp/hss_check_run.pcap .', '\$', 60)
mySSH.command('zip hss.log.zip hss_check_run.*', '\$', 60)
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
mySSH.command('zip hss.log.zip hss*.log', '\$', 60)
mySSH.command('echo ' + self.Password + ' | sudo -S rm hss*.log', '\$', 5)
@@ -432,9 +581,17 @@ class EPCManagement():
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
mySSH.command('rm -f mme.log.zip', '\$', 5)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/openair-mme/mme_check_run.log .', '\$', 60)
mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/tmp/mme_check_run.pcap .', '\$', 60)
mySSH.command('zip mme.log.zip mme_check_run.*', '\$', 60)
mySSH.command('docker inspect prod-oai-mme', '\$', 10)
result = re.search('No such object', mySSH.getBefore())
if result is not None:
mySSH.command('cd ../logs', '\$', 5)
mySSH.command('rm -f mme.log.zip', '\$', 5)
mySSH.command('zip mme.log.zip mme_*.*', '\$', 60)
mySSH.command('mv mme.log.zip ../scripts', '\$', 60)
else:
mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/openair-mme/mme_check_run.log .', '\$', 60)
mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/tmp/mme_check_run.pcap .', '\$', 60)
mySSH.command('zip mme.log.zip mme_check_run.*', '\$', 60)
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
mySSH.command('zip mme.log.zip mme*.log', '\$', 60)
mySSH.command('echo ' + self.Password + ' | sudo -S rm mme*.log', '\$', 5)
@@ -451,11 +608,19 @@ class EPCManagement():
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
mySSH.command('rm -f spgw.log.zip', '\$', 5)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwc:/openair-spgwc/spgwc_check_run.log .', '\$', 60)
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwu-tiny:/openair-spgwu-tiny/spgwu_check_run.log .', '\$', 60)
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwc:/tmp/spgwc_check_run.pcap .', '\$', 60)
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap .', '\$', 60)
mySSH.command('zip spgw.log.zip spgw*_check_run.*', '\$', 60)
mySSH.command('docker inspect prod-oai-mme', '\$', 10)
result = re.search('No such object', mySSH.getBefore())
if result is not None:
mySSH.command('cd ../logs', '\$', 5)
mySSH.command('rm -f spgw.log.zip', '\$', 5)
mySSH.command('zip spgw.log.zip spgw*.*', '\$', 60)
mySSH.command('mv spgw.log.zip ../scripts', '\$', 60)
else:
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwc:/openair-spgwc/spgwc_check_run.log .', '\$', 60)
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwu-tiny:/openair-spgwu-tiny/spgwu_check_run.log .', '\$', 60)
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwc:/tmp/spgwc_check_run.pcap .', '\$', 60)
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap .', '\$', 60)
mySSH.command('zip spgw.log.zip spgw*_check_run.*', '\$', 60)
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
mySSH.command('zip spgw.log.zip spgw*.log', '\$', 60)
mySSH.command('echo ' + self.Password + ' | sudo -S rm spgw*.log', '\$', 5)

View File

@@ -218,7 +218,7 @@ class HTMLManagement():
self.htmlFile.write(' <div id="build-tab" class="tab-pane fade">\n')
self.htmlFile.write(' <table class="table" border = "1">\n')
self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n')
self.htmlFile.write(' <th>Relative Time (ms)</th>\n')
self.htmlFile.write(' <th>Relative Time (s)</th>\n')
self.htmlFile.write(' <th>Test Id</th>\n')
self.htmlFile.write(' <th>Test Desc</th>\n')
self.htmlFile.write(' <th>Test Options</th>\n')
@@ -399,6 +399,53 @@ class HTMLManagement():
self.htmlFile.write(' </tr>\n')
self.htmlFile.close()
def CreateHtmlNextTabHeaderTestRow(self, collectInfo, allImagesSize, machine='eNB'):
if (self.htmlFooterCreated or (not self.htmlHeaderCreated)):
return
self.htmlFile = open('test_results.html', 'a')
if bool(collectInfo) == False:
self.htmlFile.write(' <tr bgcolor = "red" >\n')
self.htmlFile.write(' <td colspan=' + str(5+self.htmlUEConnected) + '><b> ----IMAGES BUILDING FAILED - Unable to recover the image logs ---- </b></td>\n')
self.htmlFile.write(' </tr>\n')
else:
for image in collectInfo:
files = collectInfo[image]
# TabHeader for image logs on built shared and target images
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
self.htmlFile.write(' <td colspan=' + str(5+self.htmlUEConnected) + '><b> ---- ' + image + ' IMAGE STATUS ----> Size ' + allImagesSize[image] + ' </b></td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n')
self.htmlFile.write(' <th colspan="2">Element</th>\n')
self.htmlFile.write(' <th>Nb Errors</th>\n')
self.htmlFile.write(' <th>Nb Warnings</th>\n')
self.htmlFile.write(' <th colspan=' + str(1+self.htmlUEConnected) + '>Status</th>\n')
self.htmlFile.write(' </tr>\n')
for fil in files:
parameters = files[fil]
# TestRow for image logs on built shared and target images
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" >' + fil + ' </td>\n')
if (parameters['errors'] == 0):
self.htmlFile.write(' <td bgcolor = "green" >' + str(parameters['errors']) + '</td>\n')
else:
self.htmlFile.write(' <td bgcolor = "red" >' + str(parameters['errors']) + '</td>\n')
if (parameters['warnings'] == 0):
self.htmlFile.write(' <td bgcolor = "green" >' + str(parameters['warnings']) + '</td>\n')
elif ((parameters['warnings'] > 0) and (parameters['warnings'] <= 20)):
self.htmlFile.write(' <td bgcolor = "orange" >' + str(parameters['warnings']) + '</td>\n')
else:
self.htmlFile.write(' <td bgcolor = "red" >' + str(parameters['warnings']) + '</td>\n')
if (parameters['errors'] == 0) and (parameters['warnings'] == 0):
self.htmlFile.write(' <th colspan=' + str(1+self.htmlUEConnected) + ' bgcolor = "green" ><font color="white">OK </font></th>\n')
elif (parameters['errors'] == 0) and ((parameters['warnings'] > 0) and (parameters['warnings'] <= 20)):
self.htmlFile.write(' <th colspan=' + str(1+self.htmlUEConnected) + ' bgcolor = "orange" ><font color="white">OK </font></th>\n')
else:
self.htmlFile.write(' <th colspan=' + str(1+self.htmlUEConnected) + ' bgcolor = "red" > NOT OK </th>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.close()
def CreateHtmlTestRowQueue(self, options, status, ue_status, ue_queue):
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
self.htmlFile = open('test_results.html', 'a')

View File

@@ -41,6 +41,7 @@ import constants as CONST
import cls_oaicitest #main class for OAI CI test framework
import cls_physim #class PhySim for physical simulators build and test
import cls_cots_ue #class CotsUe for Airplane mode control
import cls_containerize #class Containerize for all container-based operations on RAN/UE objects
import sshconnection
@@ -98,24 +99,34 @@ def AssignParams(params_dict):
def GetParametersFromXML(action):
if action == 'Build_eNB':
if action == 'Build_eNB' or action == 'Build_Image':
RAN.Build_eNB_args=test.findtext('Build_eNB_args')
CONTAINERS.imageKind=test.findtext('kind')
forced_workspace_cleanup = test.findtext('forced_workspace_cleanup')
if (forced_workspace_cleanup is None):
RAN.Build_eNB_forced_workspace_cleanup=False
CONTAINERS.forcedWorkspaceCleanup=False
else:
if re.match('true', forced_workspace_cleanup, re.IGNORECASE):
RAN.Build_eNB_forced_workspace_cleanup=True
CONTAINERS.forcedWorkspaceCleanup=True
else:
RAN.Build_eNB_forced_workspace_cleanup=False
RAN.Build_eNB_forced_workspace_cleanup=True
CONTAINERS.forcedWorkspaceCleanup=False
eNB_instance=test.findtext('eNB_instance')
if (eNB_instance is None):
RAN.eNB_instance=0
CONTAINERS.eNB_instance=0
else:
RAN.eNB_instance=int(eNB_instance)
RAN.eNB_serverId=test.findtext('eNB_serverId')
if (RAN.eNB_serverId is None):
RAN.eNB_serverId='0'
CONTAINERS.eNB_instance=int(eNB_instance)
eNB_serverId=test.findtext('eNB_serverId')
if (eNB_serverId is None):
RAN.eNB_serverId[RAN.eNB_instance]='0'
CONTAINERS.eNB_serverId[RAN.eNB_instance]='0'
else:
RAN.eNB_serverId[RAN.eNB_instance]=eNB_serverId
CONTAINERS.eNB_serverId[CONTAINERS.eNB_instance]=eNB_serverId
xmlBgBuildField = test.findtext('backgroundBuild')
if (xmlBgBuildField is None):
RAN.backgroundBuild=False
@@ -132,9 +143,11 @@ def GetParametersFromXML(action):
RAN.eNB_instance=0
else:
RAN.eNB_instance=int(eNB_instance)
RAN.eNB_serverId=test.findtext('eNB_serverId')
if (RAN.eNB_serverId is None):
RAN.eNB_serverId='0'
eNB_serverId=test.findtext('eNB_serverId')
if (eNB_serverId is None):
RAN.eNB_serverId[RAN.eNB_instance]='0'
else:
RAN.eNB_serverId[RAN.eNB_instance]=eNB_serverId
elif action == 'Initialize_eNB':
RAN.Initialize_eNB_args=test.findtext('Initialize_eNB_args')
@@ -143,9 +156,11 @@ def GetParametersFromXML(action):
RAN.eNB_instance=0
else:
RAN.eNB_instance=int(eNB_instance)
RAN.eNB_serverId=test.findtext('eNB_serverId')
if (RAN.eNB_serverId is None):
RAN.eNB_serverId='0'
eNB_serverId=test.findtext('eNB_serverId')
if (eNB_serverId is None):
RAN.eNB_serverId[RAN.eNB_instance]='0'
else:
RAN.eNB_serverId[RAN.eNB_instance]=eNB_serverId
#local variable air_interface
air_interface = test.findtext('air_interface')
@@ -162,10 +177,12 @@ def GetParametersFromXML(action):
RAN.eNB_instance=0
else:
RAN.eNB_instance=int(eNB_instance)
RAN.eNB_serverId=test.findtext('eNB_serverId')
if (RAN.eNB_serverId is None):
RAN.eNB_serverId='0'
eNB_serverId=test.findtext('eNB_serverId')
if (eNB_serverId is None):
RAN.eNB_serverId[RAN.eNB_instance]='0'
else:
RAN.eNB_serverId[RAN.eNB_instance]=eNB_serverId
#local variable air_interface
air_interface = test.findtext('air_interface')
if (air_interface is None) or (air_interface.lower() not in ['nr','lte','ocp']):
@@ -288,6 +305,27 @@ def GetParametersFromXML(action):
if (string_field is not None):
EPC.mmeConfFile = string_field
elif action == 'Deploy_EPC':
string_field = test.findtext('parameters')
if (string_field is not None):
EPC.yamlPath = string_field
elif action == 'Deploy_Object' or action == 'Undeploy_Object':
eNB_instance=test.findtext('eNB_instance')
if (eNB_instance is None):
CONTAINERS.eNB_instance=0
else:
CONTAINERS.eNB_instance=int(eNB_instance)
eNB_serverId=test.findtext('eNB_serverId')
if (eNB_serverId is None):
CONTAINERS.eNB_serverId[CONTAINERS.eNB_instance]='0'
else:
CONTAINERS.eNB_serverId[CONTAINERS.eNB_instance]=eNB_serverId
string_field = test.findtext('yaml_path')
if (string_field is not None):
CONTAINERS.yamlPath[CONTAINERS.eNB_instance] = string_field
else: # ie action == 'Run_PhySim':
ldpc.runargs = test.findtext('physim_run_args')
@@ -339,11 +377,7 @@ SSH = sshconnection.SSHConnection()
EPC = epc.EPCManagement()
RAN = ran.RANManagement()
HTML = html.HTMLManagement()
EPC.htmlObj=HTML
RAN.htmlObj=HTML
RAN.epcObj=EPC
CONTAINERS = cls_containerize.Containerize()
ldpc=cls_physim.PhySim() #create an instance for LDPC test using GPU or CPU build
@@ -354,7 +388,7 @@ ldpc=cls_physim.PhySim() #create an instance for LDPC test using GPU or CPU b
#-----------------------------------------------------------
import args_parse
py_param_file_present, py_params, mode = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,EPC,ldpc,HELP)
py_param_file_present, py_params, mode = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP)
@@ -383,10 +417,10 @@ if re.match('^TerminateeNB$', mode, re.IGNORECASE):
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
RAN.eNB_serverId='0'
RAN.eNB_instance=0
RAN.eNB_serverId[0]='0'
RAN.eNBSourceCodePath='/tmp/'
RAN.TerminateeNB()
RAN.TerminateeNB(HTML, EPC)
elif re.match('^TerminateUE$', mode, re.IGNORECASE):
if (CiTestObj.ADBIPAddress == '' or CiTestObj.ADBUserName == '' or CiTestObj.ADBPassword == ''):
HELP.GenericHelp(CONST.Version)
@@ -398,22 +432,22 @@ elif re.match('^TerminateOAIUE$', mode, re.IGNORECASE):
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
signal.signal(signal.SIGUSR1, receive_signal)
CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE)
CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC)
elif re.match('^TerminateHSS$', mode, re.IGNORECASE):
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
EPC.TerminateHSS()
EPC.TerminateHSS(HTML)
elif re.match('^TerminateMME$', mode, re.IGNORECASE):
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
EPC.TerminateMME()
EPC.TerminateMME(HTML)
elif re.match('^TerminateSPGW$', mode, re.IGNORECASE):
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath== '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
EPC.TerminateSPGW()
EPC.TerminateSPGW(HTML)
elif re.match('^LogCollectBuild$', mode, re.IGNORECASE):
if (RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '') and (CiTestObj.UEIPAddress == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '' or CiTestObj.UESourceCodePath == ''):
HELP.GenericHelp(CONST.Version)
@@ -495,7 +529,7 @@ elif re.match('^FinalizeHtml$', mode, re.IGNORECASE):
HTML.CreateHtmlFooter(CiTestObj.finalStatus)
elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re.IGNORECASE):
logging.debug('\u001B[1m----------------------------------------\u001B[0m')
logging.debug('\u001B[1m Starting Scenario \u001B[0m')
logging.debug('\u001B[1m Starting Scenario: ' + CiTestObj.testXMLfiles[0] + '\u001B[0m')
logging.debug('\u001B[1m----------------------------------------\u001B[0m')
if re.match('^TesteNB$', mode, re.IGNORECASE):
if RAN.eNBIPAddress == '' or RAN.ranRepository == '' or RAN.ranBranch == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '' or EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '' or CiTestObj.ADBIPAddress == '' or CiTestObj.ADBUserName == '' or CiTestObj.ADBPassword == '':
@@ -566,7 +600,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
logging.debug('ERROR: requested test is invalidly formatted: ' + test)
sys.exit(1)
if (EPC.IPAddress != '') and (EPC.IPAddress != 'none'):
CiTestObj.CheckFlexranCtrlInstallation(RAN,EPC)
CiTestObj.CheckFlexranCtrlInstallation(RAN,EPC,CONTAINERS)
EPC.SetMmeIPAddress()
#get the list of tests to be done
@@ -626,17 +660,16 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
RAN.prematureExit = True
break
if action == 'Build_eNB':
RAN.BuildeNB()
RAN.BuildeNB(HTML)
elif action == 'WaitEndBuild_eNB':
RAN.WaitBuildeNBisFinished()
RAN.WaitBuildeNBisFinished(HTML)
elif action == 'Initialize_eNB':
check_eNB = False
check_OAI_UE = False
RAN.pStatus=CiTestObj.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
RAN.InitializeeNB()
RAN.InitializeeNB(HTML, EPC)
elif action == 'Terminate_eNB':
RAN.TerminateeNB()
RAN.TerminateeNB(HTML, EPC)
elif action == 'Initialize_UE':
CiTestObj.InitializeUE(HTML,COTS_UE)
elif action == 'Terminate_UE':
@@ -656,17 +689,17 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif action == 'Initialize_OAI_UE':
CiTestObj.InitializeOAIUE(HTML,RAN,EPC,COTS_UE)
elif action == 'Terminate_OAI_UE':
CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE)
CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC)
elif action == 'Initialize_CatM_module':
CiTestObj.InitializeCatM(HTML)
elif action == 'Terminate_CatM_module':
CiTestObj.TerminateCatM(HTML)
elif action == 'Attach_CatM_module':
CiTestObj.AttachCatM(HTML,RAN,COTS_UE)
CiTestObj.AttachCatM(HTML,RAN,COTS_UE,EPC)
elif action == 'Detach_CatM_module':
CiTestObj.TerminateCatM(HTML)
elif action == 'Ping_CatM_module':
CiTestObj.PingCatM(HTML,RAN,EPC,COTS_UE)
CiTestObj.PingCatM(HTML,RAN,EPC,COTS_UE,EPC)
elif action == 'Ping':
CiTestObj.Ping(HTML,RAN,EPC,COTS_UE)
elif action == 'Iperf':
@@ -674,17 +707,21 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif action == 'Reboot_UE':
CiTestObj.RebootUE(HTML,RAN,EPC)
elif action == 'Initialize_HSS':
EPC.InitializeHSS()
EPC.InitializeHSS(HTML)
elif action == 'Terminate_HSS':
EPC.TerminateHSS()
EPC.TerminateHSS(HTML)
elif action == 'Initialize_MME':
EPC.InitializeMME()
EPC.InitializeMME(HTML)
elif action == 'Terminate_MME':
EPC.TerminateMME()
EPC.TerminateMME(HTML)
elif action == 'Initialize_SPGW':
EPC.InitializeSPGW()
EPC.InitializeSPGW(HTML)
elif action == 'Terminate_SPGW':
EPC.TerminateSPGW()
EPC.TerminateSPGW(HTML)
elif action == 'Deploy_EPC':
EPC.DeployEpc(HTML)
elif action == 'Undeploy_EPC':
EPC.UndeployEpc(HTML)
elif action == 'Initialize_FlexranCtrl':
CiTestObj.InitializeFlexranCtrl(HTML,RAN,EPC)
elif action == 'Terminate_FlexranCtrl':
@@ -698,6 +735,12 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
if ldpc.exitStatus==1:sys.exit()
elif action == 'Run_PhySim':
HTML=ldpc.Run_PhySim(HTML,CONST,id)
elif action == 'Build_Image':
CONTAINERS.BuildImage(HTML)
elif action == 'Deploy_Object':
CONTAINERS.DeployObject(HTML, EPC)
elif action == 'Undeploy_Object':
CONTAINERS.UndeployObject(HTML, RAN)
else:
sys.exit('Invalid class (action) from xml')
if not RAN.prematureExit:
@@ -707,14 +750,14 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML.testStabilityPointReached = True
CiTestObj.FailReportCnt += 1
if CiTestObj.FailReportCnt == CiTestObj.repeatCounts[0] and RAN.prematureExit:
logging.debug('Testsuite failed ' + str(CiTestObj.FailReportCnt) + ' time(s)')
logging.debug('Scenario failed ' + str(CiTestObj.FailReportCnt) + ' time(s)')
HTML.CreateHtmlTabFooter(False)
if CiTestObj.testUnstable and (CiTestObj.testStabilityPointReached or CiTestObj.testMinStableId == '999999'):
logging.debug('Scenario has reached minimal stability point -- Not a Failure')
else:
sys.exit('Failed Scenario')
else:
logging.info('Testsuite passed after ' + str(CiTestObj.FailReportCnt) + ' time(s)')
logging.info('Scenario passed after ' + str(CiTestObj.FailReportCnt) + ' time(s)')
HTML.CreateHtmlTabFooter(True)
elif re.match('^LoadParams$', mode, re.IGNORECASE):
pass

View File

@@ -42,10 +42,8 @@ from multiprocessing import Process, Lock, SimpleQueue
# OAI Testing modules
#-----------------------------------------------------------
import sshconnection as SSH
import epc
import helpreadme as HELP
import constants as CONST
import html
#-----------------------------------------------------------
# Class Declaration
@@ -77,19 +75,20 @@ class RANManagement():
self.backgroundBuildTestId = ['', '', '']
self.Build_eNB_forced_workspace_cleanup = False
self.Initialize_eNB_args = ''
self.imageKind = ''
self.air_interface = ['', '', ''] #changed from 'lte' to '' may lead to side effects in main
self.eNB_instance = 0
self.eNB_serverId = ''
self.eNB_serverId = ['', '', '']
self.eNBLogFiles = ['', '', '']
self.eNBOptions = ['', '', '']
self.eNBmbmsEnables = [False, False, False]
self.eNBstatuses = [-1, -1, -1]
self.flexranCtrlInstalled = False
self.flexranCtrlStarted = False
self.flexranCtrlDeployed = False
self.flexranCtrlIpAddress = ''
self.testCase_id = ''
self.epcPcapFile = ''
self.htmlObj = None
self.epcObj = None
self.runtime_stats= ''
@@ -98,21 +97,21 @@ class RANManagement():
# RAN management functions
#-----------------------------------------------------------
def BuildeNB(self):
def BuildeNB(self, HTML):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
if self.eNB_serverId == '0':
if self.eNB_serverId[self.eNB_instance] == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.eNB_serverId == '1':
elif self.eNB_serverId[self.eNB_instance] == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.eNB_serverId == '2':
elif self.eNB_serverId[self.eNB_instance] == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
@@ -120,6 +119,7 @@ class RANManagement():
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
logging.debug('Building on server: ' + lIpAddr)
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
@@ -137,10 +137,7 @@ class RANManagement():
# Worakround for some servers, we need to erase completely the workspace
if self.Build_eNB_forced_workspace_cleanup:
mySSH.command('echo ' + lPassWord + ' | sudo -S rm -Rf ' + lSourcePath, '\$', 15)
if self.htmlObj is not None:
self.testCase_id = self.htmlObj.testCase_id
else:
self.testCase_id = '000000'
self.testCase_id = HTML.testCase_id
# on RedHat/CentOS .git extension is mandatory
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
if result is not None:
@@ -181,8 +178,7 @@ class RANManagement():
mismatch = True
if not mismatch:
mySSH.close()
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.Build_eNB_args, 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRow(self.Build_eNB_args, 'OK', CONST.ALL_PROCESSES_OK)
return
mySSH.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
@@ -209,26 +205,25 @@ class RANManagement():
mySSH.command('echo ' + lPassWord + ' | sudo -S ls', '\$', 5)
mySSH.command('echo $USER; nohup sudo -E ./my-lte-softmodem-build.sh' + ' > ' + lSourcePath + '/cmake_targets/compile_oai_enb.log ' + ' 2>&1 &', lUserName, 5)
mySSH.close()
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.Build_eNB_args, 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRow(self.Build_eNB_args, 'OK', CONST.ALL_PROCESSES_OK)
self.backgroundBuildTestId[int(self.eNB_instance)] = self.testCase_id
return
mySSH.command('stdbuf -o0 ./build_oai ' + self.Build_eNB_args + ' 2>&1 | stdbuf -o0 tee compile_oai_enb.log', 'Bypassing the Tests|build have failed', 1500)
mySSH.close()
self.checkBuildeNB(lIpAddr, lUserName, lPassWord, lSourcePath, self.testCase_id)
self.checkBuildeNB(lIpAddr, lUserName, lPassWord, lSourcePath, self.testCase_id, HTML)
def WaitBuildeNBisFinished(self):
if self.eNB_serverId == '0':
def WaitBuildeNBisFinished(self, HTML):
if self.eNB_serverId[self.eNB_instance] == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.eNB_serverId == '1':
elif self.eNB_serverId[self.eNB_instance] == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.eNB_serverId == '2':
elif self.eNB_serverId[self.eNB_instance] == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
@@ -236,6 +231,7 @@ class RANManagement():
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
logging.debug('Waiting for end of build on server: ' + lIpAddr)
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
count = 40
@@ -249,11 +245,10 @@ class RANManagement():
count -= 1
time.sleep(30)
mySSH.close()
self.checkBuildeNB(lIpAddr, lUserName, lPassWord, lSourcePath, self.backgroundBuildTestId[int(self.eNB_instance)])
self.checkBuildeNB(lIpAddr, lUserName, lPassWord, lSourcePath, self.backgroundBuildTestId[int(self.eNB_instance)], HTML)
def checkBuildeNB(self, lIpAddr, lUserName, lPassWord, lSourcePath, testcaseId):
if self.htmlObj is not None:
self.htmlObj.testCase_id=testcaseId
def checkBuildeNB(self, lIpAddr, lUserName, lPassWord, lSourcePath, testcaseId, HTML):
HTML.testCase_id=testcaseId
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
@@ -284,7 +279,7 @@ class RANManagement():
mySSH.command('mkdir -p build_log_' + testcaseId, '\$', 5)
mySSH.command('mv log/* ' + 'build_log_' + testcaseId, '\$', 5)
mySSH.command('mv compile_oai_enb.log ' + 'build_log_' + testcaseId, '\$', 5)
if self.eNB_serverId != '0':
if self.eNB_serverId[self.eNB_instance] != '0':
mySSH.command('cd cmake_targets', '\$', 5)
mySSH.command('if [ -e tmp_build' + testcaseId + '.zip ]; then rm -f tmp_build' + testcaseId + '.zip; fi', '\$', 5)
mySSH.command('zip -r -qq tmp_build' + testcaseId + '.zip build_log_' + testcaseId, '\$', 5)
@@ -307,27 +302,25 @@ class RANManagement():
#generate logging info depending on buildStatus and air interface
if buildStatus:
logging.info('\u001B[1m Building OAI ' + self.air_interface[self.eNB_instance] + ' Pass\u001B[0m')
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.Build_eNB_args, 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRow(self.Build_eNB_args, 'OK', CONST.ALL_PROCESSES_OK)
else:
logging.error('\u001B[1m Building OAI ' + self.air_interface[self.eNB_instance] + ' Failed\u001B[0m')
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.Build_eNB_args, 'KO', CONST.ALL_PROCESSES_OK)
self.htmlObj.CreateHtmlTabFooter(False)
HTML.CreateHtmlTestRow(self.Build_eNB_args, 'KO', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTabFooter(False)
sys.exit(1)
def InitializeeNB(self):
if self.eNB_serverId == '0':
def InitializeeNB(self, HTML, EPC):
if self.eNB_serverId[self.eNB_instance] == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.eNB_serverId == '1':
elif self.eNB_serverId[self.eNB_instance] == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.eNB_serverId == '2':
elif self.eNB_serverId[self.eNB_instance] == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
@@ -335,24 +328,21 @@ class RANManagement():
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
logging.debug('Starting eNB/gNB on server: ' + lIpAddr)
if self.htmlObj is not None:
self.testCase_id = self.htmlObj.testCase_id
else:
self.testCase_id = '000000'
self.testCase_id = HTML.testCase_id
mySSH = SSH.SSHConnection()
if (self.pStatus < 0):
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' ' + self.Initialize_eNB_args, 'KO', self.pStatus)
self.htmlObj.CreateHtmlTabFooter(False)
HTML.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' ' + self.Initialize_eNB_args, 'KO', self.pStatus)
HTML.CreateHtmlTabFooter(False)
sys.exit(1)
# If tracer options is on, running tshark on EPC side and capture traffic b/ EPC and eNB
result = re.search('T_stdout', str(self.Initialize_eNB_args))
if (result is not None) and (self.epcObj is not None):
localEpcIpAddr = self.epcObj.IPAddress
localEpcUserName = self.epcObj.UserName
localEpcPassword = self.epcObj.Password
if (result is not None):
localEpcIpAddr = EPC.IPAddress
localEpcUserName = EPC.UserName
localEpcPassword = EPC.Password
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
mySSH.command('ip addr show | awk -f /tmp/active_net_interfaces.awk | egrep -v "lo|tun"', '\$', 5)
result = re.search('interfaceToUse=(?P<eth_interface>[a-zA-Z0-9\-\_]+)done', mySSH.getBefore())
@@ -400,17 +390,17 @@ class RANManagement():
mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 60)
# Make a copy and adapt to EPC / eNB IP addresses
mySSH.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5)
if self.epcObj is not None:
localMmeIpAddr = self.epcObj.MmeIPAddress
mySSH.command('sed -i -e \'s/CI_MME_IP_ADDR/' + localMmeIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
localMmeIpAddr = EPC.MmeIPAddress
mySSH.command('sed -i -e \'s/CI_MME_IP_ADDR/' + localMmeIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
mySSH.command('sed -i -e \'s/CI_ENB_IP_ADDR/' + lIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
mySSH.command('sed -i -e \'s/CI_GNB_IP_ADDR/' + lIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
mySSH.command('sed -i -e \'s/CI_RCC_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
mySSH.command('sed -i -e \'s/CI_RRU1_IP_ADDR/' + self.eNB1IPAddress + '/\' ' + ci_full_config_file, '\$', 2);
mySSH.command('sed -i -e \'s/CI_RRU2_IP_ADDR/' + self.eNB2IPAddress + '/\' ' + ci_full_config_file, '\$', 2);
mySSH.command('sed -i -e \'s/CI_FR1_CTL_ENB_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
if self.flexranCtrlInstalled and self.flexranCtrlStarted:
if (self.flexranCtrlInstalled and self.flexranCtrlStarted) or self.flexranCtrlDeployed:
mySSH.command('sed -i -e \'s/FLEXRAN_ENABLED.*;/FLEXRAN_ENABLED = "yes";/\' ' + ci_full_config_file, '\$', 2);
mySSH.command('sed -i -e \'s/CI_FLEXRAN_CTL_IP_ADDR/' + self.flexranCtrlIpAddress + '/\' ' + ci_full_config_file, '\$', 2);
else:
mySSH.command('sed -i -e \'s/FLEXRAN_ENABLED.*;/FLEXRAN_ENABLED = "no";/\' ' + ci_full_config_file, '\$', 2);
self.eNBmbmsEnables[int(self.eNB_instance)] = False
@@ -452,14 +442,13 @@ class RANManagement():
mySSH.close()
doLoop = False
logging.error('\u001B[1;37;41m eNB/gNB/ocp-eNB logging system did not show got sync! \u001B[0m')
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' -O ' + config_file + extra_options, 'KO', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' -O ' + config_file + extra_options, 'KO', CONST.ALL_PROCESSES_OK)
# In case of T tracer recording, we need to kill tshark on EPC side
result = re.search('T_stdout', str(self.Initialize_eNB_args))
if (result is not None) and (self.epcObj is not None):
localEpcIpAddr = self.epcObj.IPAddress
localEpcUserName = self.epcObj.UserName
localEpcPassword = self.epcObj.Password
if (result is not None):
localEpcIpAddr = EPC.IPAddress
localEpcUserName = EPC.UserName
localEpcPassword = EPC.Password
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
logging.debug('\u001B[1m Stopping tshark \u001B[0m')
mySSH.command('echo ' + localEpcPassword + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
@@ -507,11 +496,10 @@ class RANManagement():
else:
logging.error('\u001B[1m oaitun_enm1 interface is either NOT mounted or NOT configured\u001B[0m')
if enbDidSync:
self.eNBstatuses[int(self.eNB_instance)] = int(self.eNB_serverId)
self.eNBstatuses[int(self.eNB_instance)] = int(self.eNB_serverId[self.eNB_instance])
mySSH.close()
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' -O ' + config_file + extra_options, 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' -O ' + config_file + extra_options, 'OK', CONST.ALL_PROCESSES_OK)
logging.debug('\u001B[1m Initialize eNB/gNB/ocp-eNB Completed\u001B[0m')
def CheckeNBProcess(self, status_queue):
@@ -546,18 +534,18 @@ class RANManagement():
except:
os.kill(os.getppid(),signal.SIGUSR1)
def TerminateeNB(self):
if self.eNB_serverId == '0':
def TerminateeNB(self, HTML, EPC):
if self.eNB_serverId[self.eNB_instance] == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.eNB_serverId == '1':
elif self.eNB_serverId[self.eNB_instance] == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.eNB_serverId == '2':
elif self.eNB_serverId[self.eNB_instance] == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
@@ -565,6 +553,7 @@ class RANManagement():
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
logging.debug('Stopping eNB/gNB on server: ' + lIpAddr)
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
@@ -586,10 +575,10 @@ class RANManagement():
mySSH.close()
# If tracer options is on, stopping tshark on EPC side
result = re.search('T_stdout', str(self.Initialize_eNB_args))
if (result is not None) and (self.epcObj is not None):
localEpcIpAddr = self.epcObj.IPAddress
localEpcUserName = self.epcObj.UserName
localEpcPassword = self.epcObj.Password
if (result is not None):
localEpcIpAddr = EPC.IPAddress
localEpcUserName = EPC.UserName
localEpcPassword = EPC.Password
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
logging.debug('\u001B[1m Stopping tshark \u001B[0m')
mySSH.command('echo ' + localEpcPassword + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
@@ -613,9 +602,8 @@ class RANManagement():
mySSH.close()
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/' + extracted_log_file, '.')
logging.debug('\u001B[1m Analyzing eNB replay logfile \u001B[0m')
logStatus = self.AnalyzeLogFile_eNB(extracted_log_file)
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
logStatus = self.AnalyzeLogFile_eNB(extracted_log_file, HTML)
HTML.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
self.eNBLogFiles[int(self.eNB_instance)] = ''
else:
analyzeFile = False
@@ -627,27 +615,23 @@ class RANManagement():
copyin_res = mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/' + fileToAnalyze, '.')
if (copyin_res == -1):
logging.debug('\u001B[1;37;41m Could not copy ' + nodeB_prefix + 'NB logfile to analyze it! \u001B[0m')
if self.htmlObj is not None:
self.htmlObj.htmleNBFailureMsg='Could not copy ' + nodeB_prefix + 'NB logfile to analyze it!'
self.htmlObj.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
HTML.htmleNBFailureMsg='Could not copy ' + nodeB_prefix + 'NB logfile to analyze it!'
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
self.eNBmbmsEnables[int(self.eNB_instance)] = False
return
if self.eNB_serverId != '0':
if self.eNB_serverId[self.eNB_instance] != '0':
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)
logStatus = self.AnalyzeLogFile_eNB(fileToAnalyze)
logStatus = self.AnalyzeLogFile_eNB(fileToAnalyze, HTML)
if (logStatus < 0):
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow('N/A', 'KO', logStatus)
HTML.CreateHtmlTestRow('N/A', 'KO', logStatus)
self.preamtureExit = True
self.eNBmbmsEnables[int(self.eNB_instance)] = False
return
else:
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
else:
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
self.eNBmbmsEnables[int(self.eNB_instance)] = False
self.eNBstatuses[int(self.eNB_instance)] = -1
@@ -661,7 +645,7 @@ class RANManagement():
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap enb_*txt', '\$', 5)
mySSH.close()
def AnalyzeLogFile_eNB(self, eNBlogFile):
def AnalyzeLogFile_eNB(self, eNBlogFile, HTML):
if (not os.path.isfile('./' + eNBlogFile)):
return -1
enb_log_file = open('./' + eNBlogFile, 'r')
@@ -709,7 +693,11 @@ class RANManagement():
NSA_RAPROC_PUSCH_check = 0
#dlsch and ulsch statistics (dictionary)
dlsch_ulsch_stats = {}
#count "L1 thread not ready" msg
L1_thread_not_ready_cnt = 0
#count "problem receiving samples" msg
pb_receiving_samples_cnt = 0
for line in enb_log_file.readlines():
# Runtime statistics
result = re.search('Run time:' ,str(line))
@@ -874,6 +862,15 @@ class RANManagement():
if result is not None:
#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())
#count "L1 thread not ready" msg
result = re.search('\[PHY\]\s+L1_thread isn\'t ready', str(line))
if result is not None:
L1_thread_not_ready_cnt += 1
#count "problem receiving samples" msg
result = re.search('\[PHY\]\s+problem receiving samples', str(line))
if result is not None:
pb_receiving_samples_cnt += 1
enb_log_file.close()
logging.debug(' File analysis completed')
if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'):
@@ -903,6 +900,17 @@ class RANManagement():
htmlMsg = statMsg+'\n'
logging.debug(statMsg)
htmleNBFailureMsg += htmlMsg
#L1 thread not ready log
statMsg = '[PHY] L1 thread is not ready msg count = '+str(L1_thread_not_ready_cnt)
htmlMsg = statMsg+'\n'
logging.debug(statMsg)
htmleNBFailureMsg += htmlMsg
#problem receiving samples log
statMsg = '[PHY] problem receiving samples msg count = '+str(pb_receiving_samples_cnt)
htmlMsg = statMsg+'\n'
logging.debug(statMsg)
htmleNBFailureMsg += htmlMsg
#ulsch and dlsch statistics
if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty
statMsg=''
@@ -1018,8 +1026,7 @@ class RANManagement():
logging.debug('\u001B[1;37;41m ' + rlcMsg + ' \u001B[0m')
htmleNBFailureMsg += rlcMsg + '\n'
global_status = CONST.ENB_PROCESS_REALTIME_ISSUE
if self.htmlObj is not None:
self.htmlObj.htmleNBFailureMsg=htmleNBFailureMsg
HTML.htmleNBFailureMsg=htmleNBFailureMsg
# Runtime statistics for console output and HTML
if runTime != '':
logging.debug(runTime)

View File

@@ -2200,7 +2200,7 @@ function run_test_on_vm {
mkdir --parents $ARCHIVES_LOC
fi
local try_cnt="0"
local try_cnt=0
NR_STATUS=0
######### start of RA TEST loop
@@ -2232,7 +2232,7 @@ function run_test_on_vm {
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_NR_UE_LOG_FILE $ARCHIVES_LOC
SYNC_STATUS=-1
try_cnt=$[$try_cnt+1]
try_cnt=$((try_cnt+1))
continue
fi
@@ -2255,9 +2255,10 @@ function run_test_on_vm {
if [ $RA_STATUS -ne 0 ]
then
echo "RA test NOT OK"
try_cnt=$[$try_cnt+1]
echo "try_cnt = " $try_cnt
try_cnt=$((try_cnt+1))
else
try_cnt=$[$try_cnt+10]
try_cnt=$((try_cnt+10))
fi
done
########### end RA test
@@ -2266,7 +2267,7 @@ function run_test_on_vm {
######### start of PHY TEST loop
try_cnt="0"
try_cnt=0
while [ $try_cnt -lt 4 ]
do
@@ -2297,7 +2298,7 @@ function run_test_on_vm {
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_NR_UE_LOG_FILE $ARCHIVES_LOC
SYNC_STATUS=-1
try_cnt=$[$try_cnt+1]
try_cnt=$((try_cnt+1))
continue
fi
@@ -2337,7 +2338,7 @@ function run_test_on_vm {
terminate_enb_ue_basic_sim $GNB_VM_CMDS $GNB_VM_IP_ADDR 1
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_NR_UE_LOG_FILE $ARCHIVES_LOC
try_cnt=$[$try_cnt+1]
try_cnt=$((try_cnt+1))
continue
fi
@@ -2363,9 +2364,9 @@ function run_test_on_vm {
if [ $IPERF_STATUS -ne 0 ]
then
echo "UL test not OK"
try_cnt=$[$try_cnt+1]
try_cnt=$((try_cnt+1))
else
try_cnt=$[$try_cnt+10]
try_cnt=$((try_cnt+10))
fi
done
######### end of loop

View File

@@ -52,13 +52,11 @@ class SSHConnection():
self.picocom_closure = True
def open(self, ipaddress, username, password):
extraSshOptions = ''
count = 0
connect_status = False
if ipaddress == '192.168.18.197':
extraSshOptions = ' -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
while count < 4:
self.ssh = pexpect.spawn('ssh', [username + '@' + ipaddress + extraSshOptions], timeout = 5)
self.ssh = pexpect.spawn('ssh -o PubkeyAuthentication=no {}@{}'.format(username,ipaddress))
self.ssh.timeout = 5
self.sshresponse = self.ssh.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', 'Last login', pexpect.EOF, pexpect.TIMEOUT])
if self.sshresponse == 0:
self.ssh.sendline('yes')

View File

@@ -21,7 +21,11 @@
BEGIN{max=0;min=10000}
{
if ($0 ~/Mbits/) {
split($0,a,"MBytes")
if ($0 ~/KBytes/) {
split($0,a,"KBytes")
} else {
split($0,a,"MBytes")
}
split(a[2],b)
if (b[1]>max) {
max=b[1]

View File

@@ -19,6 +19,8 @@
- Reboot_UE
- Initialize_FlexranCtrl
- Terminate_FlexranCtrl
- Deploy_EPC
- Undeploy_EPC
- Initialize_HSS
- Terminate_HSS
- Initialize_MME
@@ -32,3 +34,6 @@
- Ping_CatM_module
- IdleSleep
- Perform_X2_Handover
- Build_Image
- Deploy_Object
- Undeploy_Object

View File

@@ -32,7 +32,7 @@
<testCase id="090101">
<class>Build_OAI_UE</class>
<desc>Build OAI UE</desc>
<Build_OAI_UE_args>-w USRP --UE</Build_OAI_UE_args>
<Build_OAI_UE_args>-w USRP --UE --ninja</Build_OAI_UE_args>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,40 @@
<!--
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>build-tab</htmlTabRef>
<htmlTabName>Build</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
000001
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>Build_Image</class>
<desc>Build eNB Image</desc>
<kind>all</kind>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,39 @@
<!--
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>epc-deploy-tab</htmlTabRef>
<htmlTabName>EPC-Deploy</htmlTabName>
<htmlTabIcon>log-in</htmlTabIcon>
<TestCaseRequestedList>
000100
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="000100">
<class>Deploy_EPC</class>
<desc>Deploy all EPC containers</desc>
<parameters>yaml_files/fr1_epc_tim</parameters>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,38 @@
<!--
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>epc-undeploy-tab</htmlTabRef>
<htmlTabName>EPC-Undeploy</htmlTabName>
<htmlTabIcon>log-out</htmlTabIcon>
<TestCaseRequestedList>
000200
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="000200">
<class>Undeploy_EPC</class>
<desc>Undeploy all EPC containers</desc>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,150 @@
<!--
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-FR1-TM1</htmlTabRef>
<htmlTabName>FR1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
010000
030000
040000
010001
000001
050000
050001
050002
050002
000001
060000
060001
000001
010002
000001
070001
070000
010003
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010000">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="010003">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="010001">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="010002">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="030000">
<class>Initialize_eNB</class>
<desc>Initialize eNB</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf</Initialize_eNB_args>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<air_interface>lte</air_interface>
</testCase>
<testCase id="040000">
<class>Initialize_eNB</class>
<desc>Initialize gNB</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E</Initialize_eNB_args>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<air_interface>nr</air_interface>
</testCase>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
</testCase>
<testCase id="050000">
<class>Ping</class>
<desc>Ping: 20pings in 20sec</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase>
<testCase id="050001">
<class>Ping</class>
<desc>Ping: 5pings in 1sec</desc>
<ping_args>-c 5 -i 0.2</ping_args>
<ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase>
<testCase id="050002">
<class>Ping</class>
<desc>Ping: 100pings in 20sec</desc>
<ping_args>-c 100 -i 0.2</ping_args>
<ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase>
<testCase id="060000">
<class>Iperf</class>
<desc>iperf (DL/1Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 1M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="060001">
<class>Iperf</class>
<desc>iperf (UL/1Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 1M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="070000">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<air_interface>lte</air_interface>
</testCase>
<testCase id="070001">
<class>Terminate_eNB</class>
<desc>Terminate gNB</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<air_interface>nr</air_interface>
</testCase>
</testCaseList>

View File

@@ -31,9 +31,9 @@
010001
000001
050000
050001
050002
050003
000001
060000
060001
000001
010002
000001
@@ -93,30 +93,26 @@
<class>Ping</class>
<desc>Ping: 20pings in 20sec</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>0</ping_packetloss_threshold>
<ping_packetloss_threshold>50</ping_packetloss_threshold>
</testCase>
<testCase id="050001">
<class>Ping</class>
<desc>Ping: 5pings in 1sec</desc>
<ping_args>-c 5 -i 0.2</ping_args>
<ping_packetloss_threshold>0</ping_packetloss_threshold>
<testCase id="060000">
<class>Iperf</class>
<desc>iperf (DL/2.5Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 2.5M -t 60 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="050002">
<class>Ping</class>
<desc>Ping: 100pings in 20sec</desc>
<ping_args>-c 100 -i 0.2</ping_args>
<ping_packetloss_threshold>0</ping_packetloss_threshold>
<testCase id="060001">
<class>Iperf</class>
<desc>iperf (UL/1.5Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 1.5M -t 60 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="050003">$
<class>Ping</class>$
<desc>Ping: 100pings in 20sec size 1000</desc>$
<ping_args>-c 100 -i 0.2 -s 1000</ping_args>$
<ping_packetloss_threshold>0</ping_packetloss_threshold>$
</testCase>$
<testCase id="070000">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>

View File

@@ -0,0 +1,133 @@
<!--
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-deploy-enb-mono</htmlTabRef>
<htmlTabName>Test-Deploy-eNB-Mono</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
040101
030101 000020 040301 000021 040501 040601 040611 040641 040651 040401 040201 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Waiting for 60 seconds</desc>
<idle_sleep_time_in_sec>60</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Waiting for 10 seconds</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase>
<testCase id="000020">
<class>CheckStatusUE</class>
<desc>Check UE(s) status before attachment</desc>
<expectedNbOfConnectedUEs>0</expectedNbOfConnectedUEs>
</testCase>
<testCase id="000021">
<class>CheckStatusUE</class>
<desc>Check UE(s) status after attachment</desc>
<expectedNbOfConnectedUEs>1</expectedNbOfConnectedUEs>
</testCase>
<testCase id="030101">
<class>Deploy_Object</class>
<desc>Deploy eNB (FDD/Band7/5MHz) in a container</desc>
<yaml_path>ci-scripts/yaml_files/fr1_enb_mono_fdd_tim</yaml_path>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="030201">
<class>Undeploy_Object</class>
<desc>Undeploy eNB</desc>
<yaml_path>ci-scripts/yaml_files/fr1_enb_mono_fdd_tim</yaml_path>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="040201">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="040301">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="040501">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040601">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040611">
<class>Iperf</class>
<desc>iperf (5MHz - DL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040641">
<class>Iperf</class>
<desc>iperf (5MHz - UL/7.5Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 7.5M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040651">
<class>Iperf</class>
<desc>iperf (5MHz - UL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
</testCaseList>

View File

@@ -52,7 +52,7 @@
<testCase id="090102">
<class>Initialize_OAI_UE</class>
<desc>Initialize NR UE USRP</desc>
<Initialize_OAI_UE_args>--phy-test --usrp-args "addr=192.168.30.2,second_addr=192.168.50.2,clock_source=external,time_source=external" --ue-rxgain 75 --threadoffset 16 --rrc_config_path .</Initialize_OAI_UE_args>
<Initialize_OAI_UE_args>--phy-test --usrp-args "addr=192.168.30.2,second_addr=192.168.50.2,clock_source=external,time_source=external" --ue-rxgain 50 --rrc_config_path . --dlsch-parallel 4 </Initialize_OAI_UE_args>
<air_interface>NR</air_interface>
</testCase>

View File

@@ -52,7 +52,7 @@
<testCase id="090104">
<class>Initialize_OAI_UE</class>
<desc>Initialize NR UE USRP</desc>
<Initialize_OAI_UE_args>--phy-test --usrp-args "addr=192.168.30.2,second_addr=192.168.50.2,clock_source=external,time_source=external" --ue-rxgain 75 --threadoffset 16 --rrc_config_path .</Initialize_OAI_UE_args>
<Initialize_OAI_UE_args>--phy-test --usrp-args "addr=192.168.30.2,second_addr=192.168.50.2,clock_source=external,time_source=external" --ue-rxgain 75 --rrc_config_path . --dlsch-parallel 4 </Initialize_OAI_UE_args>
<air_interface>NR</air_interface>
</testCase>

View File

@@ -32,7 +32,7 @@
<testCase id="090101">
<class>Build_OAI_UE</class>
<desc>Build OAI UE</desc>
<Build_OAI_UE_args>-w USRP --UE</Build_OAI_UE_args>
<Build_OAI_UE_args>-w USRP --UE --ninja</Build_OAI_UE_args>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,49 @@
version: '3.8'
services:
enb_mono_fdd:
image: oai-enb:latest
privileged: true
container_name: prod-enb-mono-fdd
environment:
USE_FDD_MONO: 'yes'
USE_B2XX: 'yes'
ENB_NAME: eNB-in-docker
MCC: '222'
MNC: '01'
MNC_LENGTH: 2
TAC: 1
UTRA_BAND_ID: 7
DL_FREQUENCY_IN_MHZ: 2680
UL_FREQUENCY_OFFSET_IN_MHZ: 120
NID_CELL: 10
NB_PRB: 25
MME_S1C_IP_ADDRESS: CI_MME_IP_ADDR
ENB_S1C_IF_NAME: eth0
ENB_S1C_IP_ADDRESS: 192.168.61.30
ENB_S1U_IF_NAME: eth0
ENB_S1U_IP_ADDRESS: 192.168.61.30
ENB_X2_IP_ADDRESS: 192.168.61.30
FLEXRAN_ENABLED: 'no'
FLEXRAN_INTERFACE_NAME: eth0
FLEXRAN_IPV4_ADDRESS: CI_FLEXRAN_CTL_IP_ADDR
USE_ADDITIONAL_OPTIONS: '--RUs.[0].max_rxgain 115 --RUs.[0].max_pdschReferenceSignalPower -27 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96'
volumes:
- /dev:/dev
networks:
public_net:
ipv4_address: 192.168.61.30
healthcheck:
# pgrep does NOT work
test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
name: prod-oai-public-net
ipam:
config:
- subnet: 192.168.61.0/26

View File

@@ -0,0 +1,203 @@
version: '3.8'
services:
cassandra:
image: cassandra:2.1
container_name: prod-cassandra
networks:
private_net:
ipv4_address: 192.168.68.2
environment:
CASSANDRA_CLUSTER_NAME: "OAI HSS Cluster"
CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch
healthcheck:
test: /bin/bash -c "nodetool status"
interval: 10s
timeout: 5s
retries: 5
db_init:
image: cassandra:2.1
container_name: prod-db-init
depends_on: [cassandra]
deploy:
restart_policy:
condition: on-failure
max_attempts: 10
networks:
private_net:
ipv4_address: 192.168.68.4
volumes:
- ./oai_db.cql:/home/oai_db.cql
entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'"
oai_hss:
image: oai-hss:production
container_name: prod-oai-hss
privileged: true
depends_on: [cassandra]
networks:
private_net:
ipv4_address: 192.168.68.3
public_net:
ipv4_address: 192.168.61.2
environment:
REALM: openairinterface.org
HSS_FQDN: hss.openairinterface.org
PREFIX: /openair-hss/etc
cassandra_Server_IP: 192.168.68.2
OP_KEY: 1006020f0a478bf6b699f15c062e42b3
LTE_K: fec86ba6eb707ed08905757b1bb44b8f
APN1: oai.ipv4
APN2: internet
FIRST_IMSI: 222010100001120
NB_USERS: 10
healthcheck:
test: /bin/bash -c "pgrep oai_hss"
interval: 10s
timeout: 5s
retries: 5
oai_mme:
image: oai-mme:production
container_name: prod-oai-mme
privileged: true
depends_on: [oai_hss]
networks:
public_net:
ipv4_address: 192.168.61.3
environment:
REALM: openairinterface.org
PREFIX: /openair-mme/etc
INSTANCE: 1
PID_DIRECTORY: /var/run
HSS_IP_ADDR: 192.168.61.2
HSS_HOSTNAME: hss
HSS_FQDN: hss.openairinterface.org
HSS_REALM: openairinterface.org
MCC: '222'
MNC: '01'
MME_GID: 32768
MME_CODE: 3
TAC_0: 1
TAC_1: 2
TAC_2: 3
MME_FQDN: mme.openairinterface.org
MME_S6A_IP_ADDR: 192.168.61.3
MME_INTERFACE_NAME_FOR_S1_MME: eth0
MME_IPV4_ADDRESS_FOR_S1_MME: 192.168.61.3
MME_INTERFACE_NAME_FOR_S11: eth0
MME_IPV4_ADDRESS_FOR_S11: 192.168.61.3
MME_INTERFACE_NAME_FOR_S10: lo
MME_IPV4_ADDRESS_FOR_S10: 127.0.0.10
OUTPUT: CONSOLE
SGW_IPV4_ADDRESS_FOR_S11_0: 192.168.61.4
PEER_MME_IPV4_ADDRESS_FOR_S10_0: 0.0.0.0
PEER_MME_IPV4_ADDRESS_FOR_S10_1: 0.0.0.0
MCC_SGW_0: '222'
MNC3_SGW_0: '001'
TAC_LB_SGW_0: '01'
TAC_HB_SGW_0: '00'
MCC_MME_0: '222'
MNC3_MME_0: '001'
TAC_LB_MME_0: '02'
TAC_HB_MME_0: '00'
MCC_MME_1: '222'
MNC3_MME_1: '001'
TAC_LB_MME_1: '03'
TAC_HB_MME_1: '00'
TAC_LB_SGW_TEST_0: '03'
TAC_HB_SGW_TEST_0: '00'
SGW_IPV4_ADDRESS_FOR_S11_TEST_0: 0.0.0.0
healthcheck:
test: /bin/bash -c "pgrep oai_mme"
interval: 10s
timeout: 5s
retries: 5
oai_spgwc:
image: oai-spgwc:production
privileged: true
depends_on: [oai_mme]
container_name: prod-oai-spgwc
networks:
public_net:
ipv4_address: 192.168.61.4
environment:
PID_DIRECTORY: /var/run
SGW_INTERFACE_NAME_FOR_S11: eth0
SGW_IP_FOR_S5_S8_CP: 127.0.0.11/8
PGW_IP_FOR_S5_S8_CP: 127.0.0.12/8
PGW_INTERFACE_NAME_FOR_SX: eth0
DEFAULT_APN: oai.ipv4
DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129
DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4
UE_IP_ADDRESS_POOL: '12.1.1.2 - 12.1.1.254'
PUSH_PROTOCOL_OPTION: 'yes'
healthcheck:
test: /bin/bash -c "pgrep oai_spgwc"
interval: 10s
timeout: 5s
retries: 5
oai_spgwu:
image: oai-spgwu-tiny:production
privileged: true
container_name: prod-oai-spgwu-tiny
depends_on: [oai_spgwc]
networks:
public_net:
ipv4_address: 192.168.61.5
environment:
PID_DIRECTORY: /var/run
INSTANCE: 1
SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP: eth0
PGW_INTERFACE_NAME_FOR_SGI: eth0
SGW_INTERFACE_NAME_FOR_SX: eth0
SPGWC0_IP_ADDRESS: 192.168.61.4
NETWORK_UE_IP: '12.1.1.0/24'
NETWORK_UE_NAT_OPTION: 'yes'
healthcheck:
test: /bin/bash -c "pgrep oai_spgwu"
interval: 10s
timeout: 5s
retries: 5
flexran_rtc:
image: flexran-rtc:production
privileged: true
container_name: prod-flexran-rtc
networks:
public_net:
ipv4_address: 192.168.61.10
healthcheck:
test: /bin/bash -c "pgrep rt_controller"
interval: 10s
timeout: 5s
retries: 5
trf_gen:
image: trf-gen:production
privileged: true
container_name: prod-trf-gen
networks:
public_net:
ipv4_address: 192.168.61.11
entrypoint: /bin/bash -c "ip route add 12.1.1.0/24 via 192.168.61.5 dev eth0; sleep infinity"
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.61.5"
interval: 10s
timeout: 5s
retries: 5
networks:
private_net:
name: prod-oai-private-net
ipam:
config:
- subnet: 192.168.68.0/26
public_net:
name: prod-oai-public-net
ipam:
config:
- subnet: 192.168.61.0/26

View File

@@ -485,7 +485,6 @@ add_custom_target (
add_library(NR_RRC_LIB ${nr_rrc_h} ${nr_rrc_source}
${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1_msg.c
${OPENAIR2_DIR}/RRC/NR/nr_ngap_gNB.c
)
add_dependencies(NR_RRC_LIB nr_rrc_flag)
include_directories ("${NR_RRC_FULL_DIR}")
@@ -1758,6 +1757,7 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/ul_ref_seq_nr.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_dmrs_rx.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_csi_rs.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold.c
@@ -1968,6 +1968,7 @@ set(NR_PDCP_SRC
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_ue_manager.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_entity.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/asn1_utils.c
)
set(L2_SRC
@@ -2108,10 +2109,10 @@ set (MAC_NR_SRC_UE
${NR_UE_MAC_DIR}/mac_vars.c
${NR_UE_MAC_DIR}/main_ue_nr.c
${NR_UE_MAC_DIR}/nr_ue_procedures.c
${NR_UE_MAC_DIR}/nr_ue_scheduler.c
${NR_UE_MAC_DIR}/nr_ue_dci_configuration.c
${NR_UE_MAC_DIR}/nr_l1_helpers.c
${NR_UE_MAC_DIR}/nr_ra_procedures.c
${NR_UE_MAC_DIR}/rar_tools_nrUE.c
)
set (ENB_APP_SRC
@@ -2586,6 +2587,13 @@ if(ITTI_SIM)
set(libnrnas_emm_msg_OBJS
${NAS_SRC}COMMON/EMM/MSG/RegistrationRequest.c
${NAS_SRC}COMMON/EMM/MSG/RegistrationAccept.c
${NAS_SRC}COMMON/EMM/MSG/FGSIdentityResponse.c
${NAS_SRC}COMMON/EMM/MSG/FGSAuthenticationResponse.c
${NAS_SRC}COMMON/EMM/MSG/FGSNASSecurityModeComplete.c
${NAS_SRC}COMMON/EMM/MSG/RegistrationComplete.c
${NAS_SRC}COMMON/EMM/MSG/FGSUplinkNasTransport.c
${NAS_SRC}COMMON/ESM/MSG/PduSessionEstablishRequest.c
)
set(libnrnas_ies_OBJS
@@ -2593,8 +2601,11 @@ if(ITTI_SIM)
${NAS_SRC}COMMON/IES/FGSMobileIdentity.c
${NAS_SRC}COMMON/IES/FGSRegistrationType.c
${NAS_SRC}COMMON/IES/SpareHalfOctet.c
${NAS_SRC}COMMON/IES/FGSRegistrationResult.c
${NAS_SRC}COMMON/IES/FGMMCapability.c
${NAS_SRC}COMMON/IES/NrUESecurityCapability.c
${NAS_SRC}COMMON/IES/FGCNasMessageContainer.c
${NAS_SRC}COMMON/IES/SORTransparentContainer.c
)
add_library(LIB_NAS_SIMUE
@@ -3068,7 +3079,7 @@ target_link_libraries (ocp-gnb
-Wl,--start-group
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS NR_GTPV1U SECU_CN SECU_OSA
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB SIMU_COMMON
-Wl,--end-group z dl)
@@ -3231,6 +3242,7 @@ add_executable(nr_dlschsim
${OPENAIR_DIR}/common/utils/system.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
${UTIL_SRC}
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
@@ -3245,6 +3257,7 @@ add_executable(nr_pbchsim
${OPENAIR_DIR}/common/utils/system.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
${UTIL_SRC}
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
@@ -3261,6 +3274,7 @@ add_executable(nr_pucchsim
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/common/utils/system.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
${UTIL_SRC}
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
@@ -3279,12 +3293,13 @@ add_executable(nr_dlsim
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${NFAPI_USER_DIR}/nfapi.c
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
${UTIL_SRC}
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
)
target_link_libraries(nr_dlsim
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN -Wl,--end-group
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
)
target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR)
@@ -3298,11 +3313,12 @@ add_executable(nr_prachsim
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${NFAPI_USER_DIR}/nfapi.c
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
${UTIL_SRC}
${T_SOURCE}
${SHLIB_LOADER_SOURCES})
target_link_libraries(nr_prachsim
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN -Wl,--end-group
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl)
add_executable(nr_ulschsim
@@ -3335,7 +3351,7 @@ add_executable(nr_ulsim
${SHLIB_LOADER_SOURCES}
)
target_link_libraries(nr_ulsim
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN -Wl,--end-group
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
)
target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR)
@@ -3434,7 +3450,7 @@ if (${T_TRACER})
SECU_OSA SECU_CN SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_NR MAC_UE_NR
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_NR MAC_UE_NR NGAP_GNB
CN_UTILS GTPV1U NR_GTPV1U SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
ldpc_orig ldpc_optim ldpc_optim8seg ldpc PROTO_AGENT dfts)
if (TARGET ${i})

View File

@@ -1098,7 +1098,9 @@
(Test13: HARQ test 50% TP (2 rounds),
(Test14: 3 PTRS, 8 Interpolated Symbols),
(Test15: 6 PTRS, 5 Interpolated Symbols),
(Test16: 11 PTRS, 0 Interpolated Symbols)</desc>
(Test16: 11 PTRS, 0 Interpolated Symbols),
(Test17: 2 DMRS Symbols),
(Test18: 3 DMRS Symbols)</desc>
<pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args> --phy_simulators -c </compile_prog_args>
@@ -1120,8 +1122,10 @@
-n100 -s1 -t50
-n100 -s5 -T 2 2 2
-n100 -s5 -T 2 1 2
-n100 -s5 -T 2 0 4</main_exec_args>
<tags>nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 nr_dlsim.test11 nr_dlsim.test12 nr_dlsim.test13 nr_dlsim.test14 nr_dlsim.test15 nr_dlsim.test16</tags>
-n100 -s5 -T 2 0 4
-n100 -s2 -U 2 0 1
-n100 -s2 -U 2 0 2</main_exec_args>
<tags>nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 nr_dlsim.test11 nr_dlsim.test12 nr_dlsim.test13 nr_dlsim.test14 nr_dlsim.test15 nr_dlsim.test16 nr_dlsim.test17 nr_dlsim.test18</tags>
<search_expr_true>PDSCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
<nruns>3</nruns>
@@ -1285,7 +1289,10 @@
(Test5: MCS 9 273 PRBs),
(Test6: DMRS Type A, 3 DMRS, 4 PTRS, 5 Interpolated Symbols),
(Test7: DMRS Type B, 3 DMRS, 2 PTRS, 7 Interpolated Symbols),
(Test8: DMRS Type B, 3 DMRS, 2 PTRS, 3 Interpolated Symbols)</desc>
(Test8: DMRS Type B, 3 DMRS, 2 PTRS, 3 Interpolated Symbols),
(Test9: SC-FDMA, 50 PRBs),
(Test10: SC-FDMA, 75 PRBs),
(Test11: SC-FDMA, 3 DMRS)</desc>
<pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args> --phy_simulators -c </compile_prog_args>
@@ -1299,8 +1306,11 @@
-n100 -m9 -R273 -r273 -s5
-n100 -s5 -T 2 1 2 -U 2 0 2
-n100 -s5 -T 2 2 2 -U 2 1 2
-n100 -s5 -a4 -b8 -T 2 1 2 -U 2 1 3</main_exec_args>
<tags>nr_ulsim.test1 nr_ulsim.test2 nr_ulsim.test3 nr_ulsim.test4 nr_ulsim.test5 nr_ulsim.test6 nr_ulsim.test7 nr_ulsim.test8</tags>
-n100 -s5 -a4 -b8 -T 2 1 2 -U 2 1 3
-n100 -s20 -Z
-n100 -s20 -Z -r75
-n100 -s20 -Z -U 2 0 2</main_exec_args>
<tags>nr_ulsim.test1 nr_ulsim.test2 nr_ulsim.test3 nr_ulsim.test4 nr_ulsim.test5 nr_ulsim.test6 nr_ulsim.test7 nr_ulsim.test8 nr_ulsim.test9 nr_ulsim.test10 nr_ulsim.test11</tags>
<search_expr_true>PUSCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
<nruns>3</nruns>

View File

@@ -114,6 +114,8 @@ check_supported_distribution() {
"rhel7.7") return 0 ;;
"rhel7.8") return 0 ;;
"rhel8.2") return 0 ;;
"rhel8.3") return 0 ;;
"rhel8.4") return 0 ;;
"centos7") return 0 ;;
esac
return 1

View File

@@ -47,6 +47,7 @@
#include "NwGtpv1uMsg.h"
#include "NwGtpv1uPrivate.h"
#include "gtpv1u_eNB_defs.h"
#include "gtpv1u_gNB_defs.h"
#include "PHY/defs_L1_NB_IoT.h"
#include "RRC/LTE/defs_NB_IoT.h"
@@ -109,6 +110,8 @@ typedef struct {
struct gNB_MAC_INST_s **nrmac;
/// GTPu descriptor
gtpv1u_data_t *gtpv1u_data_g;
/// NR GTPu descriptor
nr_gtpv1u_data_t *nr_gtpv1u_data_g;
/// RU descriptors. These describe what each radio unit is supposed to do and contain the necessary functions for fronthaul interfaces
struct RU_t_s **ru;
/// Mask to indicate fronthaul setup status of RU (hard-limit to 64 RUs)

View File

@@ -148,6 +148,7 @@ extern "C" {
#define DEBUG_SECURITY (1<<11)
#define DEBUG_NAS (1<<12)
#define DEBUG_RLC (1<<13)
#define DEBUG_DLSCH_DECOD (1<<14)
#define UE_TIMING (1<<20)
@@ -166,6 +167,7 @@ extern "C" {
{"SECURITY", DEBUG_SECURITY},\
{"NAS", DEBUG_NAS},\
{"RLC", DEBUG_RLC},\
{"DLSCH_DECOD", DEBUG_DLSCH_DECOD},\
{"UE_TIMING", UE_TIMING},\
{NULL,-1}\
}

View File

@@ -129,7 +129,7 @@ ID = ENB_MAC_UE_DL_PDU_WITH_DATA
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : buffer,data
ID = ENB_MAC_SCHEDULING_REQUEST
DESC = MAC scheduling request detected for an UE
GROUP = ALL:MAC:ENB
GROUP = ALL:MAC:ENB:WIRESHARK
FORMAT = int,eNB_ID : int,CC_id : int,frame : int,subframe : int,rnti
ID = ENB_MAC_UE_DL_RAR_PDU_WITH_DATA
DESC = MAC downlink PDU for an UE

View File

@@ -18,6 +18,7 @@
#define DEFAULT_LIVE_PORT 2021
#define NO_PREAMBLE -1
#define NO_SR_RNTI -1
typedef struct {
int socket;
@@ -48,6 +49,10 @@ typedef struct {
int rar_frame;
int rar_subframe;
int rar_data;
/* SR */
int sr_rnti;
int sr_frame;
int sr_subframe;
/* NR traces */
/* NR ul */
@@ -80,6 +85,15 @@ typedef struct {
/* runtime vars */
int cur_mib;
int cur_sib;
/* hack to report UE id:
* each time we see a rnti, we allocate the next ue_id
* (two separate versions for lte and nr)
*/
int lte_rnti_to_ueid[65536];
int lte_next_ue_id;
int nr_rnti_to_ueid[65536];
int nr_next_ue_id;
} ev_data;
/****************************************************************************/
@@ -87,7 +101,8 @@ typedef struct {
/****************************************************************************/
void trace_lte(ev_data *d, int direction, int rnti_type, int rnti,
int frame, int subframe, void *buf, int bufsize, int preamble)
int frame, int subframe, void *buf, int bufsize, int preamble,
int sr_rnti)
{
ssize_t ret;
int fsf;
@@ -102,6 +117,18 @@ void trace_lte(ev_data *d, int direction, int rnti_type, int rnti,
PUTC(&d->buf, MAC_LTE_RNTI_TAG);
PUTC(&d->buf, (rnti>>8) & 255);
PUTC(&d->buf, rnti & 255);
/* put UE id */
if (rnti < 0 || rnti > 65535) { printf("bad rnti!\n"); exit(1); }
/* if no UE id allocated for this rnti then allocate the next one */
if (d->lte_rnti_to_ueid[rnti] == -1) {
d->lte_rnti_to_ueid[rnti] = d->lte_next_ue_id;
d->lte_next_ue_id++;
}
PUTC(&d->buf, MAC_LTE_UEID_TAG);
PUTC(&d->buf, (d->lte_rnti_to_ueid[rnti]>>8) & 255);
PUTC(&d->buf, d->lte_rnti_to_ueid[rnti] & 255);
}
/* for newer version of wireshark? */
@@ -118,6 +145,25 @@ void trace_lte(ev_data *d, int direction, int rnti_type, int rnti,
PUTC(&d->buf, 0); /* rach attempt - always 0 for us (not sure of this) */
}
if (sr_rnti != NO_SR_RNTI) {
PUTC(&d->buf, MAC_LTE_SR_TAG);
PUTC(&d->buf, 0); /* number of items byte 1 */
PUTC(&d->buf, 1); /* number of items byte 2 */
/* put UE id */
if (sr_rnti < 0 || sr_rnti > 65535) { printf("bad sr rnti!\n"); exit(1); }
/* if no UE id allocated for this rnti then allocate the next one */
if (d->lte_rnti_to_ueid[sr_rnti] == -1) {
d->lte_rnti_to_ueid[sr_rnti] = d->lte_next_ue_id;
d->lte_next_ue_id++;
}
PUTC(&d->buf, (d->lte_rnti_to_ueid[sr_rnti]>>8) & 255);
PUTC(&d->buf, d->lte_rnti_to_ueid[sr_rnti] & 255);
PUTC(&d->buf, (sr_rnti>>8) & 255);
PUTC(&d->buf, sr_rnti & 255);
}
PUTC(&d->buf, MAC_LTE_PAYLOAD_TAG);
for (i = 0; i < bufsize; i++)
@@ -135,7 +181,7 @@ void ul(void *_d, event e)
trace_lte(d, DIRECTION_UPLINK, C_RNTI, e.e[d->ul_rnti].i,
e.e[d->ul_frame].i, e.e[d->ul_subframe].i,
e.e[d->ul_data].b, e.e[d->ul_data].bsize,
NO_PREAMBLE);
NO_PREAMBLE, NO_SR_RNTI);
}
void dl(void *_d, event e)
@@ -154,7 +200,7 @@ void dl(void *_d, event e)
e.e[d->dl_rnti].i != 0xffff ? C_RNTI : SI_RNTI, e.e[d->dl_rnti].i,
e.e[d->dl_frame].i, e.e[d->dl_subframe].i,
e.e[d->dl_data].b, e.e[d->dl_data].bsize,
NO_PREAMBLE);
NO_PREAMBLE, NO_SR_RNTI);
}
void mib(void *_d, event e)
@@ -169,7 +215,7 @@ void mib(void *_d, event e)
trace_lte(d, DIRECTION_DOWNLINK, NO_RNTI, 0,
e.e[d->mib_frame].i, e.e[d->mib_subframe].i,
e.e[d->mib_data].b, e.e[d->mib_data].bsize,
NO_PREAMBLE);
NO_PREAMBLE, NO_SR_RNTI);
}
void preamble(void *_d, event e)
@@ -178,7 +224,7 @@ void preamble(void *_d, event e)
trace_lte(d, DIRECTION_UPLINK, NO_RNTI, 0,
e.e[d->preamble_frame].i, e.e[d->preamble_subframe].i,
NULL, 0,
e.e[d->preamble_preamble].i);
e.e[d->preamble_preamble].i, NO_SR_RNTI);
}
void rar(void *_d, event e)
@@ -187,7 +233,16 @@ void rar(void *_d, event e)
trace_lte(d, DIRECTION_DOWNLINK, RA_RNTI, e.e[d->rar_rnti].i,
e.e[d->rar_frame].i, e.e[d->rar_subframe].i,
e.e[d->rar_data].b, e.e[d->rar_data].bsize,
NO_PREAMBLE);
NO_PREAMBLE, NO_SR_RNTI);
}
void sr(void *_d, event e)
{
ev_data *d = _d;
trace_lte(d, DIRECTION_UPLINK, NO_RNTI, 0,
e.e[d->sr_frame].i, e.e[d->sr_subframe].i,
NULL, 0,
NO_PREAMBLE, e.e[d->sr_rnti].i);
}
/****************************************************************************/
@@ -198,6 +253,7 @@ void rar(void *_d, event e)
#define MAC_NR_PAYLOAD_TAG 0x01
#define MAC_NR_RNTI_TAG 0x02
#define MAC_NR_UEID_TAG 0x03
#define MAC_NR_FRAME_SLOT_TAG 0x07
#define NR_FDD_RADIO 1
@@ -225,6 +281,18 @@ void trace_nr(ev_data *d, int direction, int rnti_type, int rnti,
PUTC(&d->buf, MAC_NR_RNTI_TAG);
PUTC(&d->buf, (rnti>>8) & 255);
PUTC(&d->buf, rnti & 255);
/* put UE id */
if (rnti < 0 || rnti > 65535) { printf("bad rnti!\n"); exit(1); }
/* if no UE id allocated for this rnti then allocate the next one */
if (d->nr_rnti_to_ueid[rnti] == -1) {
d->nr_rnti_to_ueid[rnti] = d->nr_next_ue_id;
d->nr_next_ue_id++;
}
PUTC(&d->buf, MAC_NR_UEID_TAG);
PUTC(&d->buf, (d->nr_rnti_to_ueid[rnti]>>8) & 255);
PUTC(&d->buf, d->nr_rnti_to_ueid[rnti] & 255);
}
#if 0
@@ -298,7 +366,7 @@ void nr_rar(void *_d, event e)
/****************************************************************************/
void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
int preamble_id, int rar_id,
int preamble_id, int rar_id, int sr_id,
int nr_ul_id, int nr_dl_id, int nr_mib_id, int nr_rar_id)
{
database_event_format f;
@@ -321,6 +389,9 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
d->rar_frame = -1;
d->rar_subframe = -1;
d->rar_data = -1;
d->sr_rnti = -1;
d->sr_frame = -1;
d->sr_subframe = -1;
d->nr_ul_rnti = -1;
d->nr_ul_frame = -1;
@@ -407,6 +478,18 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
if (d->rar_rnti == -1 || d->rar_frame == -1 || d->rar_subframe == -1 ||
d->rar_data == -1) goto error;
/* sr: rnti, frame, subframe */
f = get_format(database, sr_id);
for (i = 0; i < f.count; i++) {
G("rnti", "int", d->sr_rnti);
G("frame", "int", d->sr_frame);
G("subframe", "int", d->sr_subframe);
}
if (d->sr_rnti == -1 || d->sr_frame == -1 || d->sr_subframe == -1)
goto error;
/* NR ul: rnti, frame, slot, data */
f = get_format(database, nr_ul_id);
@@ -530,6 +613,7 @@ int main(int n, char **v)
int i;
int ul_id, dl_id, mib_id, preamble_id, rar_id;
int nr_ul_id, nr_dl_id, nr_mib_id, nr_rar_id;
int sr_id;
ev_data d;
char *ip = DEFAULT_IP;
int port = DEFAULT_PORT;
@@ -538,6 +622,11 @@ int main(int n, char **v)
int live = 0;
memset(&d, 0, sizeof(ev_data));
for (i = 0; i < 65536; i++) {
d.lte_rnti_to_ueid[i] = -1;
d.nr_rnti_to_ueid[i] = -1;
}
for (i = 1; i < n; i++) {
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
if (!strcmp(v[i], "-d")) { if(i>n-2)usage(); database_filename = v[++i]; continue; }
@@ -599,6 +688,7 @@ int main(int n, char **v)
on_off(database, "ENB_PHY_MIB", is_on, 1);
on_off(database, "ENB_PHY_INITIATE_RA_PROCEDURE", is_on, 1);
on_off(database, "ENB_MAC_UE_DL_RAR_PDU_WITH_DATA", is_on, 1);
on_off(database, "ENB_MAC_SCHEDULING_REQUEST", is_on, 1);
on_off(database, "GNB_MAC_UL_PDU_WITH_DATA", is_on, 1);
on_off(database, "GNB_MAC_DL_PDU_WITH_DATA", is_on, 1);
@@ -621,13 +711,14 @@ int main(int n, char **v)
mib_id = event_id_from_name(database, "ENB_PHY_MIB");
preamble_id = event_id_from_name(database, "ENB_PHY_INITIATE_RA_PROCEDURE");
rar_id = event_id_from_name(database, "ENB_MAC_UE_DL_RAR_PDU_WITH_DATA");
sr_id = event_id_from_name(database, "ENB_MAC_SCHEDULING_REQUEST");
nr_ul_id = event_id_from_name(database, "GNB_MAC_UL_PDU_WITH_DATA");
nr_dl_id = event_id_from_name(database, "GNB_MAC_DL_PDU_WITH_DATA");
nr_mib_id = event_id_from_name(database, "GNB_PHY_MIB");
nr_rar_id = event_id_from_name(database, "GNB_MAC_DL_RAR_PDU_WITH_DATA");
setup_data(&d, database, ul_id, dl_id, mib_id, preamble_id, rar_id,
setup_data(&d, database, ul_id, dl_id, mib_id, preamble_id, rar_id, sr_id,
nr_ul_id, nr_dl_id, nr_mib_id, nr_rar_id);
register_handler_function(h, ul_id, ul, &d);
@@ -635,6 +726,7 @@ int main(int n, char **v)
register_handler_function(h, mib_id, mib, &d);
register_handler_function(h, preamble_id, preamble, &d);
register_handler_function(h, rar_id, rar, &d);
register_handler_function(h, sr_id, sr, &d);
register_handler_function(h, nr_ul_id, nr_ul, &d);
register_handler_function(h, nr_dl_id, nr_dl, &d);
@@ -662,7 +754,7 @@ int main(int n, char **v)
if (e.type == -1) break;
if (!(e.type == ul_id || e.type == dl_id || e.type == mib_id ||
e.type == preamble_id || e.type == rar_id ||
e.type == preamble_id || e.type == rar_id || e.type == sr_id ||
e.type == nr_ul_id || e.type == nr_dl_id ||
e.type == nr_mib_id || e.type == nr_rar_id)) continue;

View File

@@ -11,26 +11,7 @@
*
* Copyright (C) 2009 Martin Mathieson. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE
* SPDX-License-Identifier: BSD-2-Clause
*/
#ifndef __COMMON_UTILS_T_TRACER_PACKET_MAC_LTE__H__
@@ -67,9 +48,9 @@
/* and implemented by this dissector, using the definitions */
/* below. A link to an example program showing you how to encode */
/* these headers and send LTE MAC PDUs on a UDP socket is */
/* provided at https://wiki.wireshark.org/MAC-LTE */
/* provided at https://wiki.wireshark.org/MAC-LTE */
/* */
/* A heuristic dissecter (enabled by a preference) will */
/* A heuristic dissector (enabled by a preference) will */
/* recognise a signature at the beginning of these frames. */
/*****************************************************************/
@@ -126,18 +107,25 @@
MCS index (1 byte), redundancy version (1 byte), resource block length (1 byte),
HARQ id (1 byte), NDI (1 byte), TB (1 byte), DL reTx (1 byte) */
#define MAC_LTE_SIMULT_PUCCH_PUSCH_PCELL 0x0C
#define MAC_LTE_SIMULT_PUCCH_PUSCH_PCELL_TAG 0x0C
/* 0 byte */
#define MAC_LTE_SIMULT_PUCCH_PUSCH_PSCELL 0x0D
#define MAC_LTE_SIMULT_PUCCH_PUSCH_PSCELL_TAG 0x0D
/* 0 byte */
#define MAC_LTE_CE_MODE 0x0E
#define MAC_LTE_CE_MODE_TAG 0x0E
/* 1 byte containing mac_lte_ce_mode enum value */
#define MAC_LTE_NB_MODE 0x0F
#define MAC_LTE_NB_MODE_TAG 0x0F
/* 1 byte containing mac_lte_nb_mode enum value */
#define MAC_LTE_N_UL_RB_TAG 0x10
/* 1 byte containing the number of UL resource blocks: 6, 15, 25, 50, 75 or 100 */
#define MAC_LTE_SR_TAG 0x11
/* 2 bytes for the number of items, followed by that number of ueid, rnti (2 bytes each) */
/* MAC PDU. Following this tag comes the actual MAC PDU (there is no length, the PDU
continues until the end of the frame) */
#define MAC_LTE_PAYLOAD_TAG 0x01

View File

@@ -1,370 +0,0 @@
Installation Instructions
*************************
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
Basic Installation
==================
Briefly, the shell command `./configure && make && make install'
should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the `make install' phase executed with root
privileges.
5. Optionally, type `make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior `make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type `make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make
distcheck', which can by used by developers to test that all other
targets like `make install' and `make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. This
is known as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the
default for these options is expressed in terms of `${prefix}', so that
specifying just `--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, `make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
`${prefix}'. Any directories that were specified during `configure',
but not in terms of `${prefix}', must each be overridden at install
time for the entire installation to be relocated. The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.
The second method involves providing the `DESTDIR' variable. For
example, `make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names. The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}'
at `configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of `make' will be. For these packages, running `./configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
HP-UX `make' updates targets which have the same time stamps as
their prerequisites, which makes it generally unusable when shipped
generated files such as `configure' are involved. Use GNU `make'
instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

View File

@@ -1,17 +0,0 @@
AM_CFLAGS = \
@ADD_CFLAGS@ \
-I$(top_srcdir)/common \
-I$(top_srcdir)/libparser \
-I$(top_srcdir)/libresolver \
-I$(top_srcdir)/libbuffers \
-I$(top_srcdir)/libui
SUBDIRS = libparser libresolver libbuffers libui .
itti_analyzer_LDADD = \
$(top_builddir)/libui/libui.la \
$(top_builddir)/libparser/libparser.la \
$(top_builddir)/libresolver/libresolver.la \
$(top_builddir)/libbuffers/libbuffers.la
bin_PROGRAMS = itti_analyzer

View File

@@ -1,14 +0,0 @@
To run itti_analyzer, please perform the following actions:
1) apt-get install autotools-dev automake libtool
2) libtoolize
3) ./autogen.sh
4) ./configure
5) make
6) ./itti_analyzer

View File

@@ -1,6 +0,0 @@
#! /bin/sh
aclocal \
&& autoheader \
&& automake --add-missing \
&& autoconf

View File

@@ -1,73 +0,0 @@
/*
* 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
*/
/** @brief Intertask Interface common types
* Contains type definitions used for generating and parsing ITTI messages.
* @author Laurent Winckel <laurent.winckel@eurecom.fr>
*/
#ifndef _ITTI_TYPES_H_
#define _ITTI_TYPES_H_
#include <stdint.h>
#define CHARS_TO_UINT32(c1, c2, c3, c4) (((c4) << 24) | ((c3) << 16) | ((c2) << 8) | (c1))
#define MESSAGE_NUMBER_CHAR_FORMAT "%11u"
/* Intertask message types */
enum itti_message_types_e
{
ITTI_DUMP_XML_DEFINITION = CHARS_TO_UINT32 ('\n', 'I', 'x', 'd'),
ITTI_DUMP_XML_DEFINITION_END = CHARS_TO_UINT32 ('i', 'X', 'D', '\n'),
ITTI_DUMP_MESSAGE_TYPE = CHARS_TO_UINT32 ('\n', 'I', 'm', 's'),
ITTI_DUMP_MESSAGE_TYPE_END = CHARS_TO_UINT32 ('i', 'M', 'S', '\n'),
ITTI_STATISTIC_MESSAGE_TYPE = CHARS_TO_UINT32 ('\n', 'I', 's', 't'),
ITTI_STATISTIC_MESSAGE_TYPE_END = CHARS_TO_UINT32 ('i', 'S', 'T', '\n'),
/* This signal is not meant to be used by remote analyzer */
ITTI_DUMP_EXIT_SIGNAL = CHARS_TO_UINT32 ('e', 'X', 'I', 'T'),
};
typedef uint32_t itti_message_types_t;
/* Message header is the common part that should never change between
* remote process and this one.
*/
typedef struct {
/* The size of this structure */
uint32_t message_size;
itti_message_types_t message_type;
} itti_socket_header_t;
typedef struct {
char message_number_char[12]; /* 9 chars are needed to store an unsigned 32 bits value in decimal, but must be a multiple of 32 bits to avoid alignment issues */
} itti_signal_header_t;
#define INSTANCE_DEFAULT (UINT16_MAX - 1)
#define INSTANCE_ALL (UINT16_MAX)
typedef uint16_t instance_t;
#endif

View File

@@ -1,71 +0,0 @@
/*
* 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
*/
#include <errno.h>
#include <string.h>
#ifndef RC_H_
#define RC_H_
#define RC_OK 0
#define RC_FAIL -1
#define RC_BAD_PARAM -2
#define RC_NULL_POINTER -3
static const char * const rc_strings[] =
{"Ok", "fail", "bad parameter", "null pointer"};
#define CHECK_FCT(fCT) \
do { \
int rET; \
if ((rET = fCT) != RC_OK) { \
fprintf(stderr, #fCT" has failed (%s:%d)\n", __FILE__, __LINE__); \
return rET; \
} \
} while(0)
#define CHECK_FCT_POSIX(fCT) \
do { \
if (fCT == -1) { \
fprintf(stderr, #fCT" has failed (%d:%s) (%s:%d)\n", errno, \
strerror(errno), __FILE__, __LINE__); \
return RC_FAIL; \
} \
} while(0)
#define CHECK_FCT_DO(fCT, dO) \
do { \
int rET; \
if ((rET = fCT) != RC_OK) { \
fprintf(stderr, #fCT" has returned %d (%s:%d)\n", rET, __FILE__, __LINE__); \
dO; \
} \
} while(0)
#define CHECK_BUFFER(bUFFER) \
do { \
if ((bUFFER) == NULL) { \
fprintf(stderr, #bUFFER" is NULL (%s:%d)\n", __FILE__, __LINE__); \
return RC_NULL_POINTER; \
} \
} while(0)
#endif /* RC_H_ */

View File

@@ -1,97 +0,0 @@
AC_PREREQ([2.68])
define([svnversion], esyscmd([sh -c "svnversion ..|tr -d '\n'"]))
AC_DEFINE(SVN_REVISION, "svnversion", [SVN Revision])
AC_INIT([itti_analyzer], [0.2.svnversion], [openair_admin@eurecom.fr])
AC_CANONICAL_BUILD
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([1.11 silent-rules])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE
AM_SILENT_RULES([yes])
AM_PROG_LIBTOOL
AC_PROG_RANLIB
AC_PROG_CXX
AC_FUNC_ALLOCA
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_INT8_T
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_CHECK_FUNCS([memset])
AC_CHECK_FUNCS([socket])
AC_CHECK_FUNCS([strdup])
AC_CHECK_FUNCS([strerror])
AC_CHECK_FUNCS([select])
AC_CHECK_FUNCS([strstr])
AC_CHECK_HEADERS([arpa/inet.h])
AC_CHECK_HEADERS([fcntl.h])
AC_CHECK_HEADERS([libintl.h])
AC_CHECK_HEADERS([malloc.h])
AC_CHECK_HEADERS([stddef.h])
AC_CHECK_HEADERS([netinet/in.h])
AC_CHECK_LIB(m, log10)
PKG_CHECK_MODULES(XML2, [libxml-2.0 >= 2.7.8], [HAVE_XML2=true], [AC_MSG_ERROR(lixml-2.0 not installed)])
CFLAGS="$CFLAGS $XML2_CFLAGS"
LIBS="$LIBS $XML2_LIBS"
AM_PATH_GTK_3_0(3.0.0, [], AC_MSG_ERROR(Requirement not met: gtk >= 3.0.0))
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
dnl Add these flags
CFLAGS="$CFLAGS -Wall"
CFLAGS="$CFLAGS -Wshadow"
CFLAGS="$CFLAGS -Wcast-align"
CFLAGS="$CFLAGS -Wchar-subscripts"
CFLAGS="$CFLAGS -Wmissing-prototypes"
CFLAGS="$CFLAGS -Wmissing-declarations"
CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
AC_SUBST([AM_CFLAGS])
AC_SUBST(ADD_CFLAGS)
dnl *** Autoconf support ***
AC_ARG_ENABLE(autoconf,
[ --disable-autoconf disable automatic generation of configure script ],
enable_autoconf=$enableval, enable_autoconf=yes
)
AC_PATH_PROG(AUTOCONF, autoconf, @echo autoconf not available)
AC_PATH_PROG(AUTOHEADER, autoheader, @echo autoheader not available)
if test -z "$AUTOCONF"; then enable_autoconf=no ; fi
if test -z "$AUTOHEADER"; then enable_autoconf=no ; fi
if test x$enable_autoconf = xyes; then
CONFIGURE_DEPENDS="configure.in aclocal.m4"
fi
AC_SUBST(CONFIGURE_DEPENDS)
AC_CONFIG_FILES(
libbuffers/Makefile \
libparser/Makefile \
libresolver/Makefile \
libui/Makefile \
Makefile \
)
AC_OUTPUT

View File

@@ -1,135 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<filters>
<messages>
<INITIALIZE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<ACTIVATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<DEACTIVATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<TERMINATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<MESSAGE_TEST enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<ERROR_LOG enabled="1" foreground_color="#000000" background_color="#ff8080"/>
<WARNING_LOG enabled="1" foreground_color="#303030" background_color="#fff050"/>
<NOTICE_LOG enabled="0" foreground_color="#585858" background_color="#ffffa0"/>
<INFO_LOG enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<DEBUG_LOG enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<GENERIC_LOG enabled="1" foreground_color="#246b24" background_color="#ffffff"/>
<TIMER_HAS_EXPIRED enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<PHY_DEACTIVATE_REQ enabled="1" foreground_color="#000000" background_color="#bef2ff"/>
<PHY_FIND_CELL_REQ enabled="1" foreground_color="#000000" background_color="#bef2ff"/>
<PHY_FIND_NEXT_CELL_REQ enabled="1" foreground_color="#000000" background_color="#bef2ff"/>
<PHY_FIND_CELL_IND enabled="1" foreground_color="#585858" background_color="#bef2ff"/>
<RRC_MAC_IN_SYNC_IND enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_OUT_OF_SYNC_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_BCCH_DATA_REQ enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_BCCH_DATA_IND enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_CCCH_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_CCCH_DATA_CNF enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_CCCH_DATA_IND enabled="1" foreground_color="#585858" background_color="#dfb9fc"/>
<RRC_MAC_MCCH_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_MCCH_DATA_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_DCCH_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_DCCH_DATA_IND enabled="1" foreground_color="#585858" background_color="#a7b1de"/>
<RRC_STATE_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_CONFIGURATION_REQ enabled="1" foreground_color="#ffffff" background_color="#4d2a73"/>
<NAS_CELL_SELECTION_REQ enabled="1" foreground_color="#ffffff" background_color="#2d315c"/>
<NAS_CONN_ESTABLI_REQ enabled="1" foreground_color="#ffffff" background_color="#2d315c"/>
<NAS_UPLINK_DATA_REQ enabled="1" foreground_color="#ffffff" background_color="#2d315c"/>
<NAS_RAB_ESTABLI_RSP enabled="1" foreground_color="#ffffff" background_color="#2d315c"/>
<NAS_CELL_SELECTION_CNF enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_CELL_SELECTION_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_PAGING_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_CONN_ESTABLI_CNF enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_CONN_RELEASE_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_UPLINK_DATA_CNF enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_DOWNLINK_DATA_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<S1AP_REGISTER_ENB_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<S1AP_REGISTER_ENB_CNF enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_DEREGISTERED_ENB_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_NAS_FIRST_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<S1AP_UPLINK_NAS enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CAPABILITIES_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_INITIAL_CONTEXT_SETUP_RESP enabled="1" foreground_color="#19431e" background_color="#cbffb1"/>
<S1AP_INITIAL_CONTEXT_SETUP_FAIL enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_NAS_NON_DELIVERY_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CONTEXT_RELEASE_RESP enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CTXT_MODIFICATION_RESP enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CTXT_MODIFICATION_FAIL enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_DOWNLINK_NAS enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_INITIAL_CONTEXT_SETUP_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<S1AP_UE_CTXT_MODIFICATION_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<S1AP_PAGING_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CONTEXT_RELEASE_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<SCTP_NEW_ASSOCIATION_REQ enabled="0" foreground_color="#000000" background_color="#aefeff"/>
<SCTP_NEW_ASSOCIATION_RESP enabled="0" foreground_color="#585858" background_color="#aefeff"/>
<SCTP_NEW_ASSOCIATION_IND enabled="1" foreground_color="#585858" background_color="#aefeff"/>
<SCTP_REGISTER_UPPER_LAYER enabled="1" foreground_color="#585858" background_color="#aefeff"/>
<SCTP_DATA_REQ enabled="1" foreground_color="#000000" background_color="#aefeff"/>
<SCTP_DATA_IND enabled="1" foreground_color="#585858" background_color="#aefeff"/>
<RRC_RAL_SYSTEM_CONFIGURATION_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_SYSTEM_INFORMATION_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_SCAN_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_SCAN_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONFIGURE_THRESHOLD_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONFIGURE_THRESHOLD_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_MEASUREMENT_REPORT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_ESTABLISHMENT_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_ESTABLISHMENT_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_ESTABLISHMENT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_REESTABLISHMENT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RECONFIGURATION_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RECONFIGURATION_HO_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RELEASE_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RELEASE_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RELEASE_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_UPLINK_DATA_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
</messages>
<origin_tasks>
<TASK_UNKNOWN enabled="1"/>
<TASK_TIMER enabled="1"/>
<TASK_L2L1 enabled="1"/>
<TASK_BM enabled="1"/>
<TASK_PHY_ENB enabled="1"/>
<TASK_MAC_ENB enabled="1"/>
<TASK_RLC_ENB enabled="1"/>
<TASK_PDCP_ENB enabled="1"/>
<TASK_DATA_FORWARDING enabled="1"/>
<TASK_END_MARKER enabled="1"/>
<TASK_RRC_ENB enabled="1"/>
<TASK_RAL_ENB enabled="1"/>
<TASK_S1AP enabled="1"/>
<TASK_X2AP enabled="1"/>
<TASK_SCTP enabled="1"/>
<TASK_ENB_APP enabled="1"/>
<TASK_PHY_UE enabled="1"/>
<TASK_MAC_UE enabled="1"/>
<TASK_RLC_UE enabled="1"/>
<TASK_PDCP_UE enabled="1"/>
<TASK_RRC_UE enabled="1"/>
<TASK_NAS_UE enabled="1"/>
<TASK_RAL_UE enabled="1"/>
</origin_tasks>
<destination_tasks>
<TASK_UNKNOWN enabled="1"/>
<TASK_TIMER enabled="1"/>
<TASK_L2L1 enabled="1"/>
<TASK_BM enabled="1"/>
<TASK_PHY_ENB enabled="1"/>
<TASK_MAC_ENB enabled="1"/>
<TASK_RLC_ENB enabled="1"/>
<TASK_PDCP_ENB enabled="1"/>
<TASK_DATA_FORWARDING enabled="1"/>
<TASK_END_MARKER enabled="1"/>
<TASK_RRC_ENB enabled="1"/>
<TASK_RAL_ENB enabled="1"/>
<TASK_S1AP enabled="1"/>
<TASK_X2AP enabled="1"/>
<TASK_SCTP enabled="1"/>
<TASK_ENB_APP enabled="1"/>
<TASK_PHY_UE enabled="1"/>
<TASK_MAC_UE enabled="1"/>
<TASK_RLC_UE enabled="1"/>
<TASK_PDCP_UE enabled="1"/>
<TASK_RRC_UE enabled="1"/>
<TASK_NAS_UE enabled="1"/>
<TASK_RAL_UE enabled="1"/>
</destination_tasks>
</filters>

View File

@@ -1,131 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<filters>
<messages>
<ACTIVATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<DEACTIVATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<DEBUG_LOG enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<ERROR_LOG enabled="1" foreground_color="#000000" background_color="#ff8080"/>
<GENERIC_LOG enabled="1" foreground_color="#246b24" background_color="#ffffff"/>
<GTPV1U_CREATE_TUNNEL_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<GTPV1U_CREATE_TUNNEL_RESP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<GTPV1U_DELETE_TUNNEL_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<GTPV1U_DELETE_TUNNEL_RESP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<GTPV1U_TUNNEL_DATA_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<GTPV1U_TUNNEL_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<GTPV1U_UPDATE_TUNNEL_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<GTPV1U_UPDATE_TUNNEL_RESP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<INFO_LOG enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<INITIALIZE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<MESSAGE_TEST enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<MME_APP_CONNECTION_ESTABLISHMENT_IND enabled="1" foreground_color="#90ff40" background_color="#805000"/>
<MME_APP_INITIAL_CONTEXT_SETUP_RSP enabled="1" foreground_color="#90ff40" background_color="#805000"/>
<NAS_AUTHENTICATION_PARAM_FAIL enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_AUTHENTICATION_PARAM_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_AUTHENTICATION_PARAM_RSP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_BEARER_PARAM enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_CONNECTION_ESTABLISHMENT_CNF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_CONNECTION_ESTABLISHMENT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_CONNECTION_RELEASE_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_CONN_ESTABLI_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_DL_EMM_PLAIN_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
<NAS_DL_EMM_PROTECTED_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
<NAS_DL_EMM_RAW_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
<NAS_DL_ESM_PLAIN_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
<NAS_DL_ESM_PROTECTED_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
<NAS_DL_ESM_RAW_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
<NAS_DOWNLINK_DATA_CNF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_DOWNLINK_DATA_REJ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_DOWNLINK_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_NON_DELIVERY_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_PAGING_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_PDN_CONNECTIVITY_REQ enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_RAB_ESTABLI_RSP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_RAB_ESTABLISHMENT_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_RAB_ESTABLISHMENT_RESP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_RAB_RELEASE_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_UL_EMM_PLAIN_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
<NAS_UL_EMM_PROTECTED_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
<NAS_UL_EMM_RAW_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
<NAS_UL_ESM_PLAIN_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
<NAS_UL_ESM_PROTECTED_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
<NAS_UL_ESM_RAW_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
<NAS_UPLINK_DATA_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_UPLINK_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NOTICE_LOG enabled="0" foreground_color="#585858" background_color="#ffffa0"/>
<S1AP_DEREGISTERED_ENB_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_DEREGISTER_UE_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_DOWNLINK_NAS_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_ENB_DEREGISTERED_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_INITIAL_CONTEXT_SETUP_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_INITIAL_CONTEXT_SETUP_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_INITIAL_UE_MESSAGE_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_NAS_NON_DELIVERY_IND_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_REGISTER_ENB_CNF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_S1_SETUP_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_UE_CAPABILITIES_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CAPABILITY_IND_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_UE_CONTEXT_RELEASE_COMMAND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CONTEXT_RELEASE_COMPLETE enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CONTEXT_RELEASE_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_UE_CONTEXT_RELEASE_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_UE_CONTEXT_RELEASE_REQ_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_UPLINK_NAS_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S6A_AUTH_INFO_ANS enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S6A_AUTH_INFO_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S6A_UPDATE_LOCATION_ANS enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S6A_UPDATE_LOCATION_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SCTP_CLOSE_ASSOCIATION enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SCTP_DATA_IND enabled="1" foreground_color="#585858" background_color="#aefeff"/>
<SCTP_DATA_REQ enabled="1" foreground_color="#000000" background_color="#aefeff"/>
<SCTP_INIT_MSG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SCTP_NEW_ASSOCIATION enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SCTP_NEW_ASSOCIATION_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SCTP_NEW_ASSOCIATION_REQ enabled="1" foreground_color="#000000" background_color="#aefeff"/>
<SCTP_NEW_ASSOCIATION_RESP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SGI_CREATE_ENDPOINT_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SGI_CREATE_ENDPOINT_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SGI_DELETE_ENDPOINT_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SGI_DELETE_ENDPOINT_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SGI_UPDATE_ENDPOINT_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SGI_UPDATE_ENDPOINT_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SGW_CREATE_SESSION_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SGW_CREATE_SESSION_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SGW_DELETE_SESSION_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SGW_DELETE_SESSION_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SGW_MODIFY_BEARER_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SGW_MODIFY_BEARER_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SGW_RELEASE_ACCESS_BEARERS_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<TERMINATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<TIMER_HAS_EXPIRED enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<UDP_DATA_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<UDP_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<UDP_INIT enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<WARNING_LOG enabled="1" foreground_color="#303030" background_color="#fff050"/>
</messages>
<origin_tasks>
<TASK_UNKNOWN enabled="1"/>
<TASK_TIMER enabled="0"/>
<TASK_GTPV1_U enabled="1"/>
<TASK_MME_APP enabled="1"/>
<TASK_NAS_MME enabled="1"/>
<TASK_S11 enabled="1"/>
<TASK_S1AP enabled="1"/>
<TASK_S6A enabled="1"/>
<TASK_SCTP enabled="1"/>
<TASK_SPGW_APP enabled="1"/>
<TASK_UDP enabled="1"/>
</origin_tasks>
<destination_tasks>
<TASK_UNKNOWN enabled="1"/>
<TASK_TIMER enabled="0"/>
<TASK_GTPV1_U enabled="1"/>
<TASK_MME_APP enabled="1"/>
<TASK_NAS_MME enabled="1"/>
<TASK_S11 enabled="1"/>
<TASK_S1AP enabled="1"/>
<TASK_S6A enabled="1"/>
<TASK_SCTP enabled="1"/>
<TASK_SPGW_APP enabled="1"/>
<TASK_UDP enabled="1"/>
</destination_tasks>
</filters>

View File

@@ -1,174 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<filters>
<messages>
<INITIALIZE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<ACTIVATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<DEACTIVATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<TERMINATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<MESSAGE_TEST enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<ERROR_LOG enabled="1" foreground_color="#000000" background_color="#ff8080"/>
<WARNING_LOG enabled="1" foreground_color="#303030" background_color="#fff050"/>
<NOTICE_LOG enabled="0" foreground_color="#585858" background_color="#ffffa0"/>
<INFO_LOG enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<DEBUG_LOG enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<GENERIC_LOG enabled="1" foreground_color="#246b24" background_color="#ffffff"/>
<TIMER_HAS_EXPIRED enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_CELL_SELECTION_CNF enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_CELL_SELECTION_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_CELL_SELECTION_REQ enabled="1" foreground_color="#ffffff" background_color="#2d315c"/>
<NAS_CONN_ESTABLI_CNF enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_CONN_ESTABLI_REQ enabled="1" foreground_color="#ffffff" background_color="#2d315c"/>
<NAS_CONN_RELEASE_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_DL_EMM_PLAIN_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
<NAS_DL_EMM_PROTECTED_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
<NAS_DL_EMM_RAW_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
<NAS_DL_ESM_PLAIN_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
<NAS_DL_ESM_PROTECTED_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
<NAS_DL_ESM_RAW_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
<NAS_DOWNLINK_DATA_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_PAGING_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_RAB_ESTABLI_RSP enabled="1" foreground_color="#ffffff" background_color="#2d315c"/>
<NAS_UL_EMM_PLAIN_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
<NAS_UL_EMM_PROTECTED_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
<NAS_UL_EMM_RAW_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
<NAS_UL_ESM_PLAIN_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
<NAS_UL_ESM_PROTECTED_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
<NAS_UL_ESM_RAW_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
<NAS_UPLINK_DATA_CNF enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_UPLINK_DATA_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<NAS_UPLINK_DATA_REQ enabled="1" foreground_color="#ffffff" background_color="#2d315c"/>
<PHY_DEACTIVATE_REQ enabled="1" foreground_color="#000000" background_color="#bef2ff"/>
<PHY_FIND_CELL_IND enabled="1" foreground_color="#585858" background_color="#bef2ff"/>
<PHY_FIND_CELL_REQ enabled="1" foreground_color="#000000" background_color="#bef2ff"/>
<PHY_FIND_NEXT_CELL_REQ enabled="1" foreground_color="#000000" background_color="#bef2ff"/>
<PHY_MEAS_REPORT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<PHY_MEAS_THRESHOLD_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<PHY_MEAS_THRESHOLD_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RLC_AM_DATA_PDU_IND enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RLC_AM_DATA_PDU_REQ enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RLC_AM_SDU_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RLC_AM_SDU_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RLC_AM_STATUS_PDU_IND enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RLC_AM_STATUS_PDU_REQ enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RLC_UM_DATA_PDU_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RLC_UM_DATA_PDU_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_CONFIGURATION_REQ enabled="1" foreground_color="#ffffff" background_color="#4d2a73"/>
<RRC_DCCH_DATA_IND enabled="1" foreground_color="#585858" background_color="#a7b1de"/>
<RRC_DCCH_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_DL_BCCH enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_DL_CCCH enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_DL_DCCH enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_DL_MCCH enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_BCCH_DATA_IND enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_BCCH_DATA_REQ enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_CCCH_DATA_CNF enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_CCCH_DATA_IND enabled="1" foreground_color="#585858" background_color="#dfb9fc"/>
<RRC_MAC_CCCH_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_IN_SYNC_IND enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_MCCH_DATA_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_MCCH_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_OUT_OF_SYNC_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONFIGURE_THRESHOLD_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONFIGURE_THRESHOLD_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_ESTABLISHMENT_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_ESTABLISHMENT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_ESTABLISHMENT_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RECONFIGURATION_HO_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RECONFIGURATION_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_REESTABLISHMENT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RELEASE_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RELEASE_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RELEASE_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_MEASUREMENT_REPORT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_SCAN_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_SCAN_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_SYSTEM_CONFIGURATION_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_SYSTEM_INFORMATION_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_STATE_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_UE_EUTRA_CAPABILITY enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_UL_CCCH enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_UL_DCCH enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_DEREGISTERED_ENB_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_DOWNLINK_NAS enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_DOWNLINK_NAS_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_INITIAL_CONTEXT_SETUP_FAIL enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_INITIAL_CONTEXT_SETUP_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_INITIAL_CONTEXT_SETUP_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<S1AP_INITIAL_CONTEXT_SETUP_RESP enabled="1" foreground_color="#19431e" background_color="#cbffb1"/>
<S1AP_INITIAL_UE_MESSAGE_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_NAS_FIRST_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<S1AP_NAS_NON_DELIVERY_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_NAS_NON_DELIVERY_IND_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_PAGING_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_REGISTER_ENB_CNF enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_REGISTER_ENB_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<S1AP_S1_SETUP_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_UE_CAPABILITIES_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CAPABILITY_IND_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_UE_CONTEXT_RELEASE_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_UE_CONTEXT_RELEASE_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<S1AP_UE_CONTEXT_RELEASE_REQ_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_UE_CONTEXT_RELEASE_RESP enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CTXT_MODIFICATION_FAIL enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CTXT_MODIFICATION_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<S1AP_UE_CTXT_MODIFICATION_RESP enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UPLINK_NAS enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UPLINK_NAS_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<SCTP_DATA_IND enabled="1" foreground_color="#585858" background_color="#aefeff"/>
<SCTP_DATA_REQ enabled="1" foreground_color="#000000" background_color="#aefeff"/>
<SCTP_NEW_ASSOCIATION_IND enabled="1" foreground_color="#585858" background_color="#aefeff"/>
<SCTP_NEW_ASSOCIATION_REQ enabled="1" foreground_color="#000000" background_color="#aefeff"/>
<SCTP_NEW_ASSOCIATION_RESP enabled="1" foreground_color="#585858" background_color="#aefeff"/>
<SCTP_REGISTER_UPPER_LAYER enabled="1" foreground_color="#585858" background_color="#aefeff"/>
</messages>
<origin_tasks>
<TASK_UNKNOWN enabled="1"/>
<TASK_TIMER enabled="1"/>
<TASK_L2L1 enabled="1"/>
<TASK_BM enabled="1"/>
<TASK_PHY_ENB enabled="1"/>
<TASK_MAC_ENB enabled="1"/>
<TASK_RLC_ENB enabled="1"/>
<TASK_PDCP_ENB enabled="1"/>
<TASK_DATA_FORWARDING enabled="1"/>
<TASK_END_MARKER enabled="1"/>
<TASK_RRC_ENB enabled="1"/>
<TASK_RAL_ENB enabled="1"/>
<TASK_S1AP enabled="1"/>
<TASK_X2AP enabled="1"/>
<TASK_SCTP enabled="1"/>
<TASK_ENB_APP enabled="1"/>
<TASK_PHY_UE enabled="1"/>
<TASK_MAC_UE enabled="1"/>
<TASK_RLC_UE enabled="1"/>
<TASK_PDCP_UE enabled="1"/>
<TASK_RRC_UE enabled="1"/>
<TASK_NAS_UE enabled="1"/>
<TASK_RAL_UE enabled="1"/>
</origin_tasks>
<destination_tasks>
<TASK_UNKNOWN enabled="1"/>
<TASK_TIMER enabled="1"/>
<TASK_L2L1 enabled="1"/>
<TASK_BM enabled="1"/>
<TASK_PHY_ENB enabled="1"/>
<TASK_MAC_ENB enabled="1"/>
<TASK_RLC_ENB enabled="1"/>
<TASK_PDCP_ENB enabled="1"/>
<TASK_DATA_FORWARDING enabled="1"/>
<TASK_END_MARKER enabled="1"/>
<TASK_RRC_ENB enabled="1"/>
<TASK_RAL_ENB enabled="1"/>
<TASK_S1AP enabled="1"/>
<TASK_X2AP enabled="1"/>
<TASK_SCTP enabled="1"/>
<TASK_ENB_APP enabled="1"/>
<TASK_PHY_UE enabled="1"/>
<TASK_MAC_UE enabled="1"/>
<TASK_RLC_UE enabled="1"/>
<TASK_PDCP_UE enabled="1"/>
<TASK_RRC_UE enabled="1"/>
<TASK_NAS_UE enabled="1"/>
<TASK_RAL_UE enabled="1"/>
</destination_tasks>
</filters>

View File

@@ -1,145 +0,0 @@
/*
* 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
*/
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <gtk/gtk.h>
#include <libxml/parser.h>
#include "xml_parse.h"
#include "resolvers.h"
#include "locate_root.h"
#include "file.h"
#include "ui_main_screen.h"
#include "rc.h"
#define G_LOG_LEVELS (G_LOG_LEVEL_ERROR | \
G_LOG_LEVEL_CRITICAL | \
G_LOG_LEVEL_WARNING | \
G_LOG_LEVEL_MESSAGE | \
G_LOG_LEVEL_INFO | \
G_LOG_LEVEL_DEBUG)
int debug_buffers = 1;
int debug_parser = 0;
static void console_log_handler(const char *log_domain, GLogLevelFlags log_level,
const char *message, gpointer user_data)
{
GLogLevelFlags domain_log_level = (GLogLevelFlags) user_data;
time_t curr;
struct tm *today;
const char *level;
if (ui_main_data.log_flags & domain_log_level & log_level)
{
switch (log_level & G_LOG_LEVEL_MASK)
{
case G_LOG_LEVEL_ERROR:
level = "Err ";
break;
case G_LOG_LEVEL_CRITICAL:
level = "Crit";
break;
case G_LOG_LEVEL_WARNING:
level = "Warn";
break;
case G_LOG_LEVEL_MESSAGE:
level = "Msg ";
break;
case G_LOG_LEVEL_INFO:
level = "Info";
break;
case G_LOG_LEVEL_DEBUG:
level = "Dbg ";
break;
default:
fprintf(stderr, "unknown log_level %u\n", log_level);
level = NULL;
g_assert_not_reached();
break;
}
/* create a "timestamp" */
time(&curr);
today = localtime(&curr);
fprintf(stderr, "%02u:%02u:%02u %-9s %s %s\n", today->tm_hour, today->tm_min, today->tm_sec,
log_domain != NULL ? log_domain : "", level, message);
}
}
int main(int argc, char *argv[])
{
int ret = 0;
GLogLevelFlags log_flags;
log_flags = (GLogLevelFlags)
(G_LOG_LEVEL_ERROR |
G_LOG_LEVEL_CRITICAL |
G_LOG_LEVEL_WARNING |
G_LOG_LEVEL_MESSAGE |
G_LOG_LEVEL_INFO |
G_LOG_LEVEL_DEBUG);
/* This initialize the library and check potential ABI mismatches
* between the version it was compiled for and the actual shared
* library used.
*/
LIBXML_TEST_VERSION;
xmlInitParser();
/* Initialize the widget set */
gtk_init(&argc, &argv);
/* Parse command line options */
ui_gtk_parse_arg (argc, argv);
/* Set log handlers:
* Domain, Levels, Handler, Domain enabled levels */
g_log_set_handler( NULL, log_flags, console_log_handler, (gpointer) (G_LOG_LEVELS));
g_log_set_handler("BUFFERS", log_flags, console_log_handler, (gpointer) (G_LOG_LEVELS & (~(G_LOG_LEVEL_DEBUG))));
g_log_set_handler("PARSER", log_flags, console_log_handler, (gpointer) (G_LOG_LEVELS & (~(G_LOG_LEVEL_DEBUG))));
g_log_set_handler("RESOLVER", log_flags, console_log_handler, (gpointer) (G_LOG_LEVELS & (~(G_LOG_LEVEL_DEBUG))));
g_log_set_handler("UI", log_flags, console_log_handler, (gpointer) (G_LOG_LEVELS & (~(G_LOG_LEVEL_DEBUG))));
g_log_set_handler("UI_CB", log_flags, console_log_handler, (gpointer) (G_LOG_LEVELS));
g_log_set_handler("UI_FILTER", log_flags, console_log_handler, (gpointer) (G_LOG_LEVELS & (~(G_LOG_LEVEL_DEBUG))));
g_log_set_handler("UI_INTER", log_flags, console_log_handler, (gpointer) (G_LOG_LEVELS));
g_log_set_handler("UI_TREE", log_flags, console_log_handler, (gpointer) (G_LOG_LEVELS & (~(G_LOG_LEVEL_DEBUG))));
CHECK_FCT(ui_gtk_initialize(argc, argv));
/* Enter the main event loop, and wait for user interaction */
gtk_main ();
/* Free the global variables that may
* have been allocated by the parser.
*/
xmlCleanupParser ();
return ret;
}

View File

@@ -1,13 +0,0 @@
AM_CFLAGS = \
@ADD_CFLAGS@ \
-I$(top_srcdir)/common \
-I$(top_srcdir)/libparser \
-I$(top_srcdir)/libui
noinst_LTLIBRARIES = libbuffers.la
libbuffers_la_LDFLAGS = -all-static
libbuffers_la_SOURCES = \
buffers.c buffers.h \
file.c file.h \
socket.c socket.h

View File

@@ -1,241 +0,0 @@
/*
* 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
*/
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define G_LOG_DOMAIN ("BUFFERS")
#include <glib.h>
#include "rc.h"
#include "buffers.h"
extern int debug_buffers;
static
int buffer_fetch(buffer_t *buffer, uint32_t offset, int size, void *value);
/* Try to fetch 8 bits unsigned from the buffer */
uint8_t buffer_get_uint8_t(buffer_t *buffer, uint32_t offset)
{
uint8_t value;
buffer_fetch(buffer, offset, 1, &value);
return value;
}
/* Try to fetch 16 bits unsigned from the buffer */
uint16_t buffer_get_uint16_t(buffer_t *buffer, uint32_t offset)
{
uint16_t value;
buffer_fetch(buffer, offset, 2, &value);
return value;
}
/* Try to fetch 32 bits unsigned from the buffer */
uint32_t buffer_get_uint32_t(buffer_t *buffer, uint32_t offset)
{
uint32_t value;
buffer_fetch(buffer, offset, 4, &value);
return value;
}
/* Try to fetch 64 bits unsigned from the buffer */
uint64_t buffer_get_uint64_t(buffer_t *buffer, uint32_t offset)
{
uint64_t value;
buffer_fetch(buffer, offset, 8, &value);
return value;
}
static
int buffer_fetch(buffer_t *buffer, uint32_t offset, int size, void *value)
{
if (buffer == NULL || value == NULL)
return -1;
if (size <= 0)
return -1;
if (buffer->size_bytes < ((offset >> 3) + size)) {
g_warning("Not enough data to fetch");
return -1;
}
memcpy(value, &buffer->data[offset >> 3], size);
buffer->buffer_current = &buffer->data[(offset >> 3) + size];
return 0;
}
int buffer_fetch_nbytes(buffer_t *buffer, uint32_t offset, int n_bytes, uint8_t *value)
{
if (buffer->size_bytes < ((offset >> 3) + n_bytes)) {
g_warning("Not enough data to fetch");
return -1;
}
memcpy(&value[0], &buffer->data[offset >> 3], n_bytes);
return 0;
}
int buffer_fetch_bits(buffer_t *buffer, uint32_t offset, int nbits, uint32_t *value)
{
uint32_t temp = 0;
int i;
if (buffer == NULL || value == NULL)
return RC_BAD_PARAM;
/* We cannot fetch more than 32 bits */
if (nbits > 32)
return RC_BAD_PARAM;
for (i = 0; i < nbits; i++)
{
temp |= ((buffer->data[(offset + i) / 8] >> ((offset + i) % 8)) & 1) << i;
}
*value = temp;
return RC_OK;
}
/**
* @brief Create a new buffer from data
* @param buffer caller reference where created buffer will be stored
* @param data Data to attach to the new buffer
* @param length Length of data buffer
* @param data_static flag that indicates if data pointer has been statically (= 0) or not (!= 0)
*/
int buffer_new_from_data(buffer_t **buffer, uint8_t *data, const uint32_t length,
int data_static)
{
buffer_t *new;
if (!buffer)
return RC_BAD_PARAM;
new = malloc(sizeof(buffer_t));
new->size_bytes = length;
if (data && length > 0) {
if (data_static == 0) {
new->data = malloc(sizeof(uint8_t) * new->size_bytes);
memcpy(new->data, data, new->size_bytes);
} else {
new->data = data;
}
new->buffer_current = &new->data[0];
} else {
new->buffer_current = NULL;
}
*buffer = new;
return 0;
}
#define INDENTED(fILE, x, y) \
do { \
int indentation = x; \
while(indentation--) fprintf(fILE, " "); \
y; \
} while(0)
#define INDENT_BREAK 20
void buffer_dump(buffer_t *buffer, FILE *to)
{
FILE *file = to;
uint32_t i;
if (!buffer)
return;
if (!to)
to = stdout;
fprintf(file, "<Buffer>\n");
INDENTED(file, 4, fprintf(file, "<Length>%u<Length>\n", buffer->size_bytes));
INDENTED(file, 4, fprintf(file, "<Bytes>\n"));
for (i = 0; i < buffer->size_bytes; i++)
{
if ((i % INDENT_BREAK) == 0)
fprintf(file, " ");
fprintf(file, "0x%02x ", buffer->data[i]);
if ((i % INDENT_BREAK) == (INDENT_BREAK - 1))
fprintf(file, "\n");
}
if ((i % INDENT_BREAK) != (INDENT_BREAK - 1))
fprintf(file, "\n");
INDENTED(file, 4, fprintf(file, "</Bytes>\n"));
fprintf(file, "</Buffer>\n");
}
int buffer_append_data(buffer_t *buffer, const uint8_t *data, const uint32_t length)
{
if (!buffer)
return -1;
if (data && length > 0) {
if (!buffer->data) {
buffer->size_bytes = length;
buffer->data = malloc(sizeof(uint8_t) * buffer->size_bytes);
memcpy(buffer->data, data, buffer->size_bytes);
} else {
buffer->data = realloc(buffer->data, sizeof(uint8_t) * (buffer->size_bytes + length));
memcpy(&buffer->data[buffer->size_bytes], data, length);
buffer->size_bytes += length;
}
buffer->buffer_current = &buffer->data[0];
}
return 0;
}
int buffer_has_enouch_data(buffer_t *buffer, uint32_t offset, uint32_t to_get)
{
int underflow;
if (!buffer)
return -1;
underflow = (buffer->size_bytes >= ((offset + to_get) / 8)) ? 0 : -1;
if (underflow && debug_buffers)
g_warning("Detected Underflow offset %u, to_get %u, buffer size %u\n",
offset, to_get, buffer->size_bytes);
return underflow;
}
void *buffer_at_offset(buffer_t *buffer, uint32_t offset)
{
// if (buffer_has_enouch_data(buffer, 0, offset) != 0) {
// return NULL;
// }
return &buffer->data[offset / 8];
}

View File

@@ -1,66 +0,0 @@
/*
* 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
*/
#include <stdint.h>
#ifndef BUFFERS_H_
#define BUFFERS_H_
typedef struct buffer_s {
/* The size in bytes as read from socket */
uint32_t size_bytes;
/* Current position */
uint8_t *buffer_current;
/* The complete data */
uint8_t *data;
/* The message number as read from socket */
uint32_t message_number;
uint32_t message_id;
} buffer_t;
uint8_t buffer_get_uint8_t(buffer_t *buffer, uint32_t offset);
uint16_t buffer_get_uint16_t(buffer_t *buffer, uint32_t offset);
uint32_t buffer_get_uint32_t(buffer_t *buffer, uint32_t offset);
uint64_t buffer_get_uint64_t(buffer_t *buffer, uint32_t offset);
int buffer_fetch_bits(buffer_t *buffer, uint32_t offset, int nbits, uint32_t *value);
int buffer_fetch_nbytes(buffer_t *buffer, uint32_t offset, int n_bytes, uint8_t *value);
void buffer_dump(buffer_t *buffer, FILE *to);
int buffer_append_data(buffer_t *buffer, const uint8_t *data, const uint32_t length);
int buffer_new_from_data(buffer_t **buffer, uint8_t *data, const uint32_t length,
int data_static);
int buffer_has_enouch_data(buffer_t *buffer, uint32_t offset, uint32_t to_get);
void *buffer_at_offset(buffer_t *buffer, uint32_t offset);
#endif /* BUFFERS_H_ */

View File

@@ -1,75 +0,0 @@
/*
* 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
*/
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#define G_LOG_DOMAIN ("BUFFERS")
#include <glib.h>
#include "rc.h"
#include "buffers.h"
#include "file.h"
#define READ_BUFFER_SIZE 1024
int file_read_dump(buffer_t **buffer, const char *filename)
{
int fd = -1;
buffer_t *new_buf = NULL;
uint8_t data[READ_BUFFER_SIZE];
ssize_t current_read;
if (!filename)
return RC_BAD_PARAM;
if ((fd = open(filename, O_RDONLY)) == -1) {
g_warning("Cannot open %s for reading, returned %d:%s\n",
filename, errno, strerror(errno));
return RC_FAIL;
}
CHECK_FCT(buffer_new_from_data(&new_buf, NULL, 0, 0));
do {
current_read = read(fd, data, READ_BUFFER_SIZE);
if (current_read == -1)
{
g_warning("Failed to read data from file, returned %d:%s\n",
errno, strerror(errno));
return RC_FAIL;
}
CHECK_FCT(buffer_append_data(new_buf, data, current_read));
} while(current_read == READ_BUFFER_SIZE);
*buffer = new_buf;
buffer_dump(new_buf, stdout);
close(fd);
return RC_OK;
}

View File

@@ -1,27 +0,0 @@
/*
* 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
*/
#ifndef FILE_H_
#define FILE_H_
int file_read_dump(buffer_t **buffer, const char *filename);
#endif /* FILE_H_ */

View File

@@ -1,444 +0,0 @@
/*
* 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
*/
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#define G_LOG_DOMAIN ("BUFFERS")
#include <gtk/gtk.h>
#include "logs.h"
#include "itti_types.h"
#include "rc.h"
#include "ui_interface.h"
#include "ui_notifications.h"
#include "ui_notif_dlg.h"
#include "socket.h"
#include "buffers.h"
#include "xml_parse.h"
/* Retry connection after 100 ms */
#define SOCKET_US_BEFORE_CONNECT_RETRY (100 * 1000)
/* About 10 minutes time-out for connecting to peer */
#define SOCKET_NB_CONNECT_RETRY ((10 * 60 * 1000 * 1000) / SOCKET_US_BEFORE_CONNECT_RETRY)
#define SOCKET_NB_SIGNALS_BEFORE_SIGNALLING 10
#define SOCKET_MS_BEFORE_SIGNALLING 100
gboolean socket_abort_connection = FALSE;
void *socket_thread_fct(void *arg);
static ssize_t socket_read_data(socket_data_t *socket_data, void *buffer, size_t size, int flags)
{
ssize_t recv_ret;
recv_ret = recv(socket_data->sd, buffer, size, flags);
if (recv_ret == -1) {
/* Failure case */
switch (errno) {
// case EWOULDBLOCK:
case EAGAIN:
return -1;
default:
g_info("recv failed: %s", g_strerror(errno));
pthread_exit(NULL);
break;
}
} else if (recv_ret == 0) {
/* We lost the connection with other peer or shutdown asked */
ui_pipe_write_message(socket_data->pipe_fd,
UI_PIPE_CONNECTION_LOST, NULL, 0);
free(socket_data->ip_address);
free(socket_data);
pthread_exit(NULL);
}
return recv_ret;
}
static void socket_notify_gui_update(socket_data_t *socket_data)
{
pipe_new_signals_list_message_t pipe_signal_list_message;
pipe_signal_list_message.signal_list = socket_data->signal_list;
socket_data->signal_list = NULL;
socket_data->nb_signals_since_last_update = 0;
/* Send an update notification */
ui_pipe_write_message(socket_data->pipe_fd,
UI_PIPE_UPDATE_SIGNAL_LIST, &pipe_signal_list_message,
sizeof(pipe_signal_list_message));
/* Acquire the last data notification */
socket_data->last_data_notification = g_get_monotonic_time();
}
static int socket_read_itti_message(socket_data_t *socket_data,
itti_socket_header_t *message_header)
{
itti_signal_header_t itti_signal_header;
buffer_t *buffer;
uint8_t *data;
size_t data_length;
ssize_t data_read = 0;
ssize_t total_data_read = 0;
g_assert(message_header != NULL);
g_debug("Attempting to read signal header from socket");
/* Read the sub-header of signal */
while (data_read != sizeof(itti_signal_header_t)) {
data_read = socket_read_data(socket_data, &itti_signal_header,
sizeof(itti_signal_header_t), 0);
}
data_length = message_header->message_size - sizeof(itti_socket_header_t) - sizeof(itti_signal_header_t);
data = malloc(sizeof(uint8_t) * data_length);
while (total_data_read < data_length) {
data_read = socket_read_data(socket_data, &data[total_data_read],
data_length - total_data_read, 0);
/* We are waiting for data */
if (data_read < 0) {
usleep(10);
} else {
total_data_read += data_read;
}
}
/* Create the new buffer */
if (buffer_new_from_data(&buffer, data, data_length - sizeof(itti_message_types_t), 1) != RC_OK) {
g_error("Failed to create new buffer");
g_assert_not_reached();
}
sscanf (itti_signal_header.message_number_char, MESSAGE_NUMBER_CHAR_FORMAT, &buffer->message_number);
// buffer_dump(buffer, stdout);
/* Update the number of signals received since last GUI update */
socket_data->nb_signals_since_last_update++;
socket_data->signal_list = g_list_append(socket_data->signal_list, (gpointer)buffer);
if (socket_data->nb_signals_since_last_update >= SOCKET_NB_SIGNALS_BEFORE_SIGNALLING) {
socket_notify_gui_update(socket_data);
}
g_debug("Successfully read new signal %u from socket", buffer->message_number);
return total_data_read + sizeof(itti_signal_header);
}
static int socket_read_xml_definition(socket_data_t *socket_data,
itti_socket_header_t *message_header)
{
ssize_t data_read;
ssize_t total_data_read = 0;
char *xml_definition;
size_t xml_definition_length;
pipe_xml_definition_message_t pipe_xml_definition_message;
xml_definition_length = message_header->message_size - sizeof(*message_header);
xml_definition = malloc(xml_definition_length * sizeof(char));
g_debug("Attempting to read XML definition of size %zu from socket",
xml_definition_length);
/* XML definition is a long message... so function may take some time */
do {
data_read = socket_read_data(socket_data, &xml_definition[total_data_read],
xml_definition_length - total_data_read, 0);
/* We are waiting for data */
if (data_read < 0) {
usleep(10);
} else {
total_data_read += data_read;
}
} while (total_data_read != xml_definition_length);
pipe_xml_definition_message.xml_definition = xml_definition;
pipe_xml_definition_message.xml_definition_length = xml_definition_length - sizeof(itti_message_types_t);
g_debug("Received XML definition of size %zu, effectively read %zu bytes",
xml_definition_length, total_data_read);
ui_pipe_write_message(socket_data->pipe_fd, UI_PIPE_XML_DEFINITION,
&pipe_xml_definition_message, sizeof(pipe_xml_definition_message));
return total_data_read;
}
static int socket_read(socket_data_t *socket_data)
{
int ret = 0;
itti_socket_header_t message_header;
while (ret >= 0) {
ret = socket_read_data(socket_data, &message_header, sizeof(message_header), 0);
if (ret == -1) {
return 0;
}
switch(message_header.message_type) {
case ITTI_DUMP_XML_DEFINITION:
socket_read_xml_definition(socket_data, &message_header);
break;
case ITTI_DUMP_MESSAGE_TYPE:
socket_read_itti_message(socket_data, &message_header);
break;
case ITTI_STATISTIC_MESSAGE_TYPE:
default:
g_warning("Received unknow (or not implemented) message from socket type: %d",
message_header.message_type);
break;
}
}
return 0;
}
static int socket_handle_disconnect_evt(socket_data_t *socket_data)
{
/* Send shutdown to remote host */
CHECK_FCT_POSIX(shutdown(socket_data->sd, SHUT_RDWR));
/* Close file descriptor */
CHECK_FCT_POSIX(close(socket_data->sd));
socket_data->sd = -1;
/* Close pipe */
close(socket_data->pipe_fd);
/* Leaving the thread */
pthread_exit(NULL);
return 0;
}
static int pipe_read_message(socket_data_t *socket_data)
{
pipe_input_header_t input_header;
uint8_t *input_data = NULL;
size_t input_data_length = 0;
/* Read the header */
if (read(socket_data->pipe_fd, &input_header, sizeof(input_header)) < 0) {
g_warning("Failed to read from pipe %d: %s", socket_data->pipe_fd,
g_strerror(errno));
return -1;
}
input_data_length = input_header.message_size - sizeof(input_header);
/* Checking for non-header part */
if (input_data_length > 0) {
input_data = malloc(sizeof(uint8_t) * input_data_length);
if (read(socket_data->pipe_fd, input_data, input_data_length) < 0) {
g_warning("Failed to read from pipe %d: %s", socket_data->pipe_fd,
g_strerror(errno));
return -1;
}
}
switch (input_header.message_type) {
case UI_PIPE_DISCONNECT_EVT:
return socket_handle_disconnect_evt(socket_data);
default:
g_warning("[socket] Unhandled message type %u", input_header.message_type);
g_assert_not_reached();
}
return 0;
}
void *socket_thread_fct(void *arg)
{
int ret;
struct sockaddr_in si_me;
socket_data_t *socket_data;
int retry = SOCKET_NB_CONNECT_RETRY;
/* master file descriptor list */
fd_set master_fds;
/* temp file descriptor list for select() */
fd_set read_fds;
int fd_max = 0;
struct timeval tv;
socket_data = (socket_data_t *)arg;
g_assert(socket_data != NULL);
/* Preparing the socket */
if ((socket_data->sd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
g_warning("socket failed: %s", g_strerror(errno));
free(socket_data->ip_address);
free(socket_data);
pthread_exit(NULL);
}
memset((void *)&si_me, 0, sizeof(si_me));
si_me.sin_family = AF_INET;
si_me.sin_port = htons(socket_data->port);
if (inet_aton(socket_data->ip_address, &si_me.sin_addr) == 0) {
g_warning("inet_aton() failed\n");
free(socket_data->ip_address);
free(socket_data);
pthread_exit(NULL);
}
/* clear the master and temp sets */
FD_ZERO(&master_fds);
FD_ZERO(&read_fds);
/* Add the GUI pipe to the list of sockets to monitor */
FD_SET(socket_data->pipe_fd, &master_fds);
/* Add the client socket to the list of sockets to monitor */
FD_SET(socket_data->sd, &master_fds);
/* Update the fd_max with the MAX of socket/pipe */
fd_max = MAX(socket_data->pipe_fd, socket_data->sd);
/* Setup the timeout for select.
* When a timeout is caught, check for new notifications to send to GUI.
*/
tv.tv_sec = 0;
tv.tv_usec = 1000 * SOCKET_MS_BEFORE_SIGNALLING;
do {
/* Connecting to remote peer */
ret = connect(socket_data->sd, (struct sockaddr *) &si_me, sizeof(struct sockaddr_in));
if (ret < 0) {
if ((socket_abort_connection) || (retry < 0)) {
if (retry < 0) {
g_warning("Failed to connect to peer %s:%d", socket_data->ip_address, socket_data->port);
ui_pipe_write_message(socket_data->pipe_fd, UI_PIPE_CONNECTION_FAILED, NULL, 0);
}
free(socket_data->ip_address);
free(socket_data);
socket_abort_connection = FALSE;
/* Quit the thread */
pthread_exit(NULL);
}
usleep(SOCKET_US_BEFORE_CONNECT_RETRY);
retry--;
}
} while (ret < 0);
/* Set the socket as non-blocking */
fcntl(socket_data->sd, F_SETFL, O_NONBLOCK);
while (1) {
memcpy(&read_fds, &master_fds, sizeof(master_fds));
ret = select(fd_max + 1, &read_fds, NULL, NULL, &tv);
if (ret < 0) {
g_warning("Error in select: %s", g_strerror(errno));
free(socket_data->ip_address);
free(socket_data);
/* Quit the thread */
pthread_exit(NULL);
} else if (ret == 0) {
/* Timeout for select: check if there is new incoming messages
* since last GUI update
*/
if (socket_data->nb_signals_since_last_update > 0) {
g_debug("Timout on select and data new signal in list");
g_debug("-> notify GUI");
socket_notify_gui_update(socket_data);
}
/* Reset the timeval to the max value */
tv.tv_usec = 1000 * SOCKET_MS_BEFORE_SIGNALLING;
}
/* Checking if there is data to read from the pipe */
if (FD_ISSET(socket_data->pipe_fd, &read_fds)) {
FD_CLR(socket_data->pipe_fd, &read_fds);
pipe_read_message(socket_data);
}
/* Checking if there is data to read from the socket */
if (FD_ISSET(socket_data->sd, &read_fds)) {
FD_CLR(socket_data->sd, &read_fds);
socket_read(socket_data);
/* Update the timeout of select if there is data not notify to GUI */
if (socket_data->nb_signals_since_last_update > 0) {
gint64 current_time;
current_time = g_get_monotonic_time();
if ((current_time - socket_data->last_data_notification) > SOCKET_MS_BEFORE_SIGNALLING) {
socket_notify_gui_update(socket_data);
tv.tv_usec = 1000 * SOCKET_MS_BEFORE_SIGNALLING;
} else {
/* Update tv */
tv.tv_usec = (1000 * SOCKET_MS_BEFORE_SIGNALLING) - (current_time - socket_data->last_data_notification);
}
}
}
}
return NULL;
}
int socket_connect_to_remote_host(const char *remote_ip, const uint16_t port,
int pipe_fd)
{
socket_data_t *socket_data;
socket_data = calloc(1, sizeof(*socket_data));
socket_data->ip_address = strdup(remote_ip);
socket_data->pipe_fd = pipe_fd;
socket_data->port = port;
socket_data->sd = -1;
if (pthread_create(&socket_data->thread, NULL, socket_thread_fct, socket_data) != 0) {
g_warning("Failed to create thread %d:%s", errno, strerror(errno));
free(socket_data->ip_address);
free(socket_data);
return RC_FAIL;
}
return RC_OK;
}

View File

@@ -1,23 +0,0 @@
AM_CFLAGS = \
@ADD_CFLAGS@ \
-I$(top_srcdir)/common \
-I$(top_srcdir)/libbuffers \
-I$(top_srcdir)/libui
noinst_LTLIBRARIES = libparser.la
libparser_la_LDFLAGS = -all-static
libparser_la_SOURCES = \
xml_parse.c \
array_type.c array_type.h \
enum_type.c enum_type.h \
enum_value_type.c enum_value_type.h \
file_type.c file_type.h \
field_type.c field_type.h \
fundamental_type.c fundamental_type.h \
pointer_type.h pointer_type.c \
reference_type.c reference_type.h \
struct_type.c struct_type.h \
typedef_type.c typedef_type.h \
types.h types.c \
union_type.c union_type.h

View File

@@ -1,180 +0,0 @@
/*
* 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
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <tgmath.h>
#define G_LOG_DOMAIN ("PARSER")
#include "array_type.h"
#include "fundamental_type.h"
#include "ui_interface.h"
int array_dissect_from_buffer(
types_t *type, ui_set_signal_text_cb_t ui_set_signal_text_cb, gpointer user_data,
buffer_t *buffer, uint32_t offset, uint32_t parent_offset, int indent, gboolean new_line)
{
types_t *type_child;
int length = 0;
char cbuf[50];
DISPLAY_PARSE_INFO("array", type->name, offset, parent_offset);
/* Ignore TYPEDEF children */
for (type_child = type->child; type_child != NULL && type_child->type == TYPE_TYPEDEF;
type_child = type_child->child) {
}
if (type->name) {
INDENTED(stdout, indent, fprintf(stdout, "<%s>\n", type->name));
}
if (type->child != NULL) {
int items = type->size / type_child->size;
int i;
int zero_counter = 0;
gboolean is_string = FALSE;
char *string;
int nb_digits = 0;
/* Factorizes trailing 0 */
if ((items > 1) && (type_child->type == TYPE_FUNDAMENTAL))
{
for (i = items - 1; i >= 0; i--)
{
if (fundamental_read_from_buffer(type_child, buffer, parent_offset, offset + i * type_child->size) == 0)
{
zero_counter ++;
}
else
{
break;
}
}
/* Check if this is an array of 8 bits items and if at least the firsts ones are not null */
if ((type_child->size == 8) && (zero_counter >= 1) && ((items - zero_counter) >= 2))
{
int end = items - zero_counter;
/* check if this is a printable string */
is_string = TRUE;
string = malloc(end + 1);
for (i = 0; i < end; i++)
{
string[i] = fundamental_read_from_buffer(type_child, buffer, parent_offset, offset + i * type_child->size);
if (isprint(string[i]) == 0)
{
/* This is not a printable string */
is_string = FALSE;
break;
}
}
if (is_string)
{
string[i] = '\0';
INDENTED_STRING(cbuf, indent, length = sprintf(cbuf, "[0 .. %d] \"%s\"\n", end - 1, string));
ui_set_signal_text_cb(user_data, cbuf, length);
}
}
/* Do not factorize if there is only one null item */
if (zero_counter <= 1)
{
zero_counter = 0;
}
}
if (is_string == FALSE)
{
nb_digits = log10(items - zero_counter) + 1;
for (i = 0; i < (items - zero_counter); i++)
{
INDENTED_STRING(cbuf, indent, length = sprintf(cbuf, "[%*d] ", nb_digits, i));
ui_set_signal_text_cb(user_data, cbuf, length);
type->child->type_dissect_from_buffer (
type->child, ui_set_signal_text_cb, user_data, buffer, parent_offset,
offset + i * type_child->size, indent,
FALSE);
}
if (zero_counter > 0)
{
INDENTED_STRING(cbuf, indent, length = sprintf(cbuf, "[%d .. %d] ", i, items -1));
ui_set_signal_text_cb(user_data, cbuf, length);
type->child->type_dissect_from_buffer (
type->child, ui_set_signal_text_cb, user_data,
buffer, parent_offset, offset + i * type_child->size, indent, FALSE);
}
}
}
if (type->name) {
INDENTED(stdout, indent, fprintf(stdout, "</%s>\n", type->name));
}
return 0;
}
int array_type_file_print(types_t *type, int indent, FILE *file) {
if (type == NULL)
return -1;
INDENTED(file, indent, fprintf(file, "<Array>\n"));
INDENTED(file, indent+4, fprintf(file, "Id .........: %d\n", type->id));
INDENTED(file, indent+4, fprintf(file, "Min ........: %d\n", type->min));
INDENTED(file, indent+4, fprintf(file, "Max ........: %d\n", type->max));
INDENTED(file, indent+4, fprintf(file, "Type .......: %d\n", type->type_xml));
INDENTED(file, indent+4, fprintf(file, "Size .......: %d\n", type->size));
INDENTED(file, indent+4, fprintf(file, "Align ......: %d\n", type->align));
if (type->file_ref != NULL)
type->file_ref->type_file_print (type->file_ref, indent + 4, file);
if (type->child != NULL)
type->child->type_file_print (type->child, indent + 4, file);
INDENTED(file, indent, fprintf(file, "</Array>\n"));
return 0;
}
int array_type_hr_display(types_t *type, int indent) {
if (type == NULL)
return -1;
INDENTED(stdout, indent, printf("<Array>\n"));
INDENTED(stdout, indent+4, printf("Id .........: %d\n", type->id));
INDENTED(stdout, indent+4, printf("Min ........: %d\n", type->min));
INDENTED(stdout, indent+4, printf("Max ........: %d\n", type->max));
INDENTED(stdout, indent+4, printf("Type .......: %d\n", type->type_xml));
INDENTED(stdout, indent+4, printf("Size .......: %d\n", type->size));
INDENTED(stdout, indent+4, printf("Align ......: %d\n", type->align));
if (type->file_ref != NULL)
type->file_ref->type_hr_display (type->file_ref, indent + 4);
if (type->child != NULL)
type->child->type_hr_display (type->child, indent + 4);
INDENTED(stdout, indent, printf("</Array>\n"));
return 0;
}

View File

@@ -1,35 +0,0 @@
/*
* 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
*/
#include "types.h"
#ifndef ARRAY_TYPE_H_
#define ARRAY_TYPE_H_
int array_dissect_from_buffer(
types_t *type, ui_set_signal_text_cb_t ui_set_signal_text_cb, gpointer user_data,
buffer_t *buffer, uint32_t offset, uint32_t parent_offset, int indent, gboolean new_line);
int array_type_hr_display(types_t *type, int indent);
int array_type_file_print(types_t *type, int indent, FILE *file);
#endif /* ARRAY_TYPE_H_ */

View File

@@ -1,124 +0,0 @@
/*
* 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
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#define G_LOG_DOMAIN ("PARSER")
#include "enum_type.h"
#include "ui_interface.h"
char *enum_type_get_name_from_value(types_t *type, uint32_t value)
{
char *enum_name = "UNKNOWN";
types_t *enum_value;
/* Loop on each enumeration values */
for (enum_value = type->child; enum_value; enum_value = enum_value->next) {
if (value == enum_value->init_value) {
enum_name = enum_value->name;
break;
}
}
return enum_name;
}
int enum_type_dissect_from_buffer(
types_t *type, ui_set_signal_text_cb_t ui_set_signal_text_cb, gpointer user_data,
buffer_t *buffer, uint32_t offset, uint32_t parent_offset, int indent, gboolean new_line)
{
uint32_t value = 0;
types_t *values;
DISPLAY_PARSE_INFO("enum", type->name, offset, parent_offset);
value = buffer_get_uint32_t(buffer, parent_offset + offset);
for (values = type->child; values; values = values->next) {
if (value == values->init_value) {
values->parent = type;
values->type_dissect_from_buffer(
values, ui_set_signal_text_cb, user_data, buffer, offset, parent_offset,
type->name == NULL ? indent: indent + DISPLAY_TAB_SIZE, FALSE);
break;
}
}
if (values == NULL) {
int length = 0;
char cbuf[50];
length = sprintf(cbuf, "(0x%08x) UNKNOWN;\n", value);
ui_set_signal_text_cb(user_data, cbuf, length);
}
return 0;
}
int enum_type_file_print(types_t *type, int indent, FILE *file)
{
types_t *values;
if (type == NULL)
return -1;
INDENTED(file, indent, fprintf(file, "<Enumeration>\n"));
INDENTED(file, indent+4, fprintf(file, "Name .......: %s\n", type->name));
INDENTED(file, indent+4, fprintf(file, "Size .......: %d\n", type->size));
INDENTED(file, indent+4, fprintf(file, "Align ......: %d\n", type->align));
INDENTED(file, indent+4, fprintf(file, "Artificial .: %d\n", type->artificial));
INDENTED(file, indent+4, fprintf(file, "File .......: %s\n", type->file));
INDENTED(file, indent+4, fprintf(file, "Line .......: %d\n", type->line));
if (type->file_ref != NULL)
type->file_ref->type_file_print(type->file_ref, indent+4, file);
/* Call enum values display */
for (values = type->child; values; values = values->next) {
values->type_file_print(values, indent + 4, file);
}
INDENTED(file, indent, fprintf(file, "</Enumeration>\n"));
return 0;
}
int enum_type_hr_display(types_t *type, int indent)
{
types_t *values;
if (type == NULL)
return -1;
INDENTED(stdout, indent, printf("<Enumeration>\n"));
INDENTED(stdout, indent+4, printf("Name .......: %s\n", type->name));
INDENTED(stdout, indent+4, printf("Size .......: %d\n", type->size));
INDENTED(stdout, indent+4, printf("Align ......: %d\n", type->align));
INDENTED(stdout, indent+4, printf("Artificial .: %d\n", type->artificial));
INDENTED(stdout, indent+4, printf("File .......: %s\n", type->file));
INDENTED(stdout, indent+4, printf("Line .......: %d\n", type->line));
if (type->file_ref != NULL)
type->file_ref->type_hr_display(type->file_ref, indent+4);
/* Call enum values display */
for (values = type->child; values; values = values->next) {
values->type_hr_display(values, indent + 4);
}
INDENTED(stdout, indent, printf("</Enumeration>\n"));
return 0;
}

View File

@@ -1,37 +0,0 @@
/*
* 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
*/
#include "types.h"
#ifndef ENUM_TYPE_H_
#define ENUM_TYPE_H_
char *enum_type_get_name_from_value(types_t *type, uint32_t value);
int enum_type_dissect_from_buffer(
types_t *type, ui_set_signal_text_cb_t ui_set_signal_text_cb, gpointer user_data,
buffer_t *buffer, uint32_t offset, uint32_t parent_offset, int indent, gboolean new_line);
int enum_type_file_print(types_t *type, int indent, FILE *file);
int enum_type_hr_display(types_t *type, int indent);
#endif /* ENUM_TYPE_H_ */

View File

@@ -1,99 +0,0 @@
/*
* 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
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#define G_LOG_DOMAIN ("PARSER")
#include "enum_value_type.h"
#include "ui_interface.h"
uint32_t last_enum_value;
int enum_value_dissect_from_buffer(
types_t *type, ui_set_signal_text_cb_t ui_set_signal_text_cb, gpointer user_data,
buffer_t *buffer, uint32_t offset, uint32_t parent_offset, int indent, gboolean new_line)
{
types_t *type_parent = NULL;
uint32_t value = 0;
DISPLAY_PARSE_INFO("enum_value", type->name, offset, parent_offset);
value = buffer_get_uint32_t(buffer, parent_offset + offset);
if (type->name) {
int length = 0;
char cbuf[50 + strlen(type->name)];
/* Search for enum variable name and check if it is used in association with a union type */
{
if (type->parent != NULL) {
/* Ignore ENUMERATION and TYPEDEF parents */
for (type_parent = type->parent; (type_parent != NULL) && ((type_parent->type == TYPE_ENUMERATION) || (type_parent->type == TYPE_TYPEDEF));
type_parent = type_parent->parent) {
}
}
if ((type_parent != NULL) && (type_parent->name != NULL) && (strcmp(type_parent->name, "present") == 0))
{
/* ASN1 union, keep the "present" member */
last_enum_value = value;
}
else
{
last_enum_value = 0;
}
}
length = sprintf(cbuf, "(0x%08x) %s;\n", value, type->name);
ui_set_signal_text_cb(user_data, cbuf, length);
}
return 0;
}
int enum_value_file_print(types_t *type, int indent, FILE *file)
{
if (type == NULL)
return -1;
INDENTED(file, indent, fprintf(file, "<Value>\n"));
INDENTED(file, indent+4, fprintf(file, "Name .......: %s\n", type->name));
INDENTED(file, indent+4, fprintf(file, "Value ......: %d\n", type->init_value));
if (type->file_ref != NULL)
type->file_ref->type_file_print(type->file_ref, indent+4, file);
INDENTED(file, indent, fprintf(file, "</Value>\n"));
return 0;
}
int enum_value_type_hr_display(types_t *type, int indent)
{
if (type == NULL)
return -1;
INDENTED(stdout, indent, printf("<Value>\n"));
INDENTED(stdout, indent+4, printf("Name .......: %s\n", type->name));
INDENTED(stdout, indent+4, printf("Value ......: %d\n", type->init_value));
if (type->file_ref != NULL)
type->file_ref->type_hr_display(type->file_ref, indent+4);
INDENTED(stdout, indent, printf("</Value>\n"));
return 0;
}

View File

@@ -1,37 +0,0 @@
/*
* 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
*/
#include "types.h"
#ifndef ENUM_VALUE_TYPE_H_
#define ENUM_VALUE_TYPE_H_
extern uint32_t last_enum_value;
int enum_value_dissect_from_buffer(
types_t *type, ui_set_signal_text_cb_t ui_set_signal_text_cb, gpointer user_data,
buffer_t *buffer, uint32_t offset, uint32_t parent_offset, int indent, gboolean new_line);
int enum_value_file_print(types_t *type, int indent, FILE *file);
int enum_value_type_hr_display(types_t *type, int indent);
#endif /* ENUM_VALUE_TYPE_H_ */

View File

@@ -1,180 +0,0 @@
/*
* 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
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#define G_LOG_DOMAIN ("PARSER")
#include "rc.h"
#include "field_type.h"
#include "buffers.h"
#include "ui_interface.h"
int field_dissect_from_buffer(
types_t *type, ui_set_signal_text_cb_t ui_set_signal_text_cb, gpointer user_data,
buffer_t *buffer, uint32_t offset, uint32_t parent_offset, int indent, gboolean new_line)
{
int length = 0;
char cbuf[50 + (type->name ? strlen (type->name) : 0)];
types_t *type_child;
char array_info[50];
new_line = FALSE;
DISPLAY_PARSE_INFO("field", type->name, offset, parent_offset);
CHECK_FCT(buffer_has_enouch_data(buffer, parent_offset + offset, type->size / 8));
if (type->bits == -1) {
if ((type->name != NULL) && (strcmp(type->name, "_asn_ctx") == 0)) {
/* Hide ASN1 asn_struct_ctx_t struct that hold context for parsing across buffer boundaries */
/*
INDENTED_STRING(cbuf, indent, sprintf(cbuf, ".asn_ctx ...\n"));
length = strlen (cbuf);
ui_set_signal_text_cb(user_data, cbuf, length);
*/
}
else {
if (type->child != NULL) {
/* Ignore TYPEDEF children */
for (type_child = type->child; type_child != NULL && type_child->type == TYPE_TYPEDEF; type_child =
type_child->child) {
}
if (type_child->type == TYPE_ARRAY) {
types_t *type_array_child;
/* Ignore TYPEDEF children */
for (type_array_child = type_child->child;
type_array_child != NULL && type_array_child->type == TYPE_TYPEDEF; type_array_child =
type_array_child->child) {
}
sprintf (array_info, "[%d]", type_child->size / type_array_child->size);
}
else {
array_info[0] = '\0';
}
DISPLAY_TYPE("Fld");
INDENTED_STRING(cbuf, indent, length = sprintf(cbuf, ".%s%s = ", type->name ? type->name : "Field", array_info));
ui_set_signal_text_cb(user_data, cbuf, length);
if (type_child->type == TYPE_ARRAY) {
DISPLAY_BRACE(ui_set_signal_text_cb(user_data, "{", 1);)
ui_set_signal_text_cb(user_data, "\n", 1);
new_line = TRUE;
}
/*
if (type_child->type == TYPE_STRUCT || type_child->type == TYPE_UNION) {
DISPLAY_BRACE(ui_set_signal_text_cb(user_data, "{", 1);)
ui_set_signal_text_cb(user_data, "\n", 1);
new_line = TRUE;
}
*/
type->child->parent = type;
type->child->type_dissect_from_buffer(
type->child, ui_set_signal_text_cb, user_data, buffer,
parent_offset, offset + type->offset, new_line ? indent + DISPLAY_TAB_SIZE : indent, new_line);
DISPLAY_BRACE(
if (type_child->type == TYPE_ARRAY) {
DISPLAY_TYPE("Fld");
INDENTED_STRING(cbuf, indent, length = sprintf(cbuf, "};\n"));
ui_set_signal_text_cb(user_data, cbuf, length);
});
/*
DISPLAY_BRACE(
if (type_child->type == TYPE_STRUCT || type_child->type == TYPE_UNION) {
DISPLAY_TYPE("Fld");
INDENTED_STRING(cbuf, indent, sprintf(cbuf, "};\n"));
length = strlen (cbuf);
ui_set_signal_text_cb(user_data, cbuf, length);
});
*/
}
}
}
else {
/* The field is only composed of bits */
uint32_t value = 0;
CHECK_FCT(buffer_fetch_bits(buffer, offset + type->offset + parent_offset, type->bits, &value));
DISPLAY_TYPE("Fld");
INDENTED_STRING(cbuf, indent,
length = sprintf(cbuf, ".%s:%d = (0x%0*x) %d;\n", type->name ? type->name : "Field", type->bits, (type->bits + 3) / 4, value, value));
ui_set_signal_text_cb(user_data, cbuf, length);
}
return 0;
}
int field_type_file_print(types_t *type, int indent, FILE *file) {
if (type == NULL)
return -1;
INDENTED(file, indent, fprintf(file, "<Field>\n"));
INDENTED(file, indent+4, fprintf(file, "Id .........: %d\n", type->id));
INDENTED(file, indent+4, fprintf(file, "Name .......: %s\n", type->name));
INDENTED(file, indent+4, fprintf(file, "Bits .......: %d\n", type->bits));
INDENTED(file, indent+4, fprintf(file, "Type .......: %d\n", type->type_xml));
INDENTED(file, indent+4, fprintf(file, "Offset .....: %d\n", type->offset));
INDENTED(file, indent+4, fprintf(file, "Context ....: %d\n", type->context));
INDENTED(file, indent+4, fprintf(file, "File .......: %s\n", type->file));
INDENTED(file, indent+4, fprintf(file, "Line .......: %d\n", type->line));
if (type->file_ref != NULL)
type->file_ref->type_file_print (type->file_ref, indent + 4, file);
if (type->child != NULL)
type->child->type_file_print (type->child, indent + 4, file);
INDENTED(file, indent, fprintf(file, "</Field>\n"));
return 0;
}
int field_type_hr_display(types_t *type, int indent) {
if (type == NULL)
return -1;
INDENTED(stdout, indent, printf("<Field>\n"));
INDENTED(stdout, indent+4, printf("Id .........: %d\n", type->id));
INDENTED(stdout, indent+4, printf("Name .......: %s\n", type->name));
INDENTED(stdout, indent+4, printf("Bits .......: %d\n", type->bits));
INDENTED(stdout, indent+4, printf("Type .......: %d\n", type->type_xml));
INDENTED(stdout, indent+4, printf("Offset .....: %d\n", type->offset));
INDENTED(stdout, indent+4, printf("Context ....: %d\n", type->context));
INDENTED(stdout, indent+4, printf("File .......: %s\n", type->file));
INDENTED(stdout, indent+4, printf("Line .......: %d\n", type->line));
if (type->file_ref != NULL)
type->file_ref->type_hr_display (type->file_ref, indent + 4);
if (type->child != NULL)
type->child->type_hr_display (type->child, indent + 4);
INDENTED(stdout, indent, printf("</Field>\n"));
return 0;
}

View File

@@ -1,35 +0,0 @@
/*
* 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
*/
#include "types.h"
#ifndef FIELD_TYPE_H_
#define FIELD_TYPE_H_
int field_dissect_from_buffer(
types_t *type, ui_set_signal_text_cb_t ui_set_signal_text_cb, gpointer user_data,
buffer_t *buffer, uint32_t offset, uint32_t parent_offset, int indent, gboolean new_line);
int field_type_file_print(types_t *type, int indent, FILE *file);
int field_type_hr_display(types_t *type, int indent);
#endif /* FIELD_TYPE_H_ */

View File

@@ -1,144 +0,0 @@
/*
* 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
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#define G_LOG_DOMAIN ("PARSER")
#include "fundamental_type.h"
#include "ui_interface.h"
uint64_t fundamental_read_from_buffer(types_t *type, buffer_t *buffer, uint32_t offset, uint32_t parent_offset) {
uint64_t value;
switch (type->size) {
case 8:
value = buffer_get_uint8_t (buffer, offset + parent_offset);
break;
case 16:
value = buffer_get_uint16_t (buffer, offset + parent_offset);
break;
case 32:
value = buffer_get_uint32_t (buffer, offset + parent_offset);
break;
case 64:
value = buffer_get_uint64_t (buffer, offset + parent_offset);
break;
default:
/* ??? */
value = 0;
break;
}
return value;
}
int fundamental_dissect_from_buffer(
types_t *type, ui_set_signal_text_cb_t ui_set_signal_text_cb, gpointer user_data,
buffer_t *buffer, uint32_t offset, uint32_t parent_offset, int indent, gboolean new_line)
{
int length = 0;
char cbuf[200];
int type_unsigned;
uint8_t value8;
uint16_t value16;
uint32_t value32;
uint64_t value64;
DISPLAY_PARSE_INFO("fundamental", type->name, offset, parent_offset);
memset (cbuf, 0, 200);
type_unsigned = strstr (type->name, "unsigned") == NULL ? 0 : 1;
value64 = fundamental_read_from_buffer(type, buffer, offset, parent_offset);
indent = new_line ? indent : 0;
if (indent > 0)
{
DISPLAY_TYPE("Fun");
}
switch (type->size) {
case 8:
value8 = (uint8_t) value64;
INDENTED_STRING(cbuf, indent,
length = sprintf(cbuf, type_unsigned ? "(0x%02" PRIx8 ") %3" PRIu8 ";\n" : "(0x%02" PRIx8 ") %4" PRId8 ";\n", value8, value8));
break;
case 16:
value16 = (uint16_t) value64;
INDENTED_STRING(cbuf, indent,
length = sprintf(cbuf, type_unsigned ? "(0x%04" PRIx16 ") %5" PRIu16 ";\n" : "(0x%04" PRIx16 ") %6" PRId16 ";\n", value16, value16));
break;
case 32:
value32 = (uint32_t) value64;
INDENTED_STRING(cbuf, indent,
length = sprintf(cbuf, type_unsigned ? "(0x%08" PRIx32 ") %9" PRIu32 ";\n" : "(0x%08" PRIx32 ") %10" PRId32 ";\n", value32, value32));
break;
case 64:
INDENTED_STRING(cbuf, indent,
length = sprintf(cbuf, type_unsigned ? "(0x%016" PRIx64 ") %20" PRIu64 ";\n" : "(0x%016" PRIx64 ") %20" PRId64 ";\n", value64, value64));
break;
default:
/* ??? */
break;
}
ui_set_signal_text_cb(user_data, cbuf, length);
return 0;
}
int fundamental_type_file_print(types_t *type, int indent, FILE *file) {
if (type == NULL)
return -1;
INDENTED(file, indent, fprintf(file, "<Fundamental>\n"));
INDENTED(file, indent+4, fprintf(file, "Name .......: %s\n", type->name));
INDENTED(file, indent+4, fprintf(file, "Id .........: %d\n", type->id));
INDENTED(file, indent+4, fprintf(file, "Size .......: %d\n", type->size));
INDENTED(file, indent+4, fprintf(file, "Align ......: %d\n", type->align));
if (type->file_ref != NULL)
type->file_ref->type_file_print (type->file_ref, indent + 4, file);
INDENTED(file, indent, fprintf(file, "</Fundamental>\n"));
return 0;
}
int fundamental_type_hr_display(types_t *type, int indent) {
if (type == NULL)
return -1;
INDENTED(stdout, indent, printf("<Fundamental>\n"));
INDENTED(stdout, indent+4, printf("Name .......: %s\n", type->name));
INDENTED(stdout, indent+4, printf("Id .........: %d\n", type->id));
INDENTED(stdout, indent+4, printf("Size .......: %d\n", type->size));
INDENTED(stdout, indent+4, printf("Align ......: %d\n", type->align));
if (type->file_ref != NULL)
type->file_ref->type_hr_display (type->file_ref, indent + 4);
INDENTED(stdout, indent, printf("</Fundamental>\n"));
return 0;
}

View File

@@ -1,37 +0,0 @@
/*
* 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
*/
#include "types.h"
#ifndef FUNDAMENTAL_TYPE_H_
#define FUNDAMENTAL_TYPE_H_
uint64_t fundamental_read_from_buffer(types_t *type, buffer_t *buffer, uint32_t offset, uint32_t parent_offset);
int fundamental_dissect_from_buffer(
types_t *type, ui_set_signal_text_cb_t ui_set_signal_text_cb, gpointer user_data,
buffer_t *buffer, uint32_t offset, uint32_t parent_offset, int indent, gboolean new_line);
int fundamental_type_file_print(types_t *type, int indent, FILE *file);
int fundamental_type_hr_display(types_t *type, int indent);
#endif /* FUNDAMENTAL_TYPE_H_ */

View File

@@ -1,35 +0,0 @@
/*
* 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
*/
#include "fundamental_type.h"
#include "struct_type.h"
#ifndef INTERTASK_CONTEXTS_H_
#define INTERTASK_CONTEXTS_H_
typedef struct {
/* List of fundamental types that can contruct any other type */
fundamental_type_t *ft_list;
struct_type_t *struct_list;
} intertask_context_t;
#endif /* INTERTASK_CONTEXTS_H_ */

View File

@@ -1,103 +0,0 @@
/*
* 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
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#define G_LOG_DOMAIN ("PARSER")
#include "pointer_type.h"
#include "ui_interface.h"
int pointer_dissect_from_buffer(
types_t *type, ui_set_signal_text_cb_t ui_set_signal_text_cb, gpointer user_data,
buffer_t *buffer, uint32_t offset, uint32_t parent_offset, int indent, gboolean new_line)
{
int length = 0, i;
char cbuf[200];
DISPLAY_PARSE_INFO("pointer", type->name, offset, parent_offset);
memset (cbuf, 0, 200);
uint8_t value[type->size / 8];
buffer_fetch_nbytes(buffer, parent_offset + offset, type->size / 8, value);
indent = new_line ? indent : 0;
if (indent > 0)
{
DISPLAY_TYPE("Ptr");
}
if (type->child && type->child->name) {
/*
INDENTED(stdout, indent, fprintf(stdout, "<%s>0x%08x</%s>\n",
type->child->name, value, type->child->name));
*/
INDENTED_STRING(cbuf, indent, length = sprintf(cbuf, "(%s *) 0x", type->child->name));
}
else {
/*
INDENTED(stdout, indent, fprintf(stdout, "<Pointer>0x%08x</Pointer>\n",
value));
*/
INDENTED_STRING(cbuf, indent, length = sprintf(cbuf, "(void *) 0x"));
}
/* Append the value */
for (i = type->size / 8 - 1; i >= 0; i--) {
length += sprintf(&cbuf[length], "%02x", value[i]);
}
length += sprintf(&cbuf[length], ";\n");
ui_set_signal_text_cb(user_data, cbuf, length);
return 0;
}
int pointer_type_file_print(types_t *type, int indent, FILE *file) {
if (type == NULL)
return -1;
INDENTED(file, indent, fprintf(file, "<Pointer>\n"));
INDENTED(file, indent+4, fprintf(file, "Id .........: %d\n", type->id));
INDENTED(file, indent+4, fprintf(file, "Type .......: %d\n", type->type_xml));
INDENTED(file, indent+4, fprintf(file, "Size .......: %d\n", type->size));
INDENTED(file, indent+4, fprintf(file, "Align ......: %d\n", type->align));
if (type->child != NULL) {
if (type->child->type == TYPE_FUNCTION) {
INDENTED(file, indent+4, fprintf(file, "<Function>\n"));
INDENTED(file, indent+8, fprintf(file, "<Args>To be done</Args>\n"));
INDENTED(file, indent+4, fprintf(file, "</Function>\n"));
} else {
type->child->type_file_print (type->child, indent + 4, file);
}
}
if (type->file_ref != NULL)
type->file_ref->type_file_print (type->file_ref, indent + 4, file);
INDENTED(file, indent, fprintf(file, "</Pointer>\n"));
return 0;
}
int pointer_type_hr_display(types_t *type, int indent) {
return pointer_type_file_print(type, indent, stdout);
}

Some files were not shown because too many files have changed in this diff Show More