Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG-RAN
Commits
34342ce7
Commit
34342ce7
authored
Dec 16, 2021
by
luis_pereira87
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into bler_txoptim
parents
a3cb841b
ee3a256b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
190 additions
and
62 deletions
+190
-62
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+8
-5
common/utils/telnetsrv/telnetsrv.c
common/utils/telnetsrv/telnetsrv.c
+0
-1
openair1/PHY/TOOLS/nr_phy_scope.c
openair1/PHY/TOOLS/nr_phy_scope.c
+5
-0
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+177
-56
No files found.
ci-scripts/cls_containerize.py
View file @
34342ce7
...
...
@@ -606,6 +606,9 @@ class Containerize():
HTML
.
CreateHtmlTestRow
(
RAN
.
runtime_stats
,
'KO'
,
logStatus
)
else
:
HTML
.
CreateHtmlTestRow
(
RAN
.
runtime_stats
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
# all the xNB run logs shall be on the server 0 for logCollecting
if
self
.
eNB_serverId
[
self
.
eNB_instance
]
!=
'0'
:
mySSH
.
copyout
(
self
.
eNBIPAddress
,
self
.
eNBUserName
,
self
.
eNBPassword
,
'./'
+
self
.
eNB_logFile
[
self
.
eNB_instance
],
self
.
eNBSourceCodePath
+
'/cmake_targets/'
)
logging
.
info
(
'
\u001B
[1m Undeploying OAI Object Pass
\u001B
[0m'
)
def
DeployGenObject
(
self
,
HTML
):
...
...
@@ -638,7 +641,7 @@ class Containerize():
cmd
=
'cd '
+
self
.
yamlPath
[
0
]
+
' && docker-compose -f docker-compose-ci.yml up -d '
+
self
.
services
[
0
]
logging
.
debug
(
cmd
)
try
:
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
3
0
)
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
10
0
)
except
Exception
as
e
:
self
.
exitStatus
=
1
logging
.
error
(
'Could not deploy'
)
...
...
@@ -651,7 +654,7 @@ class Containerize():
healthy
=
0
while
(
count
<
10
):
count
+=
1
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
1
0
)
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
3
0
)
healthy
=
0
for
state
in
deployStatus
.
split
(
'
\n
'
):
res
=
re
.
search
(
'Up \(healthy\)'
,
state
)
...
...
@@ -683,7 +686,7 @@ class Containerize():
# if the containers are running, recover the logs!
cmd
=
'cd '
+
self
.
yamlPath
[
0
]
+
' && docker-compose -f docker-compose-ci.yml ps --all'
logging
.
debug
(
cmd
)
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
1
0
)
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
3
0
)
anyLogs
=
False
for
state
in
deployStatus
.
split
(
'
\n
'
):
res
=
re
.
search
(
'Name|----------'
,
state
)
...
...
@@ -697,7 +700,7 @@ class Containerize():
cName
=
res
.
group
(
'container_name'
)
cmd
=
'cd '
+
self
.
yamlPath
[
0
]
+
' && docker logs '
+
cName
+
' > '
+
cName
+
'.log 2>&1'
logging
.
debug
(
cmd
)
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
1
0
)
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
3
0
)
if
anyLogs
:
cmd
=
'mkdir -p ../cmake_targets/log && mv '
+
self
.
yamlPath
[
0
]
+
'/*.log ../cmake_targets/log'
logging
.
debug
(
cmd
)
...
...
@@ -805,7 +808,7 @@ class Containerize():
time
.
sleep
(
5
)
cmd
=
'docker cp '
+
self
.
svrContName
+
':/tmp/iperf_server.log ../cmake_targets/log/iperf_server_'
+
HTML
.
testCase_id
+
'.log'
logging
.
debug
(
cmd
)
serverStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
1
0
)
serverStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
3
0
)
# Analyze client output
result
=
re
.
search
(
'Server Report:'
,
clientStatus
)
...
...
common/utils/telnetsrv/telnetsrv.c
View file @
34342ce7
...
...
@@ -51,7 +51,6 @@
#include <dlfcn.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <form.h>
#include "common/utils/load_module_shlib.h"
#include "common/config/config_userapi.h"
#include "common/utils/threadPool/thread-pool.h"
...
...
openair1/PHY/TOOLS/nr_phy_scope.c
View file @
34342ce7
...
...
@@ -449,6 +449,7 @@ static OAI_phy_scope_t *create_phy_scope_gnb(void) {
OAI_phy_scope_t
*
fdui
=
calloc
((
sizeof
*
fdui
),
1
);
// Define form
fdui
->
phy_scope
=
fl_bgn_form
(
FL_NO_BOX
,
800
,
800
);
fl_set_form_dblbuffer
(
fdui
->
phy_scope
,
1
);
// This the whole UI box
obj
=
fl_add_box
(
FL_BORDER_BOX
,
0
,
0
,
800
,
800
,
""
);
fl_set_object_color
(
obj
,
FL_BLACK
,
FL_WHITE
);
...
...
@@ -530,7 +531,10 @@ static void *scope_thread_gNB(void *arg) {
OAI_phy_scope_t
*
form_gnb
=
create_phy_scope_gnb
();
while
(
!
oai_exit
)
{
fl_freeze_form
(
form_gnb
->
phy_scope
);
phy_scope_gNB
(
form_gnb
,
p
,
nb_ue
);
fl_unfreeze_form
(
form_gnb
->
phy_scope
);
fl_redraw_form
(
form_gnb
->
phy_scope
);
usleep
(
99
*
1000
);
}
...
...
@@ -801,6 +805,7 @@ static OAI_phy_scope_t *create_phy_scope_nrue( int ID ) {
OAI_phy_scope_t
*
fdui
=
calloc
((
sizeof
*
fdui
),
1
);
// Define form
fdui
->
phy_scope
=
fl_bgn_form
(
FL_NO_BOX
,
800
,
900
);
fl_set_form_dblbuffer
(
fdui
->
phy_scope
,
1
);
// This the whole UI box
obj
=
fl_add_box
(
FL_BORDER_BOX
,
0
,
0
,
800
,
900
,
""
);
fl_set_object_color
(
obj
,
FL_BLACK
,
FL_BLACK
);
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
34342ce7
...
...
@@ -215,6 +215,182 @@ void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
/* rlc_data_req queue - end */
/****************************************************************************/
/****************************************************************************/
/* pdcp_data_ind thread - begin */
/****************************************************************************/
typedef
struct
{
protocol_ctxt_t
ctxt_pP
;
srb_flag_t
srb_flagP
;
MBMS_flag_t
MBMS_flagP
;
rb_id_t
rb_id
;
sdu_size_t
sdu_buffer_size
;
mem_block_t
*
sdu_buffer
;
}
pdcp_data_ind_queue_item
;
#define PDCP_DATA_IND_QUEUE_SIZE 10000
typedef
struct
{
pdcp_data_ind_queue_item
q
[
PDCP_DATA_IND_QUEUE_SIZE
];
volatile
int
start
;
volatile
int
length
;
pthread_mutex_t
m
;
pthread_cond_t
c
;
}
pdcp_data_ind_queue
;
static
pdcp_data_ind_queue
pq
;
static
void
do_pdcp_data_ind
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
srb_flag_t
srb_flagP
,
const
MBMS_flag_t
MBMS_flagP
,
const
rb_id_t
rb_id
,
const
sdu_size_t
sdu_buffer_size
,
mem_block_t
*
const
sdu_buffer
)
{
nr_pdcp_ue_t
*
ue
;
nr_pdcp_entity_t
*
rb
;
int
rnti
=
ctxt_pP
->
rnti
;
if
(
ctxt_pP
->
module_id
!=
0
||
//ctxt_pP->enb_flag != 1 ||
ctxt_pP
->
instance
!=
0
||
ctxt_pP
->
eNB_index
!=
0
||
ctxt_pP
->
configured
!=
1
||
ctxt_pP
->
brOption
!=
0
)
{
LOG_E
(
PDCP
,
"%s:%d:%s: fatal
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
if
(
ctxt_pP
->
enb_flag
)
T
(
T_ENB_PDCP_UL
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
rnti
),
T_INT
(
rb_id
),
T_INT
(
sdu_buffer_size
));
nr_pdcp_manager_lock
(
nr_pdcp_ue_manager
);
ue
=
nr_pdcp_manager_get_ue
(
nr_pdcp_ue_manager
,
rnti
);
if
(
srb_flagP
==
1
)
{
if
(
rb_id
<
1
||
rb_id
>
2
)
rb
=
NULL
;
else
rb
=
ue
->
srb
[
rb_id
-
1
];
}
else
{
if
(
rb_id
<
1
||
rb_id
>
5
)
rb
=
NULL
;
else
rb
=
ue
->
drb
[
rb_id
-
1
];
}
if
(
rb
!=
NULL
)
{
rb
->
recv_pdu
(
rb
,
(
char
*
)
sdu_buffer
->
data
,
sdu_buffer_size
);
}
else
{
LOG_E
(
PDCP
,
"%s:%d:%s: fatal: no RB found (rb_id %ld, srb_flag %d)
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
rb_id
,
srb_flagP
);
exit
(
1
);
}
nr_pdcp_manager_unlock
(
nr_pdcp_ue_manager
);
free_mem_block
(
sdu_buffer
,
__FUNCTION__
);
}
static
void
*
pdcp_data_ind_thread
(
void
*
_
)
{
int
i
;
pthread_setname_np
(
pthread_self
(),
"PDCP data ind"
);
while
(
1
)
{
if
(
pthread_mutex_lock
(
&
pq
.
m
)
!=
0
)
abort
();
while
(
pq
.
length
==
0
)
if
(
pthread_cond_wait
(
&
pq
.
c
,
&
pq
.
m
)
!=
0
)
abort
();
i
=
pq
.
start
;
if
(
pthread_mutex_unlock
(
&
pq
.
m
)
!=
0
)
abort
();
do_pdcp_data_ind
(
&
pq
.
q
[
i
].
ctxt_pP
,
pq
.
q
[
i
].
srb_flagP
,
pq
.
q
[
i
].
MBMS_flagP
,
pq
.
q
[
i
].
rb_id
,
pq
.
q
[
i
].
sdu_buffer_size
,
pq
.
q
[
i
].
sdu_buffer
);
if
(
pthread_mutex_lock
(
&
pq
.
m
)
!=
0
)
abort
();
pq
.
length
--
;
pq
.
start
=
(
pq
.
start
+
1
)
%
PDCP_DATA_IND_QUEUE_SIZE
;
if
(
pthread_cond_signal
(
&
pq
.
c
)
!=
0
)
abort
();
if
(
pthread_mutex_unlock
(
&
pq
.
m
)
!=
0
)
abort
();
}
}
static
void
init_nr_pdcp_data_ind_queue
(
void
)
{
pthread_t
t
;
pthread_mutex_init
(
&
pq
.
m
,
NULL
);
pthread_cond_init
(
&
pq
.
c
,
NULL
);
if
(
pthread_create
(
&
t
,
NULL
,
pdcp_data_ind_thread
,
NULL
)
!=
0
)
{
LOG_E
(
PDCP
,
"%s:%d:%s: fatal
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
}
static
void
enqueue_pdcp_data_ind
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
srb_flag_t
srb_flagP
,
const
MBMS_flag_t
MBMS_flagP
,
const
rb_id_t
rb_id
,
const
sdu_size_t
sdu_buffer_size
,
mem_block_t
*
const
sdu_buffer
)
{
int
i
;
int
logged
=
0
;
if
(
pthread_mutex_lock
(
&
pq
.
m
)
!=
0
)
abort
();
while
(
pq
.
length
==
PDCP_DATA_IND_QUEUE_SIZE
)
{
if
(
!
logged
)
{
logged
=
1
;
LOG_W
(
PDCP
,
"%s: pdcp_data_ind queue is full
\n
"
,
__FUNCTION__
);
}
if
(
pthread_cond_wait
(
&
pq
.
c
,
&
pq
.
m
)
!=
0
)
abort
();
}
i
=
(
pq
.
start
+
pq
.
length
)
%
PDCP_DATA_IND_QUEUE_SIZE
;
pq
.
length
++
;
pq
.
q
[
i
].
ctxt_pP
=
*
ctxt_pP
;
pq
.
q
[
i
].
srb_flagP
=
srb_flagP
;
pq
.
q
[
i
].
MBMS_flagP
=
MBMS_flagP
;
pq
.
q
[
i
].
rb_id
=
rb_id
;
pq
.
q
[
i
].
sdu_buffer_size
=
sdu_buffer_size
;
pq
.
q
[
i
].
sdu_buffer
=
sdu_buffer
;
if
(
pthread_cond_signal
(
&
pq
.
c
)
!=
0
)
abort
();
if
(
pthread_mutex_unlock
(
&
pq
.
m
)
!=
0
)
abort
();
}
boolean_t
pdcp_data_ind
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
srb_flag_t
srb_flagP
,
const
MBMS_flag_t
MBMS_flagP
,
const
rb_id_t
rb_id
,
const
sdu_size_t
sdu_buffer_size
,
mem_block_t
*
const
sdu_buffer
)
{
enqueue_pdcp_data_ind
(
ctxt_pP
,
srb_flagP
,
MBMS_flagP
,
rb_id
,
sdu_buffer_size
,
sdu_buffer
);
return
true
;
}
/****************************************************************************/
/* pdcp_data_ind thread - end */
/****************************************************************************/
/****************************************************************************/
/* hacks to be cleaned up at some point - begin */
/****************************************************************************/
...
...
@@ -375,6 +551,7 @@ void pdcp_layer_init(void)
init_nr_rlc_data_req_queue
();
}
init_nr_pdcp_data_ind_queue
();
nr_pdcp_init_timer_thread
(
nr_pdcp_ue_manager
);
}
...
...
@@ -639,62 +816,6 @@ srb_found:
}
}
boolean_t
pdcp_data_ind
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
srb_flag_t
srb_flagP
,
const
MBMS_flag_t
MBMS_flagP
,
const
rb_id_t
rb_id
,
const
sdu_size_t
sdu_buffer_size
,
mem_block_t
*
const
sdu_buffer
)
{
nr_pdcp_ue_t
*
ue
;
nr_pdcp_entity_t
*
rb
;
int
rnti
=
ctxt_pP
->
rnti
;
if
(
ctxt_pP
->
module_id
!=
0
||
//ctxt_pP->enb_flag != 1 ||
ctxt_pP
->
instance
!=
0
||
ctxt_pP
->
eNB_index
!=
0
||
ctxt_pP
->
configured
!=
1
||
ctxt_pP
->
brOption
!=
0
)
{
LOG_E
(
PDCP
,
"%s:%d:%s: fatal
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
if
(
ctxt_pP
->
enb_flag
)
T
(
T_ENB_PDCP_UL
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
rnti
),
T_INT
(
rb_id
),
T_INT
(
sdu_buffer_size
));
nr_pdcp_manager_lock
(
nr_pdcp_ue_manager
);
ue
=
nr_pdcp_manager_get_ue
(
nr_pdcp_ue_manager
,
rnti
);
if
(
srb_flagP
==
1
)
{
if
(
rb_id
<
1
||
rb_id
>
2
)
rb
=
NULL
;
else
rb
=
ue
->
srb
[
rb_id
-
1
];
}
else
{
if
(
rb_id
<
1
||
rb_id
>
5
)
rb
=
NULL
;
else
rb
=
ue
->
drb
[
rb_id
-
1
];
}
if
(
rb
!=
NULL
)
{
rb
->
recv_pdu
(
rb
,
(
char
*
)
sdu_buffer
->
data
,
sdu_buffer_size
);
}
else
{
LOG_E
(
PDCP
,
"%s:%d:%s: fatal: no RB found (rb_id %ld, srb_flag %d)
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
rb_id
,
srb_flagP
);
exit
(
1
);
}
nr_pdcp_manager_unlock
(
nr_pdcp_ue_manager
);
free_mem_block
(
sdu_buffer
,
__FUNCTION__
);
return
1
;
}
void
pdcp_run
(
const
protocol_ctxt_t
*
const
ctxt_pP
)
{
MessageDef
*
msg_p
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment