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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
edd749ec
Commit
edd749ec
authored
May 04, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fix-x2-sctp-nsa' into integration_2022_wk18
parents
9dae4a94
85eb5926
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
66 deletions
+45
-66
ci-scripts/ran.py
ci-scripts/ran.py
+30
-42
openair2/X2AP/x2ap_eNB.c
openair2/X2AP/x2ap_eNB.c
+7
-12
openair3/SCTP/sctp_common.h
openair3/SCTP/sctp_common.h
+1
-1
openair3/SCTP/sctp_eNB_task.c
openair3/SCTP/sctp_eNB_task.c
+7
-11
No files found.
ci-scripts/ran.py
View file @
edd749ec
...
...
@@ -372,36 +372,28 @@ class RANManagement():
else
:
pcapfile_prefix
=
"gnb_"
mySSH
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
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
())
if
result
is
not
None
:
eth_interface
=
result
.
group
(
'eth_interface'
)
fltr
=
'port 38412 or port 36412 or port 36422'
# NGAP, S1AP, X2AP
logging
.
debug
(
'
\u001B
[1m Launching tshark on interface '
+
eth_interface
+
' with filter "'
+
fltr
+
'"
\u001B
[0m'
)
pcapfile
=
pcapfile_prefix
+
self
.
testCase_id
+
'_log.pcap'
mySSH
.
command
(
'echo '
+
lPassWord
+
' | sudo -S rm -f /tmp/'
+
pcapfile
,
'\$'
,
5
)
mySSH
.
command
(
'echo $USER; nohup sudo -E tshark -i '
+
eth_interface
+
' -f "'
+
fltr
+
'" -w /tmp/'
+
pcapfile
+
' > /dev/null 2>&1 &'
,
'\$'
,
5
)
eth_interface
=
'any'
fltr
=
'sctp'
logging
.
debug
(
'
\u001B
[1m Launching tshark on interface '
+
eth_interface
+
' with filter "'
+
fltr
+
'"
\u001B
[0m'
)
pcapfile
=
pcapfile_prefix
+
self
.
testCase_id
+
'_log.pcap'
mySSH
.
command
(
'echo '
+
lPassWord
+
' | sudo -S rm -f /tmp/'
+
pcapfile
,
'\$'
,
5
)
mySSH
.
command
(
'echo $USER; nohup sudo -E tshark -i '
+
eth_interface
+
' -f "'
+
fltr
+
'" -w /tmp/'
+
pcapfile
+
' > /dev/null 2>&1 &'
,
'\$'
,
5
)
mySSH
.
close
()
# 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
):
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
())
if
result
is
not
None
:
eth_interface
=
result
.
group
(
'eth_interface'
)
fltr
=
'port 38412 or port 36412 or port 36422'
# NGAP, S1AP, X2AP
logging
.
debug
(
'
\u001B
[1m Launching tshark on interface '
+
eth_interface
+
' with filter "'
+
fltr
+
'"
\u001B
[0m'
)
self
.
epcPcapFile
=
'enb_'
+
self
.
testCase_id
+
'_s1log.pcap'
mySSH
.
command
(
'echo '
+
localEpcPassword
+
' | sudo -S rm -f /tmp/'
+
self
.
epcPcapFile
,
'\$'
,
5
)
mySSH
.
command
(
'echo $USER; nohup sudo tshark -f "host '
+
lIpAddr
+
'" -i '
+
eth_interface
+
' -f "'
+
fltr
+
'" -w /tmp/'
+
self
.
epcPcapFile
+
' > /tmp/tshark.log 2>&1 &'
,
localEpcUserName
,
5
)
mySSH
.
close
()
localEpcIpAddr
=
EPC
.
IPAddress
localEpcUserName
=
EPC
.
UserName
localEpcPassword
=
EPC
.
Password
mySSH
.
open
(
localEpcIpAddr
,
localEpcUserName
,
localEpcPassword
)
eth_interface
=
'any'
fltr
=
'sctp'
logging
.
debug
(
'
\u001B
[1m Launching tshark on interface '
+
eth_interface
+
' with filter "'
+
fltr
+
'"
\u001B
[0m'
)
self
.
epcPcapFile
=
'enb_'
+
self
.
testCase_id
+
'_s1log.pcap'
mySSH
.
command
(
'echo '
+
localEpcPassword
+
' | sudo -S rm -f /tmp/'
+
self
.
epcPcapFile
,
'\$'
,
5
)
mySSH
.
command
(
'echo $USER; nohup sudo tshark -f "host '
+
lIpAddr
+
'" -i '
+
eth_interface
+
' -f "'
+
fltr
+
'" -w /tmp/'
+
self
.
epcPcapFile
+
' > /tmp/tshark.log 2>&1 &'
,
localEpcUserName
,
5
)
mySSH
.
close
()
mySSH
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
mySSH
.
command
(
'cd '
+
lSourcePath
,
'\$'
,
5
)
# Initialize_eNB_args usually start with -O and followed by the location in repository
...
...
@@ -519,23 +511,19 @@ class RANManagement():
logging
.
error
(
'
\u001B
[1;37;41m eNB/gNB/ocp-eNB logging system did not show got sync!
\u001B
[0m'
)
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
):
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
)
if
self
.
epcPcapFile
!=
''
:
time
.
sleep
(
0.5
)
mySSH
.
command
(
'echo '
+
localEpcPassword
+
' | sudo -S chmod 666 /tmp/'
+
self
.
epcPcapFile
,
'\$'
,
5
)
mySSH
.
close
()
time
.
sleep
(
1
)
if
self
.
epcPcapFile
!=
''
:
copyin_res
=
mySSH
.
copyin
(
localEpcIpAddr
,
localEpcUserName
,
localEpcPassword
,
'/tmp/'
+
self
.
epcPcapFile
,
'.'
)
if
(
copyin_res
==
0
):
mySSH
.
copyout
(
lIpAddr
,
lUserName
,
lPassWord
,
self
.
epcPcapFile
,
lSourcePath
+
'/cmake_targets/.'
)
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
)
if
self
.
epcPcapFile
!=
''
:
mySSH
.
command
(
'echo '
+
localEpcPassword
+
' | sudo -S chmod 666 /tmp/'
+
self
.
epcPcapFile
,
'\$'
,
5
)
mySSH
.
close
()
if
self
.
epcPcapFile
!=
''
:
copyin_res
=
mySSH
.
copyin
(
localEpcIpAddr
,
localEpcUserName
,
localEpcPassword
,
'/tmp/'
+
self
.
epcPcapFile
,
'.'
)
if
(
copyin_res
==
0
):
mySSH
.
copyout
(
lIpAddr
,
lUserName
,
lPassWord
,
self
.
epcPcapFile
,
lSourcePath
+
'/cmake_targets/.'
)
self
.
prematureExit
=
True
return
else
:
...
...
openair2/X2AP/x2ap_eNB.c
View file @
edd749ec
...
...
@@ -70,8 +70,7 @@ void x2ap_eNB_register_eNB(x2ap_eNB_instance_t *instance_p,
net_ip_address_t
*
local_ip_addr
,
uint16_t
in_streams
,
uint16_t
out_streams
,
uint32_t
enb_port_for_X2C
,
int
multi_sd
);
uint32_t
enb_port_for_X2C
);
static
void
x2ap_eNB_handle_handover_req
(
instance_t
instance
,
...
...
@@ -249,20 +248,17 @@ static void x2ap_eNB_register_eNB(x2ap_eNB_instance_t *instance_p,
net_ip_address_t
*
local_ip_addr
,
uint16_t
in_streams
,
uint16_t
out_streams
,
uint32_t
enb_port_for_X2C
,
int
multi_sd
)
{
uint32_t
enb_port_for_X2C
)
{
MessageDef
*
message
=
NULL
;
sctp_new_association_req_multi_t
*
sctp_new_association_req
=
NULL
;
x2ap_eNB_data_t
*
x2ap_enb_data
=
NULL
;
DevAssert
(
instance_p
!=
NULL
);
DevAssert
(
target_eNB_ip_address
!=
NULL
);
message
=
itti_alloc_new_message
(
TASK_X2AP
,
0
,
SCTP_NEW_ASSOCIATION_REQ
_MULTI
);
sctp_new_association_req
=
&
message
->
ittiMsg
.
sctp_new_association_req_multi
;
message
=
itti_alloc_new_message
(
TASK_X2AP
,
0
,
SCTP_NEW_ASSOCIATION_REQ
);
sctp_new_association_req_t
*
sctp_new_association_req
=
&
message
->
ittiMsg
.
sctp_new_association_req
;
sctp_new_association_req
->
port
=
enb_port_for_X2C
;
sctp_new_association_req
->
ppid
=
X2AP_SCTP_PPID
;
sctp_new_association_req
->
in_streams
=
in_streams
;
sctp_new_association_req
->
out_streams
=
out_streams
;
sctp_new_association_req
->
multi_sd
=
multi_sd
;
memcpy
(
&
sctp_new_association_req
->
remote_address
,
target_eNB_ip_address
,
sizeof
(
*
target_eNB_ip_address
));
...
...
@@ -399,8 +395,7 @@ void x2ap_eNB_handle_sctp_init_msg_multi_cnf(
&
instance
->
enb_x2_ip_address
,
instance
->
sctp_in_streams
,
instance
->
sctp_out_streams
,
instance
->
enb_port_for_X2C
,
instance
->
multi_sd
);
instance
->
enb_port_for_X2C
);
}
}
...
...
@@ -645,7 +640,8 @@ void *x2ap_task(void *arg) {
while
(
1
)
{
itti_receive_msg
(
TASK_X2AP
,
&
received_msg
);
LOG_D
(
X2AP
,
"Received message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
switch
(
ITTI_MSG_ID
(
received_msg
))
{
case
TERMINATE_MESSAGE
:
X2AP_WARN
(
" *** Exiting X2AP thread
\n
"
);
...
...
@@ -684,7 +680,6 @@ void *x2ap_task(void *arg) {
case
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
:
x2ap_gNB_trigger_sgNB_add_req_ack
(
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
),
&
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
received_msg
));
LOG_I
(
X2AP
,
"Received elements for X2AP_ENDC_SGNB_ADDITION_REQ_ACK
\n
"
);
break
;
case
X2AP_ENDC_SGNB_RECONF_COMPLETE
:
...
...
openair3/SCTP/sctp_common.h
View file @
edd749ec
...
...
@@ -37,7 +37,7 @@
#if defined(ENB_MODE)
# include "common/utils/LOG/log.h"
# define SCTP_ERROR(x, args...) LOG_E(SCTP, x, ##args)
# define SCTP_DEBUG(x, args...) LOG_
I
(SCTP, x, ##args)
# define SCTP_DEBUG(x, args...) LOG_
D
(SCTP, x, ##args)
# define SCTP_WARN(x, args...) LOG_W(SCTP, x, ##args)
#else
# define SCTP_ERROR(x, args...) do { fprintf(stderr, "[SCTP][E]"x, ##args); } while(0)
...
...
openair3/SCTP/sctp_eNB_task.c
View file @
edd749ec
...
...
@@ -318,7 +318,8 @@ sctp_handle_new_association_req_multi(
assoc_id
,
used_address
);
}
}
else
{
SCTP_DEBUG
(
"sctp_connectx SUCCESS, used %d addresses assoc_id %d
\n
"
,
SCTP_DEBUG
(
"sctp_connectx SUCCESS, socket %d used %d addresses assoc_id %d
\n
"
,
sd
,
used_address
,
assoc_id
);
}
...
...
@@ -750,7 +751,7 @@ static int sctp_create_new_listener(
}
if
(
server_type
)
{
if
((
sd
=
socket
(
P
F_INET
,
SOCK_SEQPACKET
,
IPPROTO_SCTP
))
<
0
)
{
if
((
sd
=
socket
(
A
F_INET
,
SOCK_SEQPACKET
,
IPPROTO_SCTP
))
<
0
)
{
SCTP_ERROR
(
"socket: %s:%d
\n
"
,
strerror
(
errno
),
errno
);
free
(
addr
);
return
-
1
;
...
...
@@ -822,7 +823,7 @@ static int sctp_create_new_listener(
sctp_cnx
=
NULL
;
return
-
1
;
}
SCTP_DEBUG
(
"Created listen socket: %d
\n
"
,
sd
);
/* Insert new element at end of list */
STAILQ_INSERT_TAIL
(
&
sctp_cnx_list
,
sctp_cnx
,
entries
);
sctp_nb_cnx
++
;
...
...
@@ -1110,11 +1111,10 @@ void *sctp_eNB_process_itti_msg(void *notUsed)
/* Check if there is a packet to handle */
if
(
received_msg
!=
NULL
)
{
LOG_D
(
SCTP
,
"Received message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
switch
(
ITTI_MSG_ID
(
received_msg
))
{
case
SCTP_INIT_MSG
:
{
SCTP_DEBUG
(
"Received SCTP_INIT_MSG
\n
"
);
/* We received a new connection request */
if
(
sctp_create_new_listener
(
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
),
ITTI_MSG_ORIGIN_ID
(
received_msg
),
...
...
@@ -1126,11 +1126,7 @@ void *sctp_eNB_process_itti_msg(void *notUsed)
break
;
case
SCTP_INIT_MSG_MULTI_REQ
:
{
int
multi_sd
;
SCTP_DEBUG
(
"Received SCTP_INIT_MSG_MULTI_REQ
\n
"
);
multi_sd
=
sctp_create_new_listener
(
int
multi_sd
=
sctp_create_new_listener
(
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
),
ITTI_MSG_ORIGIN_ID
(
received_msg
),
&
received_msg
->
ittiMsg
.
sctp_init_multi
,
1
);
...
...
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