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
lizhongxiao
OpenXG-RAN
Commits
3fa8ff7d
Commit
3fa8ff7d
authored
Sep 12, 2022
by
hscuser
Committed by
jperaldi
Nov 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New Structure created for Cell-specific data
parent
868e37e3
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
150 additions
and
118 deletions
+150
-118
openair2/RRC/LTE/L2_interface.c
openair2/RRC/LTE/L2_interface.c
+3
-2
openair2/RRC/LTE/L2_interface_common.c
openair2/RRC/LTE/L2_interface_common.c
+3
-2
openair3/SS/ss_eNB_context.h
openair3/SS/ss_eNB_context.h
+21
-3
openair3/SS/ss_eNB_drb_task.c
openair3/SS/ss_eNB_drb_task.c
+10
-10
openair3/SS/ss_eNB_port_man_task.c
openair3/SS/ss_eNB_port_man_task.c
+2
-2
openair3/SS/ss_eNB_srb_task.c
openair3/SS/ss_eNB_srb_task.c
+11
-11
openair3/SS/ss_eNB_sys_task.c
openair3/SS/ss_eNB_sys_task.c
+48
-46
openair3/SS/ss_eNB_sysind_task.c
openair3/SS/ss_eNB_sysind_task.c
+6
-6
openair3/SS/ss_eNB_vng_task.c
openair3/SS/ss_eNB_vng_task.c
+3
-3
openair3/SS/ss_eNB_vt_timer_task.c
openair3/SS/ss_eNB_vt_timer_task.c
+9
-9
openair3/SS/ss_eNB_vtp_task.c
openair3/SS/ss_eNB_vtp_task.c
+11
-11
openair3/SS/ss_gNB_context.h
openair3/SS/ss_gNB_context.h
+11
-1
openair3/SS/ss_gNB_srb_task.c
openair3/SS/ss_gNB_srb_task.c
+8
-8
openair3/SS/ss_gNB_vtp_task.c
openair3/SS/ss_gNB_vtp_task.c
+2
-2
targets/ARCH/SS/ss_config.h
targets/ARCH/SS/ss_config.h
+2
-2
No files found.
openair2/RRC/LTE/L2_interface.c
View file @
3fa8ff7d
...
...
@@ -50,8 +50,9 @@
#include "flexran_agent_extern.h"
#include "openair2/F1AP/f1ap_du_rrc_message_transfer.h"
#include "openair3/SS/ss_eNB_context.h"
extern
RAN_CONTEXT_t
RC
;
extern
SSConfigContext_t
SS_context
;
//------------------------------------------------------------------------------
int8_t
mac_rrc_data_req
(
...
...
@@ -340,7 +341,7 @@ mac_rrc_data_ind(
ctxt
.
brOption
=
brOption
;
//#ifdef ENB_SS
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
LOG_I
(
RRC
,
"RRC Sending CCCH PDU_IND to SS
\n
"
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_RRC_ENB
,
0
,
SS_RRC_PDU_IND
);
...
...
openair2/RRC/LTE/L2_interface_common.c
View file @
3fa8ff7d
...
...
@@ -38,11 +38,12 @@
#include "intertask_interface.h"
#include "openair3/SS/ss_eNB_context.h"
//#define RRC_DATA_REQ_DEBUG
//#define DEBUG_RRC 1
extern
RAN_CONTEXT_t
RC
;
extern
SSConfigContext_t
SS_context
;
//------------------------------------------------------------------------------
uint8_t
rrc_data_req
(
...
...
@@ -122,7 +123,7 @@ rrc_data_ind(
ctxt_pP
->
rnti
);
//#ifdef ENB_SS
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
LOG_I
(
RRC
,
"L2 Interface Sending DCCH PDU_IND to SS
\n
"
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_RRC_ENB
,
0
,
SS_RRC_PDU_IND
);
...
...
openair3/SS/ss_eNB_context.h
View file @
3fa8ff7d
...
...
@@ -47,8 +47,10 @@ typedef enum SSEvents_E {
SS_VNG_INVALID_MSG
}
SSEventsE
;
typedef
struct
SSConfigContext_s
{
uint16_t
dl_earfcn
;
/** Structure Containing Cell-specific values only */
typedef
struct
SSCellConfigContext_s
{
int
State
;
uint16_t
dl_earfcn
;
uint16_t
ul_earfcn
;
uint32_t
dl_freq
;
uint32_t
ul_freq
;
...
...
@@ -58,7 +60,12 @@ typedef struct SSConfigContext_s {
//TO DO: Need to remove one of the following cellId
EUTRA_CellId_Type
ttcn_cell_id
;
uint16_t
eutra_cellId
;
uint16_t
ss_rnti_g
;
}
SSCellConfigContext_t
;
typedef
struct
SSConfigContext_s
{
/** List of Cells */
SSCellConfigContext_t
SSCell_list
[
8
];
/** Timing info */
uint16_t
sfn
;
uint8_t
sf
;
...
...
@@ -67,6 +74,17 @@ typedef struct SSConfigContext_s {
hash_table_t
*
vt_timer_table
;
// key is SFN_SF
/** TODO: To add more */
}
SSConfigContext_t
[
8
];
}
SSConfigContext_t
;
typedef
enum
{
SS_STATE_NOT_CONFIGURED
=
0
,
SS_STATE_CELL_CONFIGURED
,
SS_STATE_CELL_ACTIVE
,
SS_STATE_AS_SECURITY_ACTIVE
,
SS_STATE_AS_RBS_ACTIVE
,
SS_STATE_CELL_BROADCASTING
,
SS_STATE_MAX_STATE
}
SS_STATE_t
;
#endif
/* _SS_ENB_CONTEXT_ */
openair3/SS/ss_eNB_drb_task.c
View file @
3fa8ff7d
...
...
@@ -52,7 +52,7 @@
#include "ss_eNB_context.h"
extern
RAN_CONTEXT_t
RC
;
extern
uint16_t
ss_rnti_g
;
//
extern uint16_t ss_rnti_g;
static
acpCtx_t
ctx_drb_g
=
NULL
;
extern
SSConfigContext_t
SS_context
;
...
...
@@ -80,7 +80,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind){
size_t
msgSize
=
size
;
memset
(
&
ind
,
0
,
sizeof
(
ind
));
ind
.
Common
.
CellId
=
SS_context
[
0
].
eutra_cellId
;
ind
.
Common
.
CellId
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
//Populated the Routing Info
ind
.
Common
.
RoutingInfo
.
d
=
RoutingInfo_Type_RadioBearerId
;
...
...
@@ -106,7 +106,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind){
ind
.
Common
.
RlcBearerRouting
.
d
=
true
;
ind
.
Common
.
RlcBearerRouting
.
v
.
d
=
RlcBearerRouting_Type_EUTRA
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
[
0
].
eutra_cellId
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
//Populating the PDU
ind
.
U_Plane
.
SubframeData
.
NoOfTTIs
=
1
;
...
...
@@ -127,7 +127,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind){
LOG_A
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_IND] acpDrbProcessToSSEncSrv Failure
\n
"
);
return
;
}
LOG_A
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_IND] Buffer msgSize=%d (!!2) to EUTRACell %d"
,
(
int
)
msgSize
,
SS_context
[
0
].
eutra_cellId
);
LOG_A
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_IND] Buffer msgSize=%d (!!2) to EUTRACell %d"
,
(
int
)
msgSize
,
SS_context
.
SSCell_list
[
0
].
eutra_cellId
);
//Send Message
status
=
acpSendMsg
(
ctx_drb_g
,
msgSize
,
buffer
);
...
...
@@ -166,7 +166,7 @@ static void ss_task_handle_drb_pdu_req(struct DRB_COMMON_REQ *req)
}
}
SS_DRB_PDU_REQ
(
message_p
).
rnti
=
ss_rnti_g
;
SS_DRB_PDU_REQ
(
message_p
).
rnti
=
SS_context
.
SSCell_list
[
0
].
ss_rnti_g
;
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
instance_g
,
message_p
);
if
(
send_res
<
0
)
...
...
@@ -231,14 +231,14 @@ ss_eNB_read_from_drb_socket(acpCtx_t ctx){
LOG_A
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_REQ] acpDrbProcessFromSSDecSrv Failed
\n
"
);
break
;
}
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
LOG_A
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_REQ] DRB_COMMON_REQ Received in CELL_ACTIVE
\n
"
);
ss_task_handle_drb_pdu_req
(
req
);
}
else
{
LOG_W
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_REQ] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_W
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_REQ] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
acpDrbProcessFromSSFreeSrv
(
req
);
...
...
@@ -272,19 +272,19 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
if
(
origin_task
==
TASK_SS_PORTMAN
)
{
LOG_D
(
ENB_APP
,
"[SS_DRB] DUMMY WAKEUP recevied from PORTMAN state %d
\n
"
,
RC
.
ss
.
State
);
LOG_D
(
ENB_APP
,
"[SS_DRB] DUMMY WAKEUP recevied from PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
else
{
LOG_A
(
ENB_APP
,
"[SS_DRB] Received SS_DRB_PDU_IND from RRC PDCP
\n
"
);
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
ss_send_drb_data
(
&
received_msg
->
ittiMsg
.
ss_drb_pdu_ind
);
}
else
{
LOG_A
(
ENB_APP
,
"ERROR [SS_DRB][SS_DRB_PDU_IND] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_A
(
ENB_APP
,
"ERROR [SS_DRB][SS_DRB_PDU_IND] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
}
...
...
openair3/SS/ss_eNB_port_man_task.c
View file @
3fa8ff7d
...
...
@@ -210,7 +210,7 @@ void ss_port_man_send_data(
size_t
msgSize
=
size
;
memset
(
&
cnf
,
0
,
sizeof
(
cnf
));
cnf
.
Common
.
CellId
=
SS_context
[
0
].
eutra_cellId
;
cnf
.
Common
.
CellId
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
cnf
.
Common
.
RoutingInfo
.
d
=
RoutingInfo_Type_None
;
cnf
.
Common
.
RoutingInfo
.
v
.
None
=
true
;
cnf
.
Common
.
TimingInfo
.
d
=
TimingInfo_Type_Now
;
...
...
@@ -363,7 +363,7 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
{
// No message (timeout on socket)
//Send Dummy Wake up ITTI message to SRB task.
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
LOG_A
(
ENB_SS
,
"[SS-PORTMAN] Sending Wake up signal to SRB task
\n
"
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SS_PORTMAN
,
0
,
SS_RRC_PDU_IND
);
...
...
openair3/SS/ss_eNB_srb_task.c
View file @
3fa8ff7d
...
...
@@ -62,7 +62,7 @@ SSConfigContext_t SS_context;
static
acpCtx_t
ctx_srb_g
=
NULL
;
static
uint16_t
rnti_g
=
0
;
static
instance_t
instance_g
=
0
;
uint16_t
ss_rnti_g
=
0
;
//
uint16_t ss_rnti_g = 0;
enum
MsgUserId
{
...
...
@@ -104,10 +104,10 @@ static void ss_send_srb_data(ss_rrc_pdu_ind_t *pdu_ind)
DevAssert
(
pdu_ind
->
sdu_size
>=
0
);
DevAssert
(
pdu_ind
->
srb_id
>=
0
);
rnti_g
=
pdu_ind
->
rnti
;
ss_rnti_g
=
rnti_g
;
SS_context
.
SSCell_list
[
0
].
ss_rnti_g
=
rnti_g
;
size_t
msgSize
=
size
;
memset
(
&
ind
,
0
,
sizeof
(
ind
));
ind
.
Common
.
CellId
=
SS_context
[
0
].
eutra_cellId
;
ind
.
Common
.
CellId
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
// Populated the Routing Info
ind
.
Common
.
RoutingInfo
.
d
=
RoutingInfo_Type_RadioBearerId
;
...
...
@@ -133,7 +133,7 @@ static void ss_send_srb_data(ss_rrc_pdu_ind_t *pdu_ind)
ind
.
Common
.
RlcBearerRouting
.
d
=
true
;
ind
.
Common
.
RlcBearerRouting
.
v
.
d
=
RlcBearerRouting_Type_EUTRA
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
[
0
].
eutra_cellId
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
/* Populate and Send the EUTRA RRC PDU IND to Client */
if
(
pdu_ind
->
srb_id
==
0
)
...
...
@@ -181,7 +181,7 @@ static void ss_send_srb_data(ss_rrc_pdu_ind_t *pdu_ind)
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_IND] acpSysSrbProcessToSSEncSrv Failure
\n
"
);
return
;
}
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_IND] Buffer msgSize=%d (!!2) to EUTRACell %d"
,
(
int
)
msgSize
,
SS_context
[
0
].
eutra_cellId
);
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_IND] Buffer msgSize=%d (!!2) to EUTRACell %d"
,
(
int
)
msgSize
,
SS_context
.
SSCell_list
[
0
].
eutra_cellId
);
/* Send message
*/
...
...
@@ -271,7 +271,7 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
msg_queued
=
vt_timer_setup
(
timer_tinfo
,
TASK_RRC_ENB
,
instance_g
,
message_p
);
}
LOG_A
(
ENB_SS
,
"RRC_PDU Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d"
,
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
[
0
].
sfn
,
SS_context
[
0
]
.
sf
);
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
}
if
(
!
msg_queued
)
...
...
@@ -354,13 +354,13 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_REQ] acpSysSrbProcessFromSSDecSrv Failed
\n
"
);
break
;
}
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
ss_task_handle_rrc_pdu_req
(
req
);
}
else
{
LOG_A
(
ENB_SS
,
"ERROR [SS_SRB][EUTRA_RRC_PDU_REQ] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_A
(
ENB_SS
,
"ERROR [SS_SRB][EUTRA_RRC_PDU_REQ] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
acpSysSrbProcessFromSSFreeSrv
(
req
);
...
...
@@ -452,19 +452,19 @@ void *ss_eNB_srb_process_itti_msg(void *notUsed)
if
(
origin_task
==
TASK_SS_PORTMAN
)
{
LOG_D
(
ENB_APP
,
"[SS_SRB] DUMMY WAKEUP receviedfrom PORTMAN state %d
\n
"
,
RC
.
ss
.
State
);
LOG_D
(
ENB_APP
,
"[SS_SRB] DUMMY WAKEUP receviedfrom PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
else
{
LOG_A
(
ENB_SS
,
"[SS_SRB] Received SS_RRC_PDU_IND from RRC
\n
"
);
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
ss_send_srb_data
(
&
received_msg
->
ittiMsg
.
ss_rrc_pdu_ind
);
}
else
{
LOG_A
(
ENB_SS
,
"ERROR [SS_SRB][EUTRA_RRC_PDU_IND] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_A
(
ENB_SS
,
"ERROR [SS_SRB][EUTRA_RRC_PDU_IND] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
}
...
...
openair3/SS/ss_eNB_sys_task.c
View file @
3fa8ff7d
This diff is collapsed.
Click to expand it.
openair3/SS/ss_eNB_sysind_task.c
View file @
3fa8ff7d
...
...
@@ -80,7 +80,7 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind)
DevAssert
(
p_ind
!=
NULL
);
size_t
msgSize
=
size
;
memset
(
&
ind
,
0
,
sizeof
(
ind
));
ind
.
Common
.
CellId
=
SS_context
[
0
].
eutra_cellId
;
ind
.
Common
.
CellId
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
// Populated the Routing Info
ind
.
Common
.
RoutingInfo
.
d
=
RoutingInfo_Type_None
;
...
...
@@ -105,7 +105,7 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind)
ind
.
Common
.
RlcBearerRouting
.
d
=
true
;
ind
.
Common
.
RlcBearerRouting
.
v
.
d
=
RlcBearerRouting_Type_EUTRA
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
[
0
].
eutra_cellId
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] Frame: %d, Subframe: %d, RAPID: %d, PRTPower: %d, BitMask: %d
\n
"
,
p_ind
->
sfn
,
p_ind
->
sf
,
p_ind
->
ra_PreambleIndex
,
p_ind
->
prtPower_Type
,
p_ind
->
bitmask
);
...
...
@@ -125,7 +125,7 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind)
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] acpSysIndProcessToSSEncSrv Failure
\n
"
);
return
;
}
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] Buffer msgSize=%d (!!2) to EUTRACell %d
\n
"
,
(
int
)
msgSize
,
SS_context
[
0
].
eutra_cellId
);
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] Buffer msgSize=%d (!!2) to EUTRACell %d
\n
"
,
(
int
)
msgSize
,
SS_context
.
SSCell_list
[
0
].
eutra_cellId
);
/* Send message */
status
=
acpSendMsg
(
ctx_sysind_g
,
msgSize
,
buffer
);
...
...
@@ -278,19 +278,19 @@ void *ss_eNB_sysind_process_itti_msg(void *notUsed)
if
(
origin_task
==
TASK_SS_PORTMAN
)
{
LOG_D
(
ENB_APP
,
"[SS_SYSIND] DUMMY WAKEUP receviedfrom PORTMAN state %d
\n
"
,
RC
.
ss
.
State
);
LOG_D
(
ENB_APP
,
"[SS_SYSIND] DUMMY WAKEUP receviedfrom PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
else
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Received SS_SYSTEM_IND
\n
"
);
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_CONFIGURED
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_CONFIGURED
)
{
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
ss_send_sysind_data
(
&
received_msg
->
ittiMsg
.
ss_system_ind
);
}
else
{
LOG_E
(
ENB_SS
,
"[SS_SYSIND][SS_SYSTEM_IND] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_E
(
ENB_SS
,
"[SS_SYSIND][SS_SYSTEM_IND] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
...
...
openair3/SS/ss_eNB_vng_task.c
View file @
3fa8ff7d
...
...
@@ -115,7 +115,7 @@ vng_ss_configure_cell (EUTRA_CellId_Type CellId, Dl_Bandwidth_Type Bandwidth,
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_VNG
,
0
,
SS_VNG_PROXY_REQ
);
assert
(
message_p
);
SS_VNG_PROXY_REQ
(
message_p
).
cell_id
=
SS_context
[
0
].
cellId
;
SS_VNG_PROXY_REQ
(
message_p
).
cell_id
=
SS_context
.
SSCell_list
[
0
].
cellId
;
SS_VNG_PROXY_REQ
(
message_p
).
bw
=
Bandwidth
;
SS_VNG_PROXY_REQ
(
message_p
).
Noc_level
=
NocLevel
;
SS_VNG_PROXY_REQ
(
message_p
).
cmd
=
cmd
;
...
...
@@ -200,8 +200,8 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
break
;
}
if
(
RC
.
ss
.
State
<
SS_STATE_CELL_ACTIVE
)
{
LOG_A
(
ENB_SS
,
"[SS-VNG] Request received in an invalid state: %d
\n
"
,
RC
.
ss
.
State
);
if
(
SS_context
.
SSCell_list
[
0
]
.
State
<
SS_STATE_CELL_ACTIVE
)
{
LOG_A
(
ENB_SS
,
"[SS-VNG] Request received in an invalid state: %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
break
;
}
/** TODO: Dump message here */
...
...
openair3/SS/ss_eNB_vt_timer_task.c
View file @
3fa8ff7d
...
...
@@ -67,8 +67,8 @@ static void vt_subtract_sf(uint16_t *frameP, uint8_t *subframeP, int offset)
uint8_t
msg_can_be_queued
(
ss_set_timinfo_t
req_tinfo
,
ss_set_timinfo_t
*
timer_tinfo
)
{
ss_set_timinfo_t
curr_tinfo
;
curr_tinfo
.
sfn
=
SS_context
[
0
]
.
sfn
;
curr_tinfo
.
sf
=
SS_context
[
0
]
.
sf
;
curr_tinfo
.
sfn
=
SS_context
.
sfn
;
curr_tinfo
.
sf
=
SS_context
.
sf
;
LOG_A
(
ENB_APP
,
"VT_TIMER Enter msg_can_be_queued for SFN %d , SF %d
\n
"
,
req_tinfo
.
sfn
,
req_tinfo
.
sf
);
...
...
@@ -97,7 +97,7 @@ uint8_t vt_timer_setup(ss_set_timinfo_t tinfo, task_id_t task_id,instance_t inst
timer_ele_p
->
task_id
=
task_id
;
timer_ele_p
->
msg
=
msg
;
if
(
hashtable_insert
(
SS_context
[
0
]
.
vt_timer_table
,
if
(
hashtable_insert
(
SS_context
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
,
(
void
*
)
timer_ele_p
)
==
HASH_TABLE_OK
)
{
LOG_A
(
ENB_APP
,
"VT_TIMER setup for SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
...
...
@@ -117,14 +117,14 @@ static inline void ss_vt_timer_check(ss_set_timinfo_t tinfo)
uint32_t
sfnSfKey
=
(
tinfo
.
sfn
<<
4
)
|
tinfo
.
sf
;
hash_rc
=
hashtable_is_key_exists
(
SS_context
[
0
]
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
);
hash_rc
=
hashtable_is_key_exists
(
SS_context
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
);
//printf("VT_TIMER foudn queued SFN %d , SF %d\n",tinfo.sfn,tinfo.sf);
if
(
hash_rc
==
HASH_TABLE_OK
)
{
LOG_D
(
ENB_APP
,
"VT_TIMER Timeout sending curr SFN %d SF %d
\n
"
,
SS_context
[
0
].
sfn
,
SS_context
[
0
]
.
sf
);
SS_context
.
sfn
,
SS_context
.
sf
);
hash_rc
=
hashtable_get
(
SS_context
[
0
]
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
,
(
void
**
)
&
timer_ele_p
);
hash_rc
=
hashtable_get
(
SS_context
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
,
(
void
**
)
&
timer_ele_p
);
LOG_A
(
ENB_APP
,
"VT_TIMER Enter check SFN %d , SF %d taskID %d timer_ele.task_id instance %ld
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
,
timer_ele_p
->
task_id
,
timer_ele_p
->
instance
);
...
...
@@ -138,11 +138,11 @@ static inline void ss_vt_timer_check(ss_set_timinfo_t tinfo)
{
LOG_A
(
ENB_APP
,
"VT_TIMER Sent message to taskID %d timer_ele.task_id instance %ld
\n
"
,
timer_ele_p
->
task_id
,
timer_ele_p
->
instance
);
hash_rc
=
hashtable_remove
(
SS_context
[
0
]
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
);
hash_rc
=
hashtable_remove
(
SS_context
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
);
}
LOG_D
(
ENB_APP
,
"VT_TIMER Timeout sending done curr SFN %d SF %d
\n
"
,
SS_context
[
0
].
sfn
,
SS_context
[
0
]
.
sf
);
SS_context
.
sfn
,
SS_context
.
sf
);
}
...
...
@@ -195,7 +195,7 @@ void *ss_eNB_vt_timer_process_itti_msg(void *notUsed)
*/
int
ss_eNB_vt_timer_init
(
void
)
{
SS_context
[
0
]
.
vt_timer_table
=
hashtable_create
(
32
,
NULL
,
NULL
);
SS_context
.
vt_timer_table
=
hashtable_create
(
32
,
NULL
,
NULL
);
itti_mark_task_ready
(
TASK_VT_TIMER
);
return
0
;
...
...
openair3/SS/ss_eNB_vtp_task.c
View file @
3fa8ff7d
...
...
@@ -120,14 +120,14 @@ void ss_vtp_send_tinfo(
LOG_E
(
ENB_APP
,
"[SS-VTP] acpSendMsg failed. Error : %d on fd: %d the VTP at SS will be disabled
\n
"
,
status
,
acpGetSocketFd
(
ctx_vtp_g
));
acpFree
(
buffer
);
//SS_context
[0]
.vtp_enabled = VTP_DISABLE;
//SS_context.vtp_enabled = VTP_DISABLE;
return
;
}
else
{
LOG_A
(
ENB_APP
,
"[SS-VTP] acpSendMsg VTP_Send Success SFN %d SF %d virtualTime.Enable %d
\n
"
,
tinfo
->
sfn
,
tinfo
->
sf
,
virtualTime
.
Enable
);
SS_context
[
0
]
.
vtinfo
=
*
tinfo
;
SS_context
.
vtinfo
=
*
tinfo
;
}
// Free allocated buffer
acpFree
(
buffer
);
...
...
@@ -201,7 +201,7 @@ static inline void ss_send_vtp_resp(struct VirtualTimeInfo_Type *virtualTime)
req
->
header
.
preamble
=
0xFEEDC0DE
;
req
->
header
.
msg_id
=
SS_VTP_RESP
;
req
->
header
.
length
=
sizeof
(
proxy_ss_header_t
);
req
->
header
.
cell_id
=
SS_context
[
0
].
cellId
;
req
->
header
.
cell_id
=
SS_context
.
SSCell_list
[
0
].
cellId
;
req
->
tinfo
.
sfn
=
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
;
req
->
tinfo
.
sf
=
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
;
...
...
@@ -234,7 +234,7 @@ static inline void ss_enable_vtp()
req
->
header
.
preamble
=
0xFEEDC0DE
;
req
->
header
.
msg_id
=
SS_VTP_ENABLE
;
req
->
header
.
length
=
sizeof
(
proxy_ss_header_t
);
req
->
header
.
cell_id
=
SS_context
[
0
].
cellId
;
req
->
header
.
cell_id
=
SS_context
.
SSCell_list
[
0
].
cellId
;
/* Initialize with zero */
req
->
tinfo
.
sfn
=
0
;
...
...
@@ -320,16 +320,16 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx, bool vtInit)
break
;
}
LOG_A
(
ENB_APP
,
"[SS-VTP] Received VTEnquireTimingAck Request SFN %d Subframe %d Waiting for ACK of SFN %d SF %d
\n
"
,
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
,
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
,
SS_context
[
0
].
vtinfo
.
sfn
,
SS_context
[
0
]
.
vtinfo
.
sf
);
// if (
RC.ss
.State < SS_STATE_CELL_ACTIVE)
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
,
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
,
SS_context
.
vtinfo
.
sfn
,
SS_context
.
vtinfo
.
sf
);
// if (
SS_context.SSCell_list[0]
.State < SS_STATE_CELL_ACTIVE)
// {
// LOG_E(ENB_APP, "[SS-VTP] Request received in an invalid state: %d \n",
RC.ss
.State);
// LOG_E(ENB_APP, "[SS-VTP] Request received in an invalid state: %d \n",
SS_context.SSCell_list[0]
.State);
// break;
// }
// if((SS_context
[0]
.vtinfo.sfn == virtualTime->TimingInfo.SFN.v.Number) &&
// (SS_context[0].vtinfo.sf == virtualTime->TimingInfo.Subframe.v.Number))
// if((SS_context.vtinfo.sfn == virtualTime->TimingInfo.SFN.v.Number) &&
// (SS_context
.SSCell_list
[0].vtinfo.sf == virtualTime->TimingInfo.Subframe.v.Number))
{
if
(
virtualTime
->
Enable
)
{
ss_send_vtp_resp
(
virtualTime
);
...
...
@@ -381,7 +381,7 @@ void *ss_eNB_vtp_process_itti_msg(void *notUsed)
tinfo
.
sfn
=
SS_UPD_TIM_INFO
(
received_msg
).
sfn
;
LOG_A
(
ENB_APP
,
"[VTP] received VTP_UPD_TIM_INFO SFN: %d SF: %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_APP
,
"[VTP] received VTP_UPD_TIM_INFO SFN: %d SF: %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
if
(
SS_context
[
0
]
.
vtp_enabled
==
1
)
if
(
SS_context
.
vtp_enabled
==
1
)
ss_vtp_send_tinfo
(
TASK_VTP
,
&
tinfo
);
}
break
;
...
...
@@ -488,7 +488,7 @@ void* ss_eNB_vtp_task(void *arg) {
ss_eNB_wait_first_msg
();
SS_context
[
0
]
.
vtp_enabled
=
1
;
SS_context
.
vtp_enabled
=
1
;
RC
.
ss
.
vtp_ready
=
1
;
ss_enable_vtp
();
sleep
(
1
);
...
...
openair3/SS/ss_gNB_context.h
View file @
3fa8ff7d
...
...
@@ -24,6 +24,7 @@
#include "SidlCommon.h"
typedef
struct
SSConfigContext_s
{
int
State
;
uint16_t
dl_earfcn
;
uint16_t
ul_earfcn
;
uint32_t
dl_freq
;
...
...
@@ -35,9 +36,18 @@ typedef struct SSConfigContext_s {
EUTRA_CellId_Type
ttcn_cell_id
;
uint16_t
eutra_cellId
;
uint16_t
nr_cellId
;
uint16_t
ss_rnti_g
;
/** TODO: To add more */
}
SSConfigContext_t
;
typedef
enum
{
SS_STATE_NOT_CONFIGURED
=
0
,
SS_STATE_CELL_CONFIGURED
,
SS_STATE_CELL_ACTIVE
,
SS_STATE_AS_SECURITY_ACTIVE
,
SS_STATE_AS_RBS_ACTIVE
,
SS_STATE_CELL_BROADCASTING
,
SS_STATE_MAX_STATE
}
SS_STATE_t
;
#endif
/* _SS_GNB_CONTEXT_ */
openair3/SS/ss_gNB_srb_task.c
View file @
3fa8ff7d
...
...
@@ -59,7 +59,7 @@ SSConfigContext_t SS_context;
static
acpCtx_t
ctx_srb_g
=
NULL
;
static
uint16_t
rnti_g
=
0
;
static
instance_t
instance_g
=
0
;
uint16_t
ss_rnti_g
=
0
;
//
uint16_t ss_rnti_g = 0;
typedef
enum
{
// user defined IDs should be an int number >= 1
...
...
@@ -86,7 +86,7 @@ static void ss_send_srb_data(ss_nrrrc_pdu_ind_t *pdu_ind)
DevAssert
(
pdu_ind
->
sdu_size
>=
0
);
DevAssert
(
pdu_ind
->
srb_id
>=
0
);
rnti_g
=
pdu_ind
->
rnti
;
ss_rnti_g
=
rnti_g
;
SS_context
.
ss_rnti_g
=
rnti_g
;
size_t
msgSize
=
size
;
memset
(
&
ind
,
0
,
sizeof
(
ind
));
//TODO: Work Around till Sys port is implemented for 5G
...
...
@@ -300,13 +300,13 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
LOG_A
(
GNB_APP
,
"[SS_SRB][NR_RRC_PDU_REQ] acpNrSysSrbProcessFromSSDecSrv Failed
\n
"
);
break
;
}
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
ss_task_handle_rrc_pdu_req
(
req
);
}
else
{
LOG_A
(
GNB_APP
,
"ERROR [SS_SRB][NR_RRC_PDU_REQ] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_A
(
GNB_APP
,
"ERROR [SS_SRB][NR_RRC_PDU_REQ] received in SS state %d
\n
"
,
SS_context
.
State
);
}
acpNrSysSrbProcessFromSSFreeSrv
(
req
);
...
...
@@ -361,7 +361,7 @@ void ss_gNB_srb_init(void)
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
assert
(
buffer
);
RC
.
ss
.
State
=
SS_STATE_CELL_ACTIVE
;
SS_context
.
State
=
SS_STATE_CELL_ACTIVE
;
itti_subscribe_event_fd
(
TASK_SS_SRB
,
fd1
);
itti_mark_task_ready
(
TASK_SS_SRB
);
...
...
@@ -387,20 +387,20 @@ void *ss_gNB_srb_process_itti_msg(void *notUsed)
if (origin_task == TASK_SS_PORTMAN)
{
LOG_D(GNB_APP, "[SS_SRB] DUMMY WAKEUP receviedfrom PORTMAN state %d \n",
RC.ss
.State);
LOG_D(GNB_APP, "[SS_SRB] DUMMY WAKEUP receviedfrom PORTMAN state %d \n",
SS_context
.State);
}
else
#endif
{
LOG_A
(
GNB_APP
,
"[SS_SRB] Received SS_NRRRC_PDU_IND from RRC
\n
"
);
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
ss_send_srb_data
(
&
received_msg
->
ittiMsg
.
ss_nrrrc_pdu_ind
);
}
else
{
LOG_A
(
GNB_APP
,
"ERROR [SS_SRB][NR_RRC_PDU_IND] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_A
(
GNB_APP
,
"ERROR [SS_SRB][NR_RRC_PDU_IND] received in SS state %d
\n
"
,
SS_context
.
State
);
}
}
...
...
openair3/SS/ss_gNB_vtp_task.c
View file @
3fa8ff7d
...
...
@@ -310,9 +310,9 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx)
}
LOG_A
(
ENB_APP
,
"[SS-VTP] Received VTEnquireTimingAck Request SFN %d Subframe %d Waiting for ACK of SFN %d SF %d
\n
"
,
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
,
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
,
SS_context
.
vtinfo
.
sfn
,
SS_context
.
vtinfo
.
sf
);
// if (
RC.ss
.State < SS_STATE_CELL_ACTIVE)
// if (
SS_context
.State < SS_STATE_CELL_ACTIVE)
// {
// LOG_E(ENB_APP, "[SS-VTP] Request received in an invalid state: %d \n",
RC.ss
.State);
// LOG_E(ENB_APP, "[SS-VTP] Request received in an invalid state: %d \n",
SS_context
.State);
// break;
// }
...
...
targets/ARCH/SS/ss_config.h
View file @
3fa8ff7d
...
...
@@ -65,7 +65,6 @@ typedef struct ss_config_s {
int
SysportNR
;
uint8_t
configured
;
/** State info */
int
State
;
int
vtp_ready
;
int
CBRA_flag
;
int
mac_rlc_data_ind_frame
;
...
...
@@ -74,7 +73,7 @@ typedef struct ss_config_s {
/** Cell Config Array */
ss_cell_config_t
ss_cell_list
[
8
];
}
ss_config_t
;
/**
typedef enum {
SS_STATE_NOT_CONFIGURED = 0,
SS_STATE_CELL_CONFIGURED,
...
...
@@ -84,6 +83,7 @@ typedef enum {
SS_STATE_CELL_BROADCASTING,
SS_STATE_MAX_STATE
} SS_STATE_t;
*/
#endif
/** __SS_CONFIG_H__ */
/** @} */
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