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
26be6116
Commit
26be6116
authored
Jul 10, 2022
by
laurent
Committed by
Sakthivel Velumani
Sep 13, 2022
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a race, add asn1c debug method
parent
26750d18
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
65 deletions
+25
-65
CMakeLists.txt
CMakeLists.txt
+4
-10
openair2/COMMON/e1ap_messages_types.h
openair2/COMMON/e1ap_messages_types.h
+0
-8
openair2/E1AP/e1ap.c
openair2/E1AP/e1ap.c
+8
-35
openair2/E1AP/e1ap_common.h
openair2/E1AP/e1ap_common.h
+1
-2
openair2/F1AP/f1ap_decoder.c
openair2/F1AP/f1ap_decoder.c
+2
-1
openair2/GNB_APP/gnb_app.c
openair2/GNB_APP/gnb_app.c
+3
-3
openair2/GNB_APP/gnb_app.h
openair2/GNB_APP/gnb_app.h
+3
-2
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+2
-2
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+2
-2
No files found.
CMakeLists.txt
View file @
26be6116
...
...
@@ -277,7 +277,7 @@ if (SANITIZE_UNDEFINED)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fsanitize=undefined -fno-sanitize-recover=all"
)
endif
()
add_definitions
(
"-DASN_DISABLE_OER_SUPPORT"
)
add_definitions
(
"-DASN_DISABLE_OER_SUPPORT
-DHAVE_CONFIG_H -DHAVE_CONFIG_H_
"
)
#########################
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
-ggdb2 -Wl,-rpath -Wl,
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
...
...
@@ -334,20 +334,12 @@ add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
# Debug related options
#########################################
add_boolean_option
(
ASN_EMIT_DEBUG True
"ASN1 coder/decoder Debug"
)
add_boolean_option
(
ASN_THREAD_SAFE True
"ASN1 coder/decoder Debug"
)
add_boolean_option
(
MSG_PRINT True
"print debug messages"
)
add_boolean_option
(
DISABLE_XER_PRINT False
"print XER Format"
)
add_boolean_option
(
XER_PRINT False
"print XER Format"
)
add_boolean_option
(
DEBUG_PDCP_PAYLOAD False
"print PDCP PDU to stdout"
)
# if true, make sure that global and PDCP log levels are trace
add_boolean_option
(
DEBUG_ASN1 False
"ASN1 coder/decoder Debug"
)
add_boolean_option
(
DEBUG_MAC_INTERFACE False
"print MAC-RLC PDU exchange to stdout"
)
# if true, make sure that global and PDCP log levels are trace
add_boolean_option
(
TRACE_RLC_PAYLOAD False
"print RLC PDU to stdout"
)
# if true, make sure that global and PDCP log levels are trace
add_boolean_option
(
PRINT_STATS False
"This adds the possibility to see the status"
)
add_boolean_option
(
T_TRACER True
"Activate the T tracer, a debugging/monitoring framework"
)
add_boolean_option
(
UE_AUTOTEST_TRACE False
"Activate UE autotest specific logs"
)
add_boolean_option
(
UE_DEBUG_TRACE False
"Activate UE debug trace"
)
add_boolean_option
(
UE_TIMING_TRACE False
"Activate UE timing trace"
)
add_boolean_option
(
DEBUG_CONSOLE False
"disables stdout/stderr buffering"
)
set
(
OCP_ITTI
${
OPENAIR_DIR
}
/common/utils/ocp_itti
)
add_library
(
ITTI
...
...
@@ -355,6 +347,8 @@ add_library(ITTI
${
OPENAIR_DIR
}
/common/utils/backtrace.c
)
add_dependencies
(
ITTI rrc_flag
)
add_dependencies
(
ITTI ASN1_E1AP_LIB
)
# asn1c skeletons have hardcoded this flag to make customized debug logs
# OAI uses this feature to re-use OAI LOG_I(ASN, ...)
...
...
openair2/COMMON/e1ap_messages_types.h
View file @
26be6116
...
...
@@ -24,9 +24,6 @@
#ifndef E1AP_MESSAGES_TYPES_H
#define E1AP_MESSAGES_TYPES_H
#include "E1AP_E1AP-PDU.h"
#include "E1AP_TransactionID.h"
#include "E1AP_PriorityLevel.h"
#include "ngap_messages_types.h"
#define E1AP_MAX_NUM_TRANSAC_IDS 4
...
...
@@ -49,11 +46,6 @@
typedef
f1ap_net_ip_address_t
e1ap_net_ip_address_t
;
typedef
int
(
*
e1ap_message_processing_t
)(
instance_t
instance
,
E1AP_E1AP_PDU_t
*
message_p
);
typedef
struct
PLMN_ID_s
{
int
mcc
;
int
mnc
;
...
...
openair2/E1AP/e1ap.c
View file @
26be6116
...
...
@@ -25,7 +25,10 @@
#include "e1ap_common.h"
#define E1AP_NUM_MSG_HANDLERS 14
typedef
int
(
*
e1ap_message_processing_t
)(
instance_t
instance
,
E1AP_E1AP_PDU_t
*
message_p
);
e1ap_message_processing_t
e1ap_message_processing
[
E1AP_NUM_MSG_HANDLERS
][
3
]
=
{
{
0
,
0
,
0
},
/* Reset */
...
...
@@ -556,46 +559,16 @@ int e1apCUCP_send_BEARER_CONTEXT_SETUP_REQUEST(instance_t instance,
ieC5
->
id
=
E1AP_ProtocolIE_ID_id_ActivityNotificationLevel
;
ieC5
->
criticality
=
E1AP_Criticality_reject
;
ieC5
->
value
.
present
=
E1AP_BearerContextSetupRequestIEs__value_PR_ActivityNotificationLevel
;
ieC5
->
value
.
choice
.
ActivityNotificationLevel
=
2
;
// TODO: Remove hard coding
ieC5
->
value
.
choice
.
ActivityNotificationLevel
=
E1AP_ActivityNotificationLevel_pdu_session
;
// TODO: Remove hard coding
/* mandatory */
/* */
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
E1AP_BearerContextSetupRequestIEs_t
,
ieC6
);
ieC6
->
id
=
E1AP_ProtocolIE_ID_id_System_BearerContextSetupRequest
;
ieC6
->
criticality
=
E1AP_Criticality_reject
;
if
(
0
)
{
// EUTRAN
ieC6
->
value
.
choice
.
System_BearerContextSetupRequest
.
present
=
E1AP_System_BearerContextSetupRequest_PR_e_UTRAN_BearerContextSetupRequest
;
E1AP_EUTRAN_BearerContextSetupRequest_t
*
msgEUTRAN
=
calloc
(
1
,
sizeof
(
E1AP_EUTRAN_BearerContextSetupRequest_t
));
ieC6
->
value
.
choice
.
System_BearerContextSetupRequest
.
choice
.
e_UTRAN_BearerContextSetupRequest
=
(
struct
E1AP_ProtocolIE_Container
*
)
msgEUTRAN
;
msgEUTRAN
->
id
=
E1AP_ProtocolIE_ID_id_DRB_To_Setup_List_EUTRAN
;
msgEUTRAN
->
value
.
present
=
E1AP_EUTRAN_BearerContextSetupRequest__value_PR_DRB_To_Setup_List_EUTRAN
;
E1AP_DRB_To_Setup_List_EUTRAN_t
*
drb2Setup
=
&
msgEUTRAN
->
value
.
choice
.
DRB_To_Setup_List_EUTRAN
;
for
(
drb_to_setup_t
*
i
=
bearerCxt
->
DRBList
;
i
<
bearerCxt
->
DRBList
+
bearerCxt
->
numDRBs
;
i
++
)
{
asn1cSequenceAdd
(
drb2Setup
->
list
,
E1AP_DRB_To_Setup_Item_EUTRAN_t
,
ieC6_1
);
ieC6_1
->
dRB_ID
=
i
->
drbId
;
ieC6_1
->
pDCP_Configuration
.
pDCP_SN_Size_UL
=
i
->
pDCP_SN_Size_UL
;
ieC6_1
->
pDCP_Configuration
.
pDCP_SN_Size_DL
=
i
->
pDCP_SN_Size_DL
;
ieC6_1
->
pDCP_Configuration
.
rLC_Mode
=
i
->
rLC_Mode
;
ieC6_1
->
eUTRAN_QoS
.
qCI
=
i
->
qci
;
ieC6_1
->
eUTRAN_QoS
.
eUTRANallocationAndRetentionPriority
.
priorityLevel
=
i
->
qosPriorityLevel
;
ieC6_1
->
eUTRAN_QoS
.
eUTRANallocationAndRetentionPriority
.
pre_emptionCapability
=
i
->
pre_emptionCapability
;
ieC6_1
->
eUTRAN_QoS
.
eUTRANallocationAndRetentionPriority
.
pre_emptionVulnerability
=
i
->
pre_emptionVulnerability
;
ieC6_1
->
s1_UL_UP_TNL_Information
.
present
=
E1AP_UP_TNL_Information_PR_gTPTunnel
;
asn1cCalloc
(
ieC6_1
->
s1_UL_UP_TNL_Information
.
choice
.
gTPTunnel
,
gTPTunnel
);
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING
(
i
->
tlAddress
,
&
gTPTunnel
->
transportLayerAddress
);
INT32_TO_OCTET_STRING
(
i
->
teId
,
&
gTPTunnel
->
gTP_TEID
);
for
(
cell_group_t
*
j
=
i
->
cellGroupList
;
j
<
i
->
cellGroupList
+
i
->
numCellGroups
;
j
++
)
{
asn1cSequenceAdd
(
ieC6_1
->
cell_Group_Information
.
list
,
E1AP_Cell_Group_Information_Item_t
,
ieC6_1_1
);
ieC6_1_1
->
cell_Group_ID
=
j
->
id
;
}
}
}
else
{
/* mandatory */
/* */
ieC6
->
value
.
present
=
E1AP_System_BearerContextSetupRequest_PR_nG_RAN_BearerContextSetupRequest
;
ieC6
->
value
.
choice
.
System_BearerContextSetupRequest
.
present
=
E1AP_System_BearerContextSetupRequest_PR_nG_RAN_BearerContextSetupRequest
;
E1AP_NG_RAN_BearerContextSetupRequest_t
*
msgNGRAN
=
calloc
(
1
,
sizeof
(
E1AP_NG_RAN_BearerContextSetupRequest_t
));
ieC6
->
value
.
choice
.
System_BearerContextSetupRequest
.
choice
.
nG_RAN_BearerContextSetupRequest
=
(
struct
E1AP_ProtocolIE_Container
*
)
msgNGRAN
;
...
...
@@ -656,7 +629,7 @@ int e1apCUCP_send_BEARER_CONTEXT_SETUP_REQUEST(instance_t instance,
ieC6_1_1_1
->
qoSFlowLevelQoSParameters
.
nGRANallocationRetentionPriority
.
pre_emptionCapability
=
k
->
pre_emptionCapability
;
ieC6_1_1_1
->
qoSFlowLevelQoSParameters
.
nGRANallocationRetentionPriority
.
pre_emptionVulnerability
=
k
->
pre_emptionVulnerability
;
}
}
}
}
...
...
openair2/E1AP/e1ap_common.h
View file @
26be6116
...
...
@@ -23,9 +23,8 @@
#ifndef E1AP_COMMON_H_
#define E1AP_COMMON_H_
#include "openair2/COMMON/e1ap_messages_types.h"
//#define ASN_DEBUG( x... ) LOG_I(ASN, x)
int
e1ap_decode_pdu
(
E1AP_E1AP_PDU_t
*
pdu
,
const
uint8_t
*
const
buffer
,
uint32_t
length
);
e1ap_upcp_inst_t
*
getCxtE1
(
E1_t
type
,
instance_t
instance
);
...
...
openair2/F1AP/f1ap_decoder.c
View file @
26be6116
...
...
@@ -162,7 +162,8 @@ static int f1ap_decode_unsuccessful_outcome(F1AP_F1AP_PDU_t *pdu) {
int
f1ap_decode_pdu
(
F1AP_F1AP_PDU_t
*
pdu
,
const
uint8_t
*
const
buffer
,
uint32_t
length
)
{
asn_dec_rval_t
dec_ret
;
DevAssert
(
buffer
!=
NULL
);
dec_ret
=
aper_decode
(
NULL
,
asn_codec_ctx_t
st
=
{
100
*
1000
};
dec_ret
=
aper_decode
(
&
st
,
&
asn_DEF_F1AP_F1AP_PDU
,
(
void
**
)
&
pdu
,
buffer
,
...
...
openair2/GNB_APP/gnb_app.c
View file @
26be6116
...
...
@@ -60,7 +60,7 @@ extern RAN_CONTEXT_t RC;
#define GNB_REGISTER_RETRY_DELAY 10
/*------------------------------------------------------------------------------*/
static
void
configure_nr_rrc
(
uint32_t
gnb_id
)
void
configure_nr_rrc
(
uint32_t
gnb_id
)
{
MessageDef
*
msg_p
=
NULL
;
// int CC_id;
...
...
@@ -81,7 +81,7 @@ static void configure_nr_rrc(uint32_t gnb_id)
/*------------------------------------------------------------------------------*/
static
uint32_t
gNB_app_register
(
uint32_t
gnb_id_start
,
uint32_t
gnb_id_end
)
//, const Enb_properties_array_t *enb_properties)
uint32_t
gNB_app_register
(
uint32_t
gnb_id_start
,
uint32_t
gnb_id_end
)
//, const Enb_properties_array_t *enb_properties)
{
uint32_t
gnb_id
;
MessageDef
*
msg_p
;
...
...
@@ -116,7 +116,7 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//,
/*------------------------------------------------------------------------------*/
static
uint32_t
gNB_app_register_x2
(
uint32_t
gnb_id_start
,
uint32_t
gnb_id_end
)
{
uint32_t
gNB_app_register_x2
(
uint32_t
gnb_id_start
,
uint32_t
gnb_id_end
)
{
uint32_t
gnb_id
;
MessageDef
*
msg_p
;
uint32_t
register_gnb_x2_pending
=
0
;
...
...
openair2/GNB_APP/gnb_app.h
View file @
26be6116
...
...
@@ -33,6 +33,7 @@
#include <stdint.h>
void
*
gNB_app_task
(
void
*
args_p
);
void
configure_nr_rrc
(
uint32_t
gnb_id
);
uint32_t
gNB_app_register
(
uint32_t
gnb_id_start
,
uint32_t
gnb_id_end
);
uint32_t
gNB_app_register_x2
(
uint32_t
gnb_id_start
,
uint32_t
gnb_id_end
);
#endif
/* GNB_APP_H_ */
openair2/GNB_APP/gnb_config.c
View file @
26be6116
...
...
@@ -2013,8 +2013,8 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) {
f1Setup
->
mib_length
[
k
]
=
rrc
->
carrier
.
sizeof_MIB
;
NR_BCCH_DL_SCH_Message_t
*
bcch_message
=
NULL
;
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
asn_codec_ctx_t
st
=
{
100
*
1000
};
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
&
st
,
&
asn_DEF_NR_BCCH_DL_SCH_Message
,
(
void
**
)
&
bcch_message
,
(
const
void
*
)
rrc
->
carrier
.
SIB1
,
...
...
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
26be6116
...
...
@@ -1006,8 +1006,8 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
pdu
->
sessionId
=
msg
->
pdusession_setup_params
[
i
].
pdusession_id
;
pdu
->
sessionType
=
msg
->
pdusession_setup_params
[
i
].
upf_addr
.
pdu_session_type
;
pdu
->
sst
=
msg
->
allowed_nssai
[
i
].
sST
;
pdu
->
integrityProtectionIndication
=
1
;
// Preferred. TODO: Remove hardcoding
pdu
->
confidentialityProtectionIndication
=
1
;
// Preferred. TODO: Remove hardcoding
pdu
->
integrityProtectionIndication
=
2
;
//E1AP_IntegrityProtectionIndication_not_needed
; // Preferred. TODO: Remove hardcoding
pdu
->
confidentialityProtectionIndication
=
2
;
//E1AP_ConfidentialityProtectionIndication_not_needed
; // Preferred. TODO: Remove hardcoding
pdu
->
teId
=
msg
->
pdusession_setup_params
[
i
].
gtp_teid
;
memcpy
(
&
pdu
->
tlAddress
,
msg
->
pdusession_setup_params
[
i
].
upf_addr
.
buffer
,
...
...
FANG WANG
@wf
mentioned in commit
553f1d1a
·
Feb 11, 2023
mentioned in commit
553f1d1a
mentioned in commit 553f1d1a52845911be4ba61ec2bcc5c60ad42ae7
Toggle commit list
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