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
wangjie
OpenXG-RAN
Commits
fce87828
Commit
fce87828
authored
Mar 26, 2021
by
Wang He
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix error for CU and DU
parent
19fd05a9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
11 deletions
+31
-11
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+1
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+17
-8
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
+6
-1
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+3
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+3
-0
No files found.
executables/nr-uesoftmodem.c
View file @
fce87828
...
...
@@ -581,7 +581,7 @@ int main( int argc, char **argv ) {
ctxt_pP
.
enb_flag
=
ENB_FLAG_NO
;
ctxt_pP
.
rnti
=
0x1234
;
node_type
=
ngran_UE
;
nr_rrc_ue_generate_RRCSetupRequest
(
&
ctxt_pP
,
0
);
nr_rrc_ue_generate_RRCSetupRequest
(
ctxt_pP
.
module_id
,
0
);
if
(
create_tasks_nrue
(
1
)
<
0
)
{
printf
(
"cannot create ITTI tasks
\n
"
);
exit
(
-
1
);
// need a softer mode
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
fce87828
...
...
@@ -96,7 +96,7 @@ void mac_top_init_gNB(void)
// These should be out of here later
pdcp_layer_init
();
if
(
IS_SOFTMODEM_NOS1
&&
!
(
get_softmodem_params
()
->
do_ra
||
get_softmodem_params
()
->
sa
)
)
//
if(IS_SOFTMODEM_NOS1 && !(get_softmodem_params()->do_ra || get_softmodem_params()->sa) )
nr_DRB_preconfiguration
(
0x1234
);
rrc_init_nr_global_param
();
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
fce87828
...
...
@@ -708,13 +708,13 @@ printf("\n");
memcpy
(
message_buffer
,
buf
,
size
);
if
(
first_dcch
==
1
)
{
dec_rval
=
uper_decode
(
NULL
,
/*
dec_rval = uper_decode(NULL,
&asn_DEF_NR_DL_DCCH_Message,
(void**)&dl_dcch_msg,
&buf[2],
size-6,0,0);
if (dec_rval.code == RC_OK) {
if
(
dl_dcch_msg
->
message
.
choice
.
c1
->
present
==
NR_DL_DCCH_MessageType__c1_PR_securityModeCommand
)
{
if (dl_dcch_msg->message.choice.c1->present == NR_DL_DCCH_MessageType__c1_PR_securityModeCommand) {
*/
LOG_I
(
PDCP
,
"CU send securityModeCommand by F1AP_UE_CONTEXT_SETUP_REQ
\n
"
);
message_p
=
itti_alloc_new_message
(
TASK_PDCP_ENB
,
0
,
F1AP_UE_CONTEXT_SETUP_REQ
);
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
rrc_container
=
message_buffer
;
...
...
@@ -736,7 +736,7 @@ printf("\n");
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup_length
=
1
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup
=
&
drb
;
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt
.
module_id
,
message_p
);
}
else
{
/*
} else {
LOG_I(PDCP, "other NR_DL_DCCH_Message \n");
message_p = itti_alloc_new_message (TASK_PDCP_ENB, 0, F1AP_DL_RRC_MESSAGE);
F1AP_DL_RRC_MESSAGE (message_p).rrc_container = message_buffer;
...
...
@@ -752,7 +752,7 @@ printf("\n");
}
} else {
LOG_E(PDCP, "error NR_DL_DCCH_Message \n");
}
}
*/
}
else
{
first_dcch
=
1
;
message_p
=
itti_alloc_new_message
(
TASK_PDCP_ENB
,
0
,
F1AP_DL_RRC_MESSAGE
);
...
...
@@ -882,12 +882,14 @@ void pdcp_run(const protocol_ctxt_t *const ctxt_pP)
}
}
static
void
add_srb
(
int
rnti
,
struct
NR_SRB_ToAddMod
*
s
)
static
void
add_srb
(
int
is_gnb
,
int
rnti
,
struct
NR_SRB_ToAddMod
*
s
)
{
nr_pdcp_entity_t
*
pdcp_srb
;
nr_pdcp_ue_t
*
ue
;
int
srb_id
=
s
->
srb_Identity
;
int
t_reordering
=
decode_t_reordering
(
*
s
->
pdcp_Config
->
t_Reordering
);
int
sn_size
=
12
;
if
(
srb_id
>
3
)
{
LOG_E
(
PDCP
,
"%s:%d:%s: fatal, bad srb id %d
\n
"
,
...
...
@@ -901,7 +903,11 @@ static void add_srb(int rnti, struct NR_SRB_ToAddMod *s)
LOG_W
(
PDCP
,
"%s:%d:%s: warning SRB %d already exist for ue %d, do nothing
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
srb_id
,
rnti
);
}
else
{
pdcp_srb
=
new_nr_pdcp_entity_srb
(
1
,
srb_id
,
deliver_sdu_srb
,
ue
,
deliver_pdu_srb
,
ue
);
// pdcp_srb = new_nr_pdcp_entity_srb(1, srb_id, deliver_sdu_srb, ue, deliver_pdu_srb, ue);
pdcp_srb
=
new_nr_pdcp_entity
(
NR_PDCP_SRB
,
is_gnb
,
srb_id
,
deliver_sdu_srb
,
ue
,
deliver_pdu_srb
,
ue
,
sn_size
,
t_reordering
,
0
,
0
,
0
,
NULL
,
NULL
);
nr_pdcp_ue_add_srb_pdcp_entity
(
ue
,
srb_id
,
pdcp_srb
);
LOG_I
(
PDCP
,
"%s:%d:%s: added srb %d to ue 0x%x
\n
"
,
...
...
@@ -1021,7 +1027,7 @@ boolean_t nr_rrc_pdcp_config_asn1_req(
if
(
srb2add_list
!=
NULL
)
{
for
(
i
=
0
;
i
<
srb2add_list
->
list
.
count
;
i
++
)
{
add_srb
(
rnti
,
srb2add_list
->
list
.
array
[
i
]);
add_srb
(
ctxt_pP
->
enb_flag
,
rnti
,
srb2add_list
->
list
.
array
[
i
]);
}
}
...
...
@@ -1079,7 +1085,10 @@ void nr_DRB_preconfiguration(uint16_t crnti)
srb_ToAddMod
->
srb_Identity
=
1
;
srb_ToAddMod
->
reestablishPDCP
=
NULL
;
srb_ToAddMod
->
discardOnPDCP
=
NULL
;
srb_ToAddMod
->
pdcp_Config
=
NULL
;
// srb_ToAddMod->pdcp_Config = NULL;
srb_ToAddMod
->
pdcp_Config
=
calloc
(
1
,
sizeof
(
*
srb_ToAddMod
->
pdcp_Config
));
srb_ToAddMod
->
pdcp_Config
->
t_Reordering
=
calloc
(
1
,
sizeof
(
*
srb_ToAddMod
->
pdcp_Config
->
t_Reordering
));
*
srb_ToAddMod
->
pdcp_Config
->
t_Reordering
=
NR_PDCP_Config__t_Reordering_ms0
;
ASN_SEQUENCE_ADD
(
&
rbconfig
->
srb_ToAddModList
->
list
,
srb_ToAddMod
);
rbconfig
->
srb3_ToRelease
=
NULL
;
...
...
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
View file @
fce87828
...
...
@@ -493,6 +493,9 @@ rb_found:
if
(
ccch_flag
)
{
/* for rfsim, because UE send RRCSetupRequest in SRB1 */
LOG_I
(
RLC
,
"[MSG] RRC Setup Request
\n
"
);
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
TASK_RLC_ENB
,
TASK_DU_F1
,
size
);
memcpy
(
message_buffer
,
buf
,
size
);
msg
=
itti_alloc_new_message
(
TASK_RLC_ENB
,
0
,
F1AP_INITIAL_UL_RRC_MESSAGE
);
F1AP_INITIAL_UL_RRC_MESSAGE
(
msg
).
gNB_DU_ue_id
=
0
;
F1AP_INITIAL_UL_RRC_MESSAGE
(
msg
).
mcc
=
RC
.
nrrrc
[
0
]
->
configuration
.
mcc
[
0
];
...
...
@@ -500,7 +503,9 @@ rb_found:
F1AP_INITIAL_UL_RRC_MESSAGE
(
msg
).
mnc_digit_length
=
RC
.
nrrrc
[
0
]
->
configuration
.
mnc_digit_length
[
0
];
F1AP_INITIAL_UL_RRC_MESSAGE
(
msg
).
nr_cellid
=
RC
.
nrrrc
[
0
]
->
nr_cellid
;
F1AP_INITIAL_UL_RRC_MESSAGE
(
msg
).
crnti
=
ue
->
rnti
;
F1AP_INITIAL_UL_RRC_MESSAGE
(
msg
).
rrc_container
=
(
unsigned
char
*
)
buf
;
// F1AP_INITIAL_UL_RRC_MESSAGE(msg).rrc_container = (unsigned char *)buf;
F1AP_INITIAL_UL_RRC_MESSAGE
(
msg
).
rrc_container
=
message_buffer
;
F1AP_INITIAL_UL_RRC_MESSAGE
(
msg
).
rrc_container_length
=
size
;
itti_send_msg_to_task
(
TASK_DU_F1
,
ENB_MODULE_ID_TO_INSTANCE
(
0
),
msg
);
ccch_flag
=
0
;
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
fce87828
...
...
@@ -1023,6 +1023,9 @@ uint8_t do_RRCSetup(const protocol_ctxt_t *const ctxt_pP,
SRB1_config
=
calloc
(
1
,
sizeof
(
NR_SRB_ToAddMod_t
));
SRB1_config
->
srb_Identity
=
1
;
// pdcp_Config->t_Reordering
pdcp_Config
=
calloc
(
1
,
sizeof
(
*
pdcp_Config
));
pdcp_Config
->
t_Reordering
=
calloc
(
1
,
sizeof
(
*
pdcp_Config
->
t_Reordering
));
*
pdcp_Config
->
t_Reordering
=
NR_PDCP_Config__t_Reordering_ms0
;
SRB1_config
->
pdcp_Config
=
pdcp_Config
;
ie
->
radioBearerConfig
.
srb_ToAddModList
=
*
SRB_configList
;
ASN_SEQUENCE_ADD
(
&
(
*
SRB_configList
)
->
list
,
SRB1_config
);
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
fce87828
...
...
@@ -706,6 +706,9 @@ rrc_gNB_generate_defaultRRCReconfiguration(
memset
(
*
SRB_configList2
,
0
,
sizeof
(
**
SRB_configList2
));
SRB2_config
=
CALLOC
(
1
,
sizeof
(
*
SRB2_config
));
SRB2_config
->
srb_Identity
=
2
;
SRB2_config
->
pdcp_Config
=
calloc
(
1
,
sizeof
(
*
SRB2_config
->
pdcp_Config
));
SRB2_config
->
pdcp_Config
->
t_Reordering
=
calloc
(
1
,
sizeof
(
*
SRB2_config
->
pdcp_Config
->
t_Reordering
));
*
SRB2_config
->
pdcp_Config
->
t_Reordering
=
NR_PDCP_Config__t_Reordering_ms0
;
ASN_SEQUENCE_ADD
(
&
(
*
SRB_configList2
)
->
list
,
SRB2_config
);
ASN_SEQUENCE_ADD
(
&
SRB_configList
->
list
,
SRB2_config
);
...
...
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