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
0b64fedd
Commit
0b64fedd
authored
Nov 19, 2020
by
Chenyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
messg3\4\5 is ok
parent
cbd40e8e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
94 additions
and
39 deletions
+94
-39
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+18
-0
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.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_entity.h
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
+3
-2
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c
+2
-2
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.h
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.h
+2
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+35
-27
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+28
-2
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+1
-1
No files found.
executables/nr-uesoftmodem.c
View file @
0b64fedd
...
@@ -224,7 +224,21 @@ struct timespec clock_difftime(struct timespec start, struct timespec end) {
...
@@ -224,7 +224,21 @@ struct timespec clock_difftime(struct timespec start, struct timespec end) {
void
print_difftimes
(
void
)
{
void
print_difftimes
(
void
)
{
LOG_I
(
HW
,
"difftimes min = %lu ns ; max = %lu ns
\n
"
,
min_diff_time
.
tv_nsec
,
max_diff_time
.
tv_nsec
);
LOG_I
(
HW
,
"difftimes min = %lu ns ; max = %lu ns
\n
"
,
min_diff_time
.
tv_nsec
,
max_diff_time
.
tv_nsec
);
}
}
int
create_tasks_nrue
(
uint32_t
ue_nb
)
{
LOG_D
(
NR_RRC
,
"%s(ue_nb:%d)
\n
"
,
__FUNCTION__
,
ue_nb
);
itti_wait_ready
(
1
);
if
(
ue_nb
>
0
)
{
LOG_I
(
NR_RRC
,
"create TASK_RRC_NRUE
\n
"
);
if
(
itti_create_task
(
TASK_RRC_NRUE
,
rrc_nrue_task
,
NULL
)
<
0
)
{
LOG_E
(
NR_RRC
,
"Create task for RRC UE failed
\n
"
);
return
-
1
;
}
}
itti_wait_ready
(
0
);
return
0
;
}
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
int
CC_id
;
int
CC_id
;
...
@@ -781,6 +795,10 @@ int main( int argc, char **argv ) {
...
@@ -781,6 +795,10 @@ int main( int argc, char **argv ) {
ctxt_pP
.
enb_flag
=
ENB_FLAG_NO
;
ctxt_pP
.
enb_flag
=
ENB_FLAG_NO
;
ctxt_pP
.
rnti
=
0x1234
;
ctxt_pP
.
rnti
=
0x1234
;
rrc_ue_generate_RRCSetupRequest
(
&
ctxt_pP
,
0
);
rrc_ue_generate_RRCSetupRequest
(
&
ctxt_pP
,
0
);
if
(
create_tasks_nrue
(
1
)
<
0
)
{
printf
(
"cannot create ITTI tasks
\n
"
);
exit
(
-
1
);
// need a softer mode
}
while
(
true
)
while
(
true
)
sleep
(
3600
);
sleep
(
3600
);
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
0b64fedd
...
@@ -55,7 +55,8 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst)
...
@@ -55,7 +55,8 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst)
if
(
rrc_inst
)
{
if
(
rrc_inst
)
{
nr_rrc_mac_config_req_ue
(
0
,
0
,
0
,
NULL
,
rrc_inst
->
cell_group_config
);
nr_rrc_mac_config_req_ue
(
0
,
0
,
0
,
NULL
,
rrc_inst
->
cell_group_config
);
if
(
IS_SOFTMODEM_NOS1
){
// if (IS_SOFTMODEM_NOS1){
if
(
1
)
{
if
(
rlc_module_init
(
0
)
!=
0
)
{
if
(
rlc_module_init
(
0
)
!=
0
)
{
LOG_I
(
RLC
,
"Problem at RLC initiation
\n
"
);
LOG_I
(
RLC
,
"Problem at RLC initiation
\n
"
);
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
0b64fedd
...
@@ -763,7 +763,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -763,7 +763,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
TBS
);
TBS
);
sdu_lengths
[
num_sdus
]
=
mac_rlc_data_req
(
module_id
,
sdu_lengths
[
num_sdus
]
=
mac_rlc_data_req
(
module_id
,
rnti
,
0x1234
,
module_id
,
module_id
,
frame
,
frame
,
ENB_FLAG_YES
,
ENB_FLAG_YES
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
0b64fedd
...
@@ -236,7 +236,7 @@ void nr_process_mac_pdu(
...
@@ -236,7 +236,7 @@ void nr_process_mac_pdu(
}
}
else
{
else
{
mac_rlc_data_ind
(
module_idP
,
mac_rlc_data_ind
(
module_idP
,
rnti
,
0x1234
,
module_idP
,
module_idP
,
frameP
,
frameP
,
ENB_FLAG_YES
,
ENB_FLAG_YES
,
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
0b64fedd
...
@@ -89,7 +89,7 @@ void mac_top_init_gNB(void)
...
@@ -89,7 +89,7 @@ void mac_top_init_gNB(void)
// These should be out of here later
// These should be out of here later
pdcp_layer_init
();
pdcp_layer_init
();
if
(
IS_SOFTMODEM_NOS1
)
//
if(IS_SOFTMODEM_NOS1)
nr_DRB_preconfiguration
();
nr_DRB_preconfiguration
();
rrc_init_nr_global_param
();
rrc_init_nr_global_param
();
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
View file @
0b64fedd
...
@@ -21,17 +21,18 @@
...
@@ -21,17 +21,18 @@
#ifndef _NR_PDCP_ENTITY_H_
#ifndef _NR_PDCP_ENTITY_H_
#define _NR_PDCP_ENTITY_H_
#define _NR_PDCP_ENTITY_H_
#include "platform_types.h"
typedef
struct
nr_pdcp_entity_t
{
typedef
struct
nr_pdcp_entity_t
{
/* functions provided by the PDCP module */
/* functions provided by the PDCP module */
void
(
*
recv_pdu
)(
struct
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
);
void
(
*
recv_pdu
)(
protocol_ctxt_t
*
ctxt_pP
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
);
void
(
*
recv_sdu
)(
struct
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
,
void
(
*
recv_sdu
)(
struct
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
,
int
sdu_id
);
int
sdu_id
);
void
(
*
delete
)(
struct
nr_pdcp_entity_t
*
entity
);
void
(
*
delete
)(
struct
nr_pdcp_entity_t
*
entity
);
void
(
*
set_integrity_key
)(
struct
nr_pdcp_entity_t
*
entity
,
char
*
key
);
void
(
*
set_integrity_key
)(
struct
nr_pdcp_entity_t
*
entity
,
char
*
key
);
/* callbacks provided to the PDCP module */
/* callbacks provided to the PDCP module */
void
(
*
deliver_sdu
)(
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_sdu
)(
protocol_ctxt_t
*
ctxt_pP
,
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buf
,
int
size
);
char
*
buf
,
int
size
);
void
*
deliver_sdu_data
;
void
*
deliver_sdu_data
;
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c
View file @
0b64fedd
...
@@ -25,13 +25,13 @@
...
@@ -25,13 +25,13 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
void
nr_pdcp_entity_drb_am_recv_pdu
(
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
)
void
nr_pdcp_entity_drb_am_recv_pdu
(
protocol_ctxt_t
*
ctxt_pP
,
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
)
{
{
nr_pdcp_entity_drb_am_t
*
entity
=
(
nr_pdcp_entity_drb_am_t
*
)
_entity
;
nr_pdcp_entity_drb_am_t
*
entity
=
(
nr_pdcp_entity_drb_am_t
*
)
_entity
;
if
(
size
<
3
)
abort
();
if
(
size
<
3
)
abort
();
if
(
!
(
buffer
[
0
]
&
0x80
))
{
printf
(
"%s:%d:%s: fatal
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
if
(
!
(
buffer
[
0
]
&
0x80
))
{
printf
(
"%s:%d:%s: fatal
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
entity
->
common
.
deliver_sdu
(
entity
->
common
.
deliver_sdu_data
,
entity
->
common
.
deliver_sdu
(
ctxt_pP
,
entity
->
common
.
deliver_sdu_data
,
(
nr_pdcp_entity_t
*
)
entity
,
buffer
+
3
,
size
-
3
);
(
nr_pdcp_entity_t
*
)
entity
,
buffer
+
3
,
size
-
3
);
}
}
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.h
View file @
0b64fedd
...
@@ -23,13 +23,14 @@
...
@@ -23,13 +23,14 @@
#define _NR_PDCP_ENTITY_DRB_AM_H_
#define _NR_PDCP_ENTITY_DRB_AM_H_
#include "nr_pdcp_entity.h"
#include "nr_pdcp_entity.h"
#include "platform_types.h"
typedef
struct
{
typedef
struct
{
nr_pdcp_entity_t
common
;
nr_pdcp_entity_t
common
;
int
rb_id
;
int
rb_id
;
}
nr_pdcp_entity_drb_am_t
;
}
nr_pdcp_entity_drb_am_t
;
void
nr_pdcp_entity_drb_am_recv_pdu
(
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
);
void
nr_pdcp_entity_drb_am_recv_pdu
(
protocol_ctxt_t
*
ctxt_pP
,
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
);
void
nr_pdcp_entity_drb_am_recv_sdu
(
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
,
void
nr_pdcp_entity_drb_am_recv_sdu
(
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
,
int
sdu_id
);
int
sdu_id
);
void
nr_pdcp_entity_drb_am_set_integrity_key
(
nr_pdcp_entity_t
*
entity
,
char
*
key
);
void
nr_pdcp_entity_drb_am_set_integrity_key
(
nr_pdcp_entity_t
*
entity
,
char
*
key
);
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
0b64fedd
...
@@ -105,17 +105,17 @@ nr_rrc_data_ind(
...
@@ -105,17 +105,17 @@ nr_rrc_data_ind(
MessageDef
*
message_p
;
MessageDef
*
message_p
;
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
uint8_t
*
message_buffer
;
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
ctxt_pP
->
enb_flag
?
TASK_RRC_GNB
:
TASK_RRC_
UE
,
ctxt_pP
->
enb_flag
?
TASK_RRC_GNB
:
TASK_RRC_
UE
,
sdu_sizeP
);
message_buffer
=
itti_malloc
(
ctxt_pP
->
enb_flag
?
TASK_RRC_GNB
:
TASK_RRC_
NRUE
,
ctxt_pP
->
enb_flag
?
TASK_RRC_GNB
:
TASK_RRC_NR
UE
,
sdu_sizeP
);
memcpy
(
message_buffer
,
buffer_pP
,
sdu_sizeP
);
memcpy
(
message_buffer
,
buffer_pP
,
sdu_sizeP
);
message_p
=
itti_alloc_new_message
(
ctxt_pP
->
enb_flag
?
TASK_RRC_GNB
:
TASK_RRC_
UE
,
RRC_DCCH_DATA_IND
);
message_p
=
itti_alloc_new_message
(
ctxt_pP
->
enb_flag
?
TASK_RRC_GNB
:
TASK_RRC_
NRUE
,
NR_
RRC_DCCH_DATA_IND
);
RRC_DCCH_DATA_IND
(
message_p
).
frame
=
ctxt_pP
->
frame
;
NR_
RRC_DCCH_DATA_IND
(
message_p
).
frame
=
ctxt_pP
->
frame
;
RRC_DCCH_DATA_IND
(
message_p
).
dcch_index
=
DCCH_index
;
NR_
RRC_DCCH_DATA_IND
(
message_p
).
dcch_index
=
DCCH_index
;
RRC_DCCH_DATA_IND
(
message_p
).
sdu_size
=
sdu_sizeP
;
NR_
RRC_DCCH_DATA_IND
(
message_p
).
sdu_size
=
sdu_sizeP
;
RRC_DCCH_DATA_IND
(
message_p
).
sdu_p
=
message_buffer
;
NR_
RRC_DCCH_DATA_IND
(
message_p
).
sdu_p
=
message_buffer
;
RRC_DCCH_DATA_IND
(
message_p
).
rnti
=
ctxt_pP
->
rnti
;
NR_
RRC_DCCH_DATA_IND
(
message_p
).
rnti
=
ctxt_pP
->
rnti
;
RRC_DCCH_DATA_IND
(
message_p
).
module_id
=
ctxt_pP
->
module_id
;
NR_
RRC_DCCH_DATA_IND
(
message_p
).
module_id
=
ctxt_pP
->
module_id
;
RRC_DCCH_DATA_IND
(
message_p
).
e
NB_index
=
ctxt_pP
->
eNB_index
;
NR_RRC_DCCH_DATA_IND
(
message_p
).
g
NB_index
=
ctxt_pP
->
eNB_index
;
itti_send_msg_to_task
(
ctxt_pP
->
enb_flag
?
TASK_RRC_GNB
:
TASK_RRC_UE
,
ctxt_pP
->
instance
,
message_p
);
itti_send_msg_to_task
(
ctxt_pP
->
enb_flag
?
TASK_RRC_GNB
:
TASK_RRC_
NR
UE
,
ctxt_pP
->
instance
,
message_p
);
}
}
}
}
...
@@ -135,14 +135,15 @@ nr_rrc_data_ind_ccch(
...
@@ -135,14 +135,15 @@ nr_rrc_data_ind_ccch(
{
{
MessageDef
*
message_p
;
MessageDef
*
message_p
;
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
message_p
=
itti_alloc_new_message
(
ctxt_pP
->
enb_flag
?
TASK_RRC_GNB
:
TASK_RRC_UE
,
NR_RRC_MAC_CCCH_DATA_IND
);
message_p
=
itti_alloc_new_message
(
ctxt_pP
->
enb_flag
?
TASK_RRC_GNB
:
TASK_RRC_
NR
UE
,
NR_RRC_MAC_CCCH_DATA_IND
);
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
frame
=
ctxt_pP
->
frame
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
frame
=
ctxt_pP
->
frame
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sub_frame
=
0
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sub_frame
=
0
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu_size
=
sdu_sizeP
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu_size
=
sdu_sizeP
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
gnb_index
=
0
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
gnb_index
=
0
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
CC_id
=
0
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
CC_id
=
0
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
rnti
=
0x1234
;
memcpy
(
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
buffer_pP
,
sdu_sizeP
);
memcpy
(
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
buffer_pP
,
sdu_sizeP
);
itti_send_msg_to_task
(
ctxt_pP
->
enb_flag
?
TASK_RRC_GNB
:
TASK_RRC_UE
,
ctxt_pP
->
instance
,
message_p
);
itti_send_msg_to_task
(
ctxt_pP
->
enb_flag
?
TASK_RRC_GNB
:
TASK_RRC_
NR
UE
,
ctxt_pP
->
instance
,
message_p
);
}
}
}
}
...
@@ -288,9 +289,9 @@ printf("\n\n\n########## nas_sock_fd read returns len %d\n", len);
...
@@ -288,9 +289,9 @@ printf("\n\n\n########## nas_sock_fd read returns len %d\n", len);
ctxt
.
rnti
=
rnti
;
ctxt
.
rnti
=
rnti
;
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
rb_id
,
RLC_MUI_UNDEFINED
,
//
pdcp_data_req(&ctxt, SRB_FLAG_NO, rb_id, RLC_MUI_UNDEFINED,
RLC_SDU_CONFIRM_NO
,
len
,
(
unsigned
char
*
)
rx_buf
,
//
RLC_SDU_CONFIRM_NO, len, (unsigned char *)rx_buf,
PDCP_TRANSMISSION_MODE_DATA
,
NULL
,
NULL
);
//
PDCP_TRANSMISSION_MODE_DATA, NULL, NULL);
}
}
return
NULL
;
return
NULL
;
...
@@ -332,9 +333,9 @@ printf("\n\n\n########## nas_sock_fd read returns len %d\n", len);
...
@@ -332,9 +333,9 @@ printf("\n\n\n########## nas_sock_fd read returns len %d\n", len);
ctxt
.
rnti
=
rnti
;
ctxt
.
rnti
=
rnti
;
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
rb_id
,
RLC_MUI_UNDEFINED
,
//
pdcp_data_req(&ctxt, SRB_FLAG_NO, rb_id, RLC_MUI_UNDEFINED,
RLC_SDU_CONFIRM_NO
,
len
,
(
unsigned
char
*
)
rx_buf
,
//
RLC_SDU_CONFIRM_NO, len, (unsigned char *)rx_buf,
PDCP_TRANSMISSION_MODE_DATA
,
NULL
,
NULL
);
//
PDCP_TRANSMISSION_MODE_DATA, NULL, NULL);
}
}
return
NULL
;
return
NULL
;
...
@@ -446,8 +447,8 @@ uint64_t pdcp_module_init(uint64_t _pdcp_optmask)
...
@@ -446,8 +447,8 @@ uint64_t pdcp_module_init(uint64_t _pdcp_optmask)
}
}
return
pdcp_optmask
;
return
pdcp_optmask
;
}
}
static
int
liuyu
=
0
;
static
void
deliver_sdu_drb
(
void
*
_ue
,
nr_pdcp_entity_t
*
entity
,
static
void
deliver_sdu_drb
(
protocol_ctxt_t
*
ctxt_pP
,
void
*
_ue
,
nr_pdcp_entity_t
*
entity
,
char
*
buf
,
int
size
)
char
*
buf
,
int
size
)
{
{
extern
int
nas_sock_fd
[];
extern
int
nas_sock_fd
[];
...
@@ -458,19 +459,26 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
...
@@ -458,19 +459,26 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
int
rb_id
;
int
rb_id
;
int
i
;
int
i
;
if
(
IS_SOFTMODEM_NOS1
){
if
(
1
)
{
//
(IS_SOFTMODEM_NOS1){
#if 1
#if 1
log_dump
(
PDCP
,
buf
,
size
,
LOG_DUMP_CHAR
,
" PDCP Received SDU:
\n
"
);
log_dump
(
PDCP
,
buf
,
size
,
LOG_DUMP_CHAR
,
" PDCP Received SDU:
\n
"
);
if
(
size
>
47
)
if
(
size
>
47
00
)
{
{
LOG_I
(
PDCP
,
"maybe ip data
\n
"
);
LOG_I
(
PDCP
,
"maybe ip data
\n
"
);
}
}
else
else
{
{
LOG_I
(
PDCP
,
"send to gNB RRC
\n
"
);
LOG_I
(
PDCP
,
"send to gNB RRC
\n
"
);
protocol_ctxt_t
ctxt_pP
=
{
0
};
ctxt_pP
.
enb_flag
=
ENB_FLAG_YES
;
if
(
liuyu
==
2
)
nr_rrc_data_ind_ccch
(
&
ctxt_pP
,
1
,
size
,
buf
);
liuyu
=
1
;
if
(
liuyu
==
0
)
nr_rrc_data_ind_ccch
(
ctxt_pP
,
1
,
size
,
buf
);
if
(
liuyu
==
1
)
nr_rrc_data_ind
(
ctxt_pP
,
1
,
size
,
buf
);
liuyu
++
;
}
}
#else
#else
len
=
write
(
nas_sock_fd
[
0
],
buf
,
size
);
len
=
write
(
nas_sock_fd
[
0
],
buf
,
size
);
...
@@ -595,7 +603,7 @@ boolean_t pdcp_data_ind(
...
@@ -595,7 +603,7 @@ boolean_t pdcp_data_ind(
}
}
if
(
rb
!=
NULL
)
{
if
(
rb
!=
NULL
)
{
rb
->
recv_pdu
(
rb
,
(
char
*
)
sdu_buffer
->
data
,
sdu_buffer_size
);
rb
->
recv_pdu
(
ctxt_pP
,
rb
,
(
char
*
)
sdu_buffer
->
data
,
sdu_buffer_size
);
}
else
{
}
else
{
LOG_E
(
PDCP
,
"%s:%d:%s: fatal: no RB found (rb_id %ld, srb_flag %d)
\n
"
,
LOG_E
(
PDCP
,
"%s:%d:%s: fatal: no RB found (rb_id %ld, srb_flag %d)
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
rb_id
,
srb_flagP
);
__FILE__
,
__LINE__
,
__FUNCTION__
,
rb_id
,
srb_flagP
);
...
@@ -1037,7 +1045,7 @@ boolean_t pdcp_data_req(
...
@@ -1037,7 +1045,7 @@ boolean_t pdcp_data_req(
#endif
#endif
)
)
{
{
if
(
srb_flagP
)
{
TODO
;
}
//
if (srb_flagP) { TODO; }
return
pdcp_data_req_drb
(
ctxt_pP
,
rb_id
,
muiP
,
confirmP
,
sdu_buffer_size
,
return
pdcp_data_req_drb
(
ctxt_pP
,
rb_id
,
muiP
,
confirmP
,
sdu_buffer_size
,
sdu_buffer
);
sdu_buffer
);
}
}
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
0b64fedd
...
@@ -401,6 +401,31 @@ rrc_gNB_generate_RRCSetup(
...
@@ -401,6 +401,31 @@ rrc_gNB_generate_RRCSetup(
ue_context_pP
->
ue_context
.
ue_release_timer_thres
=
1000
;
ue_context_pP
->
ue_context
.
ue_release_timer_thres
=
1000
;
/* init timers */
/* init timers */
// ue_context_pP->ue_context.ue_rrc_inactivity_timer = 0;
// ue_context_pP->ue_context.ue_rrc_inactivity_timer = 0;
printf
(
"--------------------------------gnb send rrc setup to ue ----------liuyu---------------"
);
MessageDef
*
message_p
;
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
ctxt_pP
->
enb_flag
?
TASK_RRC_ENB
:
TASK_RRC_UE
,
ctxt_pP
->
enb_flag
?
TASK_PDCP_ENB
:
TASK_PDCP_UE
,
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
);
memcpy
(
message_buffer
,
ue_p
->
Srb0
.
Tx_buffer
.
Payload
,
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
);
message_p
=
itti_alloc_new_message
(
ctxt_pP
->
enb_flag
?
TASK_RRC_ENB
:
TASK_RRC_UE
,
RRC_DCCH_DATA_REQ
);
RRC_DCCH_DATA_REQ
(
message_p
).
frame
=
ctxt_pP
->
frame
;
RRC_DCCH_DATA_REQ
(
message_p
).
enb_flag
=
ctxt_pP
->
enb_flag
;
RRC_DCCH_DATA_REQ
(
message_p
).
rb_id
=
1
;
RRC_DCCH_DATA_REQ
(
message_p
).
muip
=
1
;
RRC_DCCH_DATA_REQ
(
message_p
).
confirmp
=
SDU_CONFIRM_NO
;
RRC_DCCH_DATA_REQ
(
message_p
).
sdu_size
=
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
;
RRC_DCCH_DATA_REQ
(
message_p
).
sdu_p
=
message_buffer
;
RRC_DCCH_DATA_REQ
(
message_p
).
mode
=
PDCP_TRANSMISSION_MODE_CONTROL
;
RRC_DCCH_DATA_REQ
(
message_p
).
module_id
=
ctxt_pP
->
module_id
;
RRC_DCCH_DATA_REQ
(
message_p
).
rnti
=
0x1234
;
//ctxt_pP->rnti;
RRC_DCCH_DATA_REQ
(
message_p
).
eNB_index
=
ctxt_pP
->
eNB_index
;
itti_send_msg_to_task
(
TASK_PDCP_ENB
,
ctxt_pP
->
instance
,
message_p
);
#ifdef ITTI_SIM
#ifdef ITTI_SIM
MessageDef
*
message_p
;
MessageDef
*
message_p
;
uint8_t
*
message_buffer
;
uint8_t
*
message_buffer
;
...
@@ -733,7 +758,8 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
...
@@ -733,7 +758,8 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
return
-
1
;
return
-
1
;
}
}
xer_fprint
(
stdout
,
&
asn_DEF_NR_DL_CCCH_Message
,(
void
*
)
dl_ccch_msg
);
//xer_fprint(stdout,&asn_DEF_NR_DL_CCCH_Message,(void *)dl_ccch_msg);
xer_fprint
(
stdout
,
&
asn_DEF_NR_UL_CCCH_Message
,(
void
*
)
ul_ccch_msg
);
if
(
ul_ccch_msg
->
message
.
present
==
NR_UL_CCCH_MessageType_PR_c1
)
{
if
(
ul_ccch_msg
->
message
.
present
==
NR_UL_CCCH_MessageType_PR_c1
)
{
switch
(
ul_ccch_msg
->
message
.
choice
.
c1
->
present
)
{
switch
(
ul_ccch_msg
->
message
.
choice
.
c1
->
present
)
{
...
@@ -946,7 +972,7 @@ rrc_gNB_decode_dcch(
...
@@ -946,7 +972,7 @@ rrc_gNB_decode_dcch(
sdu_sizeP
,
sdu_sizeP
,
0
,
0
,
0
);
0
);
// xer_fprint(stdout, &asn_DEF_NR_UL_DCCH_Message, (void *)&
ul_dcch_msg);
xer_fprint
(
stdout
,
&
asn_DEF_NR_UL_DCCH_Message
,
(
void
*
)
ul_dcch_msg
);
{
{
for
(
i
=
0
;
i
<
sdu_sizeP
;
i
++
)
{
for
(
i
=
0
;
i
<
sdu_sizeP
;
i
++
)
{
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
0b64fedd
...
@@ -1418,7 +1418,7 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB
...
@@ -1418,7 +1418,7 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_CCCH
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_CCCH
,
VCD_FUNCTION_OUT
);
return
-
1
;
return
-
1
;
}
}
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
State
=
NR_RRC_SI_RECEIVED
;
if
(
dl_ccch_msg
->
message
.
present
==
NR_DL_CCCH_MessageType_PR_c1
)
{
if
(
dl_ccch_msg
->
message
.
present
==
NR_DL_CCCH_MessageType_PR_c1
)
{
if
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
State
==
NR_RRC_SI_RECEIVED
)
{
if
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
State
==
NR_RRC_SI_RECEIVED
)
{
switch
(
dl_ccch_msg
->
message
.
choice
.
c1
->
present
)
{
switch
(
dl_ccch_msg
->
message
.
choice
.
c1
->
present
)
{
...
...
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