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
alex037yang
OpenXG-RAN
Commits
578ce9eb
Commit
578ce9eb
authored
Sep 19, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up to RRCConnectionSetupComplete Transmission in UE
parent
3d1faefa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
61 deletions
+100
-61
openair2/F1AP/f1ap_du_rrc_message_transfer.c
openair2/F1AP/f1ap_du_rrc_message_transfer.c
+22
-3
openair2/LAYER2/MAC/eNB_scheduler_RA.c
openair2/LAYER2/MAC/eNB_scheduler_RA.c
+59
-50
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+3
-1
openair2/LAYER2/RLC/rlc.c
openair2/LAYER2/RLC/rlc.c
+16
-7
No files found.
openair2/F1AP/f1ap_du_rrc_message_transfer.c
View file @
578ce9eb
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
#include "rrc_extern.h"
#include "rrc_extern.h"
#include "common/ran_context.h"
#include "common/ran_context.h"
#include "rrc_eNB_UE_context.h"
// undefine C_RNTI from
// undefine C_RNTI from
// openair1/PHY/LTE_TRANSPORT/transport_common.h which
// openair1/PHY/LTE_TRANSPORT/transport_common.h which
...
@@ -179,7 +180,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
...
@@ -179,7 +180,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
&
asn_DEF_DL_CCCH_Message
,
&
asn_DEF_DL_CCCH_Message
,
(
void
**
)
&
dl_ccch_msg
,
(
void
**
)
&
dl_ccch_msg
,
ie
->
value
.
choice
.
RRCContainer
.
buf
,
ie
->
value
.
choice
.
RRCContainer
.
buf
,
ie
->
value
.
choice
.
RRCContainer
.
size
,
0
,
0
);
rrc_dl_sdu_len
,
0
,
0
);
switch
(
dl_ccch_msg
->
message
.
choice
.
c1
.
present
)
{
switch
(
dl_ccch_msg
->
message
.
choice
.
c1
.
present
)
{
case
DL_CCCH_MessageType__c1_PR_NOTHING
:
case
DL_CCCH_MessageType__c1_PR_NOTHING
:
...
@@ -242,7 +243,19 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
...
@@ -242,7 +243,19 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
// This should be somewhere in the f1ap_cudu_ue_inst_t
// This should be somewhere in the f1ap_cudu_ue_inst_t
int
macrlc_instance
=
0
;
int
macrlc_instance
=
0
;
rnti_t
rnti
=
f1ap_get_rnti_by_du_id
(
&
f1ap_du_ue
[
0
],
du_ue_f1ap_id
);
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
macrlc_instance
],
rnti
);
eNB_RRC_UE_t
*
ue_p
=
&
ue_context_p
->
ue_context
;
AssertFatal
(
ue_p
->
Srb0
.
Active
==
1
,
"SRB0 is not active
\n
"
);
memcpy
((
void
*
)
ue_p
->
Srb0
.
Tx_buffer
.
Payload
,
(
void
*
)
ie
->
value
.
choice
.
RRCContainer
.
buf
,
rrc_dl_sdu_len
);
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
=
rrc_dl_sdu_len
;
rrc_mac_config_req_eNB
(
rrc_mac_config_req_eNB
(
macrlc_instance
,
macrlc_instance
,
0
,
//primaryCC_id,
0
,
//primaryCC_id,
...
@@ -250,7 +263,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
...
@@ -250,7 +263,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
0
,
0
,
#endif
#endif
f1ap_get_rnti_by_du_id
(
&
f1ap_du_ue
[
0
],
du_ue_f1ap_id
),
//rnti
rnti
,
(
BCCH_BCH_Message_t
*
)
NULL
,
(
BCCH_BCH_Message_t
*
)
NULL
,
(
RadioResourceConfigCommonSIB_t
*
)
NULL
,
(
RadioResourceConfigCommonSIB_t
*
)
NULL
,
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
...
@@ -462,6 +475,12 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
...
@@ -462,6 +475,12 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
return
-
1
;
return
-
1
;
}
}
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_allocate_new_UE_context
(
RC
.
rrc
[
module_idP
]);
ue_context_p
->
ue_id_rnti
=
rntiP
;
ue_context_p
->
ue_context
.
rnti
=
rntiP
;
ue_context_p
->
ue_context
.
random_ue_identity
=
rntiP
;
ue_context_p
->
ue_context
.
Srb0
.
Active
=
1
;
RB_INSERT
(
rrc_ue_tree_s
,
&
RC
.
rrc
[
module_idP
]
->
rrc_ue_head
,
ue_context_p
);
du_f1ap_itti_send_sctp_data_req
(
0
,
f1ap_du_data
->
assoc_id
,
buffer
,
len
,
0
);
du_f1ap_itti_send_sctp_data_req
(
0
,
f1ap_du_data
->
assoc_id
,
buffer
,
len
,
0
);
return
0
;
return
0
;
}
}
...
...
openair2/LAYER2/MAC/eNB_scheduler_RA.c
View file @
578ce9eb
...
@@ -608,13 +608,13 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
...
@@ -608,13 +608,13 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
{
{
eNB_MAC_INST
*
mac
=
RC
.
mac
[
module_idP
];
eNB_MAC_INST
*
mac
=
RC
.
mac
[
module_idP
];
COMMON_channels_t
*
cc
=
mac
->
common_channels
;
COMMON_channels_t
*
cc
=
mac
->
common_channels
;
int16_t
rrc_sdu_length
;
int16_t
rrc_sdu_length
;
int
UE_id
=
-
1
;
int
UE_id
=
-
1
;
uint16_t
msg4_padding
;
uint16_t
msg4_padding
;
uint16_t
msg4_post_padding
;
uint16_t
msg4_post_padding
;
uint16_t
msg4_header
;
uint16_t
msg4_header
;
uint8_t
*
vrb_map
;
uint8_t
*
vrb_map
;
int
first_rb
;
int
first_rb
;
...
@@ -1021,55 +1021,52 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
...
@@ -1021,55 +1021,52 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
rrc_sdu_length
=
mac_rrc_data_req
(
module_idP
,
CC_idP
,
frameP
,
CCCH
,
rrc_sdu_length
=
mac_rrc_data_req
(
module_idP
,
CC_idP
,
frameP
,
CCCH
,
UE_RNTI
(
module_idP
,
UE_id
),
1
,
// 1 transport block
UE_RNTI
(
module_idP
,
UE_id
),
1
,
// 1 transport block
&
cc
[
CC_idP
].
CCCH_pdu
.
payload
[
0
],
0
);
// not used in this case
&
cc
[
CC_idP
].
CCCH_pdu
.
payload
[
0
],
0
);
// not used in this case
LOG_D
(
MAC
,
if
(
rrc_sdu_length
>
0
)
{
LOG_D
(
MAC
,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d
\n
"
,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d
\n
"
,
module_idP
,
CC_idP
,
frameP
,
subframeP
,
UE_id
,
rrc_sdu_length
);
module_idP
,
CC_idP
,
frameP
,
subframeP
,
UE_id
,
rrc_sdu_length
);
// AssertFatal(rrc_sdu_length > 0,
// AssertFatal(rrc_sdu_length > 0,
// "[MAC][eNB Scheduler] CCCH not allocated, rrc_sdu_length: %d\n", rrc_sdu_length);
// "[MAC][eNB Scheduler] CCCH not allocated, rrc_sdu_length: %d\n", rrc_sdu_length);
if
(
rrc_sdu_length
>
0
)
LOG_I
(
MAC
,
LOG_I
(
MAC
,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)
\n
"
,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)
\n
"
,
module_idP
,
CC_idP
,
frameP
,
subframeP
,
ra
->
rnti
);
module_idP
,
CC_idP
,
frameP
,
subframeP
,
ra
->
rnti
);
else
LOG_I
(
MAC
,
"eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 without RRC Piggyback (RNTI %x)
\n
"
,
module_idP
,
CC_idP
,
frameP
,
subframeP
,
ra
->
rnti
);
/// Choose first 4 RBs for Msg4, should really check that these are free!
first_rb
=
0
;
vrb_map
[
first_rb
]
=
1
;
/// Choose first 4 RBs for Msg4, should really check that these are free!
vrb_map
[
first_rb
+
1
]
=
1
;
first_rb
=
0
;
vrb_map
[
first_rb
+
2
]
=
1
;
vrb_map
[
first_rb
+
3
]
=
1
;
vrb_map
[
first_rb
]
=
1
;
vrb_map
[
first_rb
+
1
]
=
1
;
vrb_map
[
first_rb
+
2
]
=
1
;
// Compute MCS/TBS for 3 PRB (coded on 4 vrb)
vrb_map
[
first_rb
+
3
]
=
1
;
msg4_header
=
1
+
6
+
1
;
// CR header, CR CE, SDU header
if
((
rrc_sdu_length
+
msg4_header
)
<=
22
)
{
// Compute MCS/TBS for 3 PRB (coded on 4 vrb)
ra
->
msg4_mcs
=
4
;
msg4_header
=
1
+
6
+
1
;
// CR header, CR CE, SDU header
ra
->
msg4_TBsize
=
22
;
}
else
if
((
rrc_sdu_length
+
msg4_header
)
<=
28
)
{
if
((
rrc_sdu_length
+
msg4_header
)
<=
22
)
{
ra
->
msg4_mcs
=
5
;
ra
->
msg4_mcs
=
4
;
ra
->
msg4_TBsize
=
28
;
ra
->
msg4_TBsize
=
22
;
}
else
if
((
rrc_sdu_length
+
msg4_header
)
<=
32
)
{
}
else
if
((
rrc_sdu_length
+
msg4_header
)
<=
28
)
{
ra
->
msg4_mcs
=
6
;
ra
->
msg4_mcs
=
5
;
ra
->
msg4_TBsize
=
32
;
ra
->
msg4_TBsize
=
28
;
}
else
if
((
rrc_sdu_length
+
msg4_header
)
<=
32
)
{
ra
->
msg4_mcs
=
6
;
ra
->
msg4_TBsize
=
32
;
}
else
if
((
rrc_sdu_length
+
msg4_header
)
<=
41
)
{
}
else
if
((
rrc_sdu_length
+
msg4_header
)
<=
41
)
{
ra
->
msg4_mcs
=
7
;
ra
->
msg4_mcs
=
7
;
ra
->
msg4_TBsize
=
41
;
ra
->
msg4_TBsize
=
41
;
}
else
if
((
rrc_sdu_length
+
msg4_header
)
<=
49
)
{
}
else
if
((
rrc_sdu_length
+
msg4_header
)
<=
49
)
{
ra
->
msg4_mcs
=
8
;
ra
->
msg4_mcs
=
8
;
ra
->
msg4_TBsize
=
49
;
ra
->
msg4_TBsize
=
49
;
}
else
if
((
rrc_sdu_length
+
msg4_header
)
<=
57
)
{
}
else
if
((
rrc_sdu_length
+
msg4_header
)
<=
57
)
{
ra
->
msg4_mcs
=
9
;
ra
->
msg4_mcs
=
9
;
ra
->
msg4_TBsize
=
57
;
ra
->
msg4_TBsize
=
57
;
}
}
fill_nfapi_dl_dci_1A
(
dl_config_pdu
,
4
,
// aggregation_level
fill_nfapi_dl_dci_1A
(
dl_config_pdu
,
4
,
// aggregation_level
ra
->
rnti
,
// rnti
ra
->
rnti
,
// rnti
1
,
// rnti_type, CRNTI
1
,
// rnti_type, CRNTI
...
@@ -1080,7 +1077,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
...
@@ -1080,7 +1077,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
1
,
// ndi
1
,
// ndi
0
,
// rv
0
,
// rv
0
);
// vrb_flag
0
);
// vrb_flag
LOG_D
(
MAC
,
LOG_D
(
MAC
,
"Frame %d, subframe %d: Msg4 DCI pdu_num %d (rnti %x,rnti_type %d,harq_pid %d, resource_block_coding (%p) %d
\n
"
,
"Frame %d, subframe %d: Msg4 DCI pdu_num %d (rnti %x,rnti_type %d,harq_pid %d, resource_block_coding (%p) %d
\n
"
,
frameP
,
subframeP
,
dl_req_body
->
number_pdu
,
frameP
,
subframeP
,
dl_req_body
->
number_pdu
,
...
@@ -1218,6 +1215,18 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
...
@@ -1218,6 +1215,18 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
set_dl_ue_select_msg4
(
CC_idP
,
4
,
UE_id
,
ra
->
rnti
);
set_dl_ue_select_msg4
(
CC_idP
,
4
,
UE_id
,
ra
->
rnti
);
}
}
}
// CCE Allocation feasible
}
// CCE Allocation feasible
}
else
{
LOG_I
(
MAC
,
"eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Delaying Msg4 for RRC Piggyback (RNTI %x)
\n
"
,
module_idP
,
CC_idP
,
frameP
,
subframeP
,
ra
->
rnti
);
ra
->
Msg4_subframe
++
;
if
(
ra
->
Msg4_subframe
==
10
)
{
ra
->
Msg4_frame
++
;
ra
->
Msg4_frame
&=
1023
;
ra
->
Msg4_subframe
=
0
;
}
}
}
// msg4 frame/subframe
}
// msg4 frame/subframe
}
// else rach_resource_type
}
// else rach_resource_type
}
}
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
578ce9eb
...
@@ -396,7 +396,9 @@ boolean_t pdcp_data_req(
...
@@ -396,7 +396,9 @@ boolean_t pdcp_data_req(
free_mem_block
(
pdcp_pdu_p
,
__FUNCTION__
);
free_mem_block
(
pdcp_pdu_p
,
__FUNCTION__
);
rlc_status
=
ack_result
;
rlc_status
=
ack_result
;
}
}
else
else
#endif
/*UETARGET*/
{
{
//It should never get here
//It should never get here
rlc_status
=
rlc_data_req
(
ctxt_pP
rlc_status
=
rlc_data_req
(
ctxt_pP
...
@@ -413,7 +415,7 @@ boolean_t pdcp_data_req(
...
@@ -413,7 +415,7 @@ boolean_t pdcp_data_req(
#endif
#endif
);
);
}
}
#endif
/*UETARGET*/
}
}
switch
(
rlc_status
)
{
switch
(
rlc_status
)
{
...
...
openair2/LAYER2/RLC/rlc.c
View file @
578ce9eb
...
@@ -690,7 +690,7 @@ void rlc_data_ind (
...
@@ -690,7 +690,7 @@ void rlc_data_ind (
sdu_pP
);
sdu_pP
);
}
}
else
else
#endif
/*UETARGET*/
{
{
switch
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
node_type
){
switch
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
node_type
){
...
@@ -727,6 +727,15 @@ void rlc_data_ind (
...
@@ -727,6 +727,15 @@ void rlc_data_ind (
}
}
}
}
#else
pdcp_data_ind
(
ctxt_pP
,
srb_flagP
,
MBMS_flagP
,
rb_idP
,
sdu_sizeP
,
sdu_pP
);
#endif
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void
rlc_data_conf
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
void
rlc_data_conf
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
...
@@ -797,19 +806,19 @@ rlc_module_init (void)
...
@@ -797,19 +806,19 @@ rlc_module_init (void)
pool_buffer_init
();
pool_buffer_init
();
/*
#ifndef UETARGET
#ifndef UETARGET
/
*
Launch the RLC listening server
/
/
Launch the RLC listening server
*
as a separate thread
//
as a separate thread
*/
static int started = 0;
static int started = 0;
if (started == 0)
if (started == 0)
{
{
async_server_thread_init();
async_server_thread_init();
started = 1;
started = 1;
}
}
#endif
/*UETARGET*/
#endif
*/
return
(
0
);
return
(
0
);
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
...
...
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