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
7e8fb445
Commit
7e8fb445
authored
Apr 17, 2023
by
Swetank Srivastava
Committed by
Vijay C
May 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TC passed with intermittent success
parent
841d00d5
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
486 additions
and
436 deletions
+486
-436
common/utils/LOG/log.c
common/utils/LOG/log.c
+11
-0
common/utils/LOG/log.h
common/utils/LOG/log.h
+11
-0
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+22
-0
openair3/SS/ss_eNB_drb_task.c
openair3/SS/ss_eNB_drb_task.c
+31
-31
openair3/SS/ss_eNB_port_man_task.c
openair3/SS/ss_eNB_port_man_task.c
+50
-45
openair3/SS/ss_eNB_srb_task.c
openair3/SS/ss_eNB_srb_task.c
+29
-29
openair3/SS/ss_eNB_sys_task.c
openair3/SS/ss_eNB_sys_task.c
+247
-245
openair3/SS/ss_eNB_sysind_task.c
openair3/SS/ss_eNB_sysind_task.c
+18
-18
openair3/SS/ss_eNB_vng_task.c
openair3/SS/ss_eNB_vng_task.c
+20
-20
openair3/SS/ss_eNB_vt_timer_task.c
openair3/SS/ss_eNB_vt_timer_task.c
+15
-15
openair3/SS/ss_eNB_vtp_task.c
openair3/SS/ss_eNB_vtp_task.c
+32
-33
No files found.
common/utils/LOG/log.c
View file @
7e8fb445
...
@@ -471,6 +471,17 @@ int logInit (void)
...
@@ -471,6 +471,17 @@ int logInit (void)
register_log_component
(
"mRAL"
,
""
,
RAL_UE
);
register_log_component
(
"mRAL"
,
""
,
RAL_UE
);
register_log_component
(
"ENB_APP"
,
"log"
,
ENB_APP
);
register_log_component
(
"ENB_APP"
,
"log"
,
ENB_APP
);
register_log_component
(
"ENB_SS"
,
"log"
,
ENB_SS
);
register_log_component
(
"ENB_SS"
,
"log"
,
ENB_SS
);
register_log_component
(
"ENB_SS_PORTMAN"
,
"log"
,
ENB_SS_PORTMAN
);
register_log_component
(
"ENB_SS_SYS_TASK"
,
"log"
,
ENB_SS_SYS_TASK
);
register_log_component
(
"ENB_SS_SRB_ACP"
,
"log"
,
ENB_SS_SRB_ACP
);
register_log_component
(
"ENB_SS_SYSIND"
,
"log"
,
ENB_SS_SYSIND
);
register_log_component
(
"ENB_SS_SYSIND_ACP"
,
"log"
,
ENB_SS_SYSIND_ACP
);
register_log_component
(
"ENB_SS_SRB"
,
"log"
,
ENB_SS_SRB
);
register_log_component
(
"ENB_SS_DRB"
,
"log"
,
ENB_SS_DRB
);
register_log_component
(
"ENB_SS_DRB_ACP"
,
"log"
,
ENB_SS_DRB_ACP
);
register_log_component
(
"ENB_SS_VNG"
,
"log"
,
ENB_SS_VNG
);
register_log_component
(
"ENB_SS_VTP"
,
"log"
,
ENB_SS_VTP
);
register_log_component
(
"ENB_SS_VT_TIMER"
,
"log"
,
ENB_SS_VT_TIMER
);
register_log_component
(
"MCE_APP"
,
"log"
,
MCE_APP
);
register_log_component
(
"MCE_APP"
,
"log"
,
MCE_APP
);
register_log_component
(
"MME_APP"
,
"log"
,
MME_APP
);
register_log_component
(
"MME_APP"
,
"log"
,
MME_APP
);
register_log_component
(
"FLEXRAN_AGENT"
,
"log"
,
FLEXRAN_AGENT
);
register_log_component
(
"FLEXRAN_AGENT"
,
"log"
,
FLEXRAN_AGENT
);
...
...
common/utils/LOG/log.h
View file @
7e8fb445
...
@@ -230,6 +230,17 @@ typedef enum {
...
@@ -230,6 +230,17 @@ typedef enum {
RAL_UE
,
RAL_UE
,
ENB_APP
,
ENB_APP
,
ENB_SS
,
ENB_SS
,
ENB_SS_PORTMAN
,
ENB_SS_SYS_TASK
,
ENB_SS_SRB_ACP
,
ENB_SS_SYSIND
,
ENB_SS_SYSIND_ACP
,
ENB_SS_SRB
,
ENB_SS_DRB
,
ENB_SS_DRB_ACP
,
ENB_SS_VNG
,
ENB_SS_VTP
,
ENB_SS_VT_TIMER
,
MCE_APP
,
MCE_APP
,
MME_APP
,
MME_APP
,
FLEXRAN_AGENT
,
FLEXRAN_AGENT
,
...
...
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
7e8fb445
...
@@ -5163,6 +5163,28 @@ harq_indication(module_id_t mod_idP,
...
@@ -5163,6 +5163,28 @@ harq_indication(module_id_t mod_idP,
channel
);
channel
);
}
}
if
(
IndCtrlMode_ENABLE
==
RC
.
ss
.
l1macind
[
CC_idP
].
UL_HARQ_Ctrl
)
{
int
i
;
LOG_I
(
MAC
,
"HARQ number_of_ack_nack=%d
\n
"
,
harq_pdu
->
harq_indication_fdd_rel13
.
number_of_ack_nack
);
for
(
i
=
0
;
i
<
harq_pdu
->
harq_indication_fdd_rel13
.
number_of_ack_nack
;
i
++
)
{
LOG_I
(
MAC
,
"HARQ index %d ACK/NACK %d
\n
"
,
i
,
harq_pdu
->
harq_indication_fdd_rel13
.
harq_tb_n
[
i
]);
// Populate and send the SS_SYSTEM_IND to System Simulator
MessageDef
*
m
=
itti_alloc_new_message
(
TASK_MAC_ENB
,
0
,
SS_SYSTEM_IND
);
SS_SYSTEM_IND
(
m
).
physCellId
=
RC
.
mac
[
mod_idP
]
->
common_channels
[
CC_idP
].
physCellId
;
SS_SYSTEM_IND
(
m
).
sysind_type
=
SysInd_Type_UL_HARQ
;
SS_SYSTEM_IND
(
m
).
sfn
=
frameP
;
SS_SYSTEM_IND
(
m
).
sf
=
subframeP
;
SS_SYSTEM_IND
(
m
).
UL_Harq
=
harq_pdu
->
harq_indication_fdd_rel13
.
harq_tb_n
[
i
];
itti_send_msg_to_task
(
TASK_SS_SYSIND
,
0
,
m
);
LOG_A
(
MAC
,
"MAC Sending SS_SYSTEM_IND with Type %d and UL_Harq %d to System Simulator frame %d Subframe %d
\n
"
,
SS_SYSTEM_IND
(
m
).
sysind_type
,
SS_SYSTEM_IND
(
m
).
UL_Harq
,
frameP
,
subframeP
);
}
}
/* don't care about cqi reporting if NACK/DTX is there */
/* don't care about cqi reporting if NACK/DTX is there */
if
(
channel
==
0
&&
!
nack_or_dtx_reported
(
cc
,
if
(
channel
==
0
&&
!
nack_or_dtx_reported
(
cc
,
harq_pdu
))
{
harq_pdu
))
{
...
...
openair3/SS/ss_eNB_drb_task.c
View file @
7e8fb445
...
@@ -73,7 +73,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind, int cell_index){
...
@@ -73,7 +73,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind, int cell_index){
struct
DRB_COMMON_IND
ind
=
{};
struct
DRB_COMMON_IND
ind
=
{};
uint32_t
status
=
0
;
uint32_t
status
=
0
;
LOG_A
(
ENB_
APP
,
"[SS_DRB] Reported drb sdu_size:%d
\t
drb_id %d
\n
"
,
pdu_ind
->
sdu_size
,
pdu_ind
->
drb_id
);
LOG_A
(
ENB_
SS_DRB
,
"[SS_DRB] Reported drb sdu_size:%d
\t
drb_id %d
\n
"
,
pdu_ind
->
sdu_size
,
pdu_ind
->
drb_id
);
DevAssert
(
pdu_ind
!=
NULL
);
DevAssert
(
pdu_ind
!=
NULL
);
DevAssert
(
pdu_ind
->
sdu_size
>=
0
);
DevAssert
(
pdu_ind
->
sdu_size
>=
0
);
...
@@ -114,7 +114,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind, int cell_index){
...
@@ -114,7 +114,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind, int cell_index){
ind
.
U_Plane
.
SubframeData
.
NoOfTTIs
=
1
;
ind
.
U_Plane
.
SubframeData
.
NoOfTTIs
=
1
;
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
d
=
L2DataList_Type_PdcpSdu
;
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
d
=
L2DataList_Type_PdcpSdu
;
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
d
=
1
;
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
d
=
1
;
LOG_A
(
ENB_
APP
,
"[SS_DRB][DRB_COMMON_IND] PDCP SDU Count: %lu
\n
"
,
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
d
);
LOG_A
(
ENB_
SS_DRB
,
"[SS_DRB][DRB_COMMON_IND] PDCP SDU Count: %lu
\n
"
,
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
d
);
for
(
int
i
=
0
;
i
<
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
d
;
i
++
){
for
(
int
i
=
0
;
i
<
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
d
;
i
++
){
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
=
CALLOC
(
1
,(
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
d
)
*
(
sizeof
(
PDCP_SDU_Type
)));
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
=
CALLOC
(
1
,(
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
d
)
*
(
sizeof
(
PDCP_SDU_Type
)));
DevAssert
(
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
!=
NULL
);
DevAssert
(
ind
.
U_Plane
.
SubframeData
.
PduSduList
.
v
.
PdcpSdu
.
v
!=
NULL
);
...
@@ -126,21 +126,21 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind, int cell_index){
...
@@ -126,21 +126,21 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind, int cell_index){
//Encode Message
//Encode Message
if
(
acpDrbProcessToSSEncSrv
(
ctx_drb_g
,
buffer
,
&
msgSize
,
&
ind
)
!=
0
)
if
(
acpDrbProcessToSSEncSrv
(
ctx_drb_g
,
buffer
,
&
msgSize
,
&
ind
)
!=
0
)
{
{
LOG_A
(
ENB_
APP
,
"[SS_DRB][DRB_COMMON_IND] acpDrbProcessToSSEncSrv Failure
\n
"
);
LOG_A
(
ENB_
SS_DRB
,
"[SS_DRB][DRB_COMMON_IND] acpDrbProcessToSSEncSrv Failure
\n
"
);
return
;
return
;
}
}
LOG_A
(
ENB_
APP
,
"[SS_DRB][DRB_COMMON_IND] Buffer msgSize=%d (!!2) to EUTRACell %d"
,
(
int
)
msgSize
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
);
LOG_A
(
ENB_
SS_DRB
,
"[SS_DRB][DRB_COMMON_IND] Buffer msgSize=%d (!!2) to EUTRACell %d"
,
(
int
)
msgSize
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
);
//Send Message
//Send Message
status
=
acpSendMsg
(
ctx_drb_g
,
msgSize
,
buffer
);
status
=
acpSendMsg
(
ctx_drb_g
,
msgSize
,
buffer
);
if
(
status
!=
0
)
if
(
status
!=
0
)
{
{
LOG_A
(
ENB_
APP
,
"[SS_DRB][DRB_COMMON_IND] acpSendMsg failed. Error : %d on fd: %d
\n
"
,
status
,
acpGetSocketFd
(
ctx_drb_g
));
LOG_A
(
ENB_
SS_DRB
,
"[SS_DRB][DRB_COMMON_IND] acpSendMsg failed. Error : %d on fd: %d
\n
"
,
status
,
acpGetSocketFd
(
ctx_drb_g
));
return
;
return
;
}
}
else
else
{
{
LOG_A
(
ENB_
APP
,
"[SS_DRB][DRB_COMMON_IND] acpSendMsg Success
\n
"
);
LOG_A
(
ENB_
SS_DRB
,
"[SS_DRB][DRB_COMMON_IND] acpSendMsg Success
\n
"
);
}
}
}
}
...
@@ -158,10 +158,10 @@ static void ss_task_handle_drb_pdu_req(struct DRB_COMMON_REQ *req,int cell_index
...
@@ -158,10 +158,10 @@ static void ss_task_handle_drb_pdu_req(struct DRB_COMMON_REQ *req,int cell_index
for
(
int
i
=
0
;
i
<
req
->
U_Plane
.
SubframeDataList
.
d
;
i
++
){
for
(
int
i
=
0
;
i
<
req
->
U_Plane
.
SubframeDataList
.
d
;
i
++
){
if
(
req
->
U_Plane
.
SubframeDataList
.
v
[
i
].
PduSduList
.
d
==
L2DataList_Type_PdcpSdu
){
if
(
req
->
U_Plane
.
SubframeDataList
.
v
[
i
].
PduSduList
.
d
==
L2DataList_Type_PdcpSdu
){
LOG_A
(
ENB_SS
,
"PDCP SDU Received in DRB_COMMON_REQ"
);
LOG_A
(
ENB_SS
_DRB_ACP
,
"PDCP SDU Received in DRB_COMMON_REQ"
);
for
(
int
j
=
0
;
j
<
req
->
U_Plane
.
SubframeDataList
.
v
[
i
].
PduSduList
.
v
.
PdcpSdu
.
d
;
j
++
){
for
(
int
j
=
0
;
j
<
req
->
U_Plane
.
SubframeDataList
.
v
[
i
].
PduSduList
.
v
.
PdcpSdu
.
d
;
j
++
){
SS_DRB_PDU_REQ
(
message_p
).
sdu_size
=
req
->
U_Plane
.
SubframeDataList
.
v
[
i
].
PduSduList
.
v
.
PdcpSdu
.
v
[
j
].
d
;
SS_DRB_PDU_REQ
(
message_p
).
sdu_size
=
req
->
U_Plane
.
SubframeDataList
.
v
[
i
].
PduSduList
.
v
.
PdcpSdu
.
v
[
j
].
d
;
LOG_A
(
ENB_SS
,
"Length of PDCP SDU received in DRB_COMMON_REQ: %lu
\n
"
,
req
->
U_Plane
.
SubframeDataList
.
v
[
i
].
PduSduList
.
v
.
PdcpSdu
.
v
[
j
].
d
);
LOG_A
(
ENB_SS
_DRB_ACP
,
"Length of PDCP SDU received in DRB_COMMON_REQ: %lu
\n
"
,
req
->
U_Plane
.
SubframeDataList
.
v
[
i
].
PduSduList
.
v
.
PdcpSdu
.
v
[
j
].
d
);
memcpy
(
SS_DRB_PDU_REQ
(
message_p
).
sdu
,
req
->
U_Plane
.
SubframeDataList
.
v
[
i
].
PduSduList
.
v
.
PdcpSdu
.
v
[
j
].
v
,
req
->
U_Plane
.
SubframeDataList
.
v
[
i
].
PduSduList
.
v
.
PdcpSdu
.
v
[
j
].
d
);
memcpy
(
SS_DRB_PDU_REQ
(
message_p
).
sdu
,
req
->
U_Plane
.
SubframeDataList
.
v
[
i
].
PduSduList
.
v
.
PdcpSdu
.
v
[
j
].
v
,
req
->
U_Plane
.
SubframeDataList
.
v
[
i
].
PduSduList
.
v
.
PdcpSdu
.
v
[
j
].
d
);
}
}
}
}
...
@@ -176,12 +176,12 @@ static void ss_task_handle_drb_pdu_req(struct DRB_COMMON_REQ *req,int cell_index
...
@@ -176,12 +176,12 @@ static void ss_task_handle_drb_pdu_req(struct DRB_COMMON_REQ *req,int cell_index
tinfo
.
sf
=
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
;
tinfo
.
sf
=
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
;
timer_tinfo
=
tinfo
;
timer_tinfo
=
tinfo
;
msg_queued
=
msg_can_be_queued
(
tinfo
,
&
timer_tinfo
);
msg_queued
=
msg_can_be_queued
(
tinfo
,
&
timer_tinfo
);
LOG_A
(
ENB_SS
,
"VT_TIMER DRB task received MSG for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_SS
_DRB_ACP
,
"VT_TIMER DRB task received MSG for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
if
(
msg_queued
)
if
(
msg_queued
)
{
{
msg_queued
=
vt_timer_setup
(
timer_tinfo
,
TASK_RRC_ENB
,
instance_g
,
message_p
);
msg_queued
=
vt_timer_setup
(
timer_tinfo
,
TASK_RRC_ENB
,
instance_g
,
message_p
);
LOG_A
(
ENB_SS
,
"DRB_PDU Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d"
,
LOG_A
(
ENB_SS
_DRB_ACP
,
"DRB_PDU Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d"
,
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
}
}
}
}
...
@@ -190,9 +190,9 @@ static void ss_task_handle_drb_pdu_req(struct DRB_COMMON_REQ *req,int cell_index
...
@@ -190,9 +190,9 @@ static void ss_task_handle_drb_pdu_req(struct DRB_COMMON_REQ *req,int cell_index
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
instance_g
,
message_p
);
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
instance_g
,
message_p
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_A
(
ENB_
AP
P
,
"[SS_DRB] Error in itti_send_msg_to_task"
);
LOG_A
(
ENB_
SS_DRB_AC
P
,
"[SS_DRB] Error in itti_send_msg_to_task"
);
}
}
LOG_A
(
ENB_
AP
P
,
"Send res: %d"
,
send_res
);
LOG_A
(
ENB_
SS_DRB_AC
P
,
"Send res: %d"
,
send_res
);
}
}
}
}
}
}
...
@@ -203,7 +203,7 @@ ss_eNB_read_from_drb_socket(acpCtx_t ctx){
...
@@ -203,7 +203,7 @@ ss_eNB_read_from_drb_socket(acpCtx_t ctx){
size_t
msgSize
=
size
;
//2
size_t
msgSize
=
size
;
//2
int
cell_index
=
0
;
int
cell_index
=
0
;
LOG_A
(
ENB_SS
,
"Entry in fxn:%s
\n
"
,
__FUNCTION__
);
LOG_A
(
ENB_SS
_DRB_ACP
,
"Entry in fxn:%s
\n
"
,
__FUNCTION__
);
while
(
1
)
while
(
1
)
{
{
int
userId
=
acpRecvMsg
(
ctx
,
&
msgSize
,
buffer
);
int
userId
=
acpRecvMsg
(
ctx
,
&
msgSize
,
buffer
);
...
@@ -232,7 +232,7 @@ ss_eNB_read_from_drb_socket(acpCtx_t ctx){
...
@@ -232,7 +232,7 @@ ss_eNB_read_from_drb_socket(acpCtx_t ctx){
}
}
else
else
{
{
LOG_A
(
ENB_
AP
P
,
"[SS_DRB] Invalid userId: %d
\n
"
,
userId
);
LOG_A
(
ENB_
SS_DRB_AC
P
,
"[SS_DRB] Invalid userId: %d
\n
"
,
userId
);
break
;
break
;
}
}
}
}
...
@@ -245,40 +245,40 @@ ss_eNB_read_from_drb_socket(acpCtx_t ctx){
...
@@ -245,40 +245,40 @@ ss_eNB_read_from_drb_socket(acpCtx_t ctx){
else
if
(
MSG_DrbProcessFromSS_userId
==
userId
)
else
if
(
MSG_DrbProcessFromSS_userId
==
userId
)
{
{
struct
DRB_COMMON_REQ
*
req
=
NULL
;
struct
DRB_COMMON_REQ
*
req
=
NULL
;
LOG_A
(
ENB_
AP
P
,
"[SS_DRB] DRB_COMMON_REQ Received
\n
"
);
LOG_A
(
ENB_
SS_DRB_AC
P
,
"[SS_DRB] DRB_COMMON_REQ Received
\n
"
);
if
(
acpDrbProcessFromSSDecSrv
(
ctx
,
buffer
,
msgSize
,
&
req
)
!=
0
)
if
(
acpDrbProcessFromSSDecSrv
(
ctx
,
buffer
,
msgSize
,
&
req
)
!=
0
)
{
{
LOG_A
(
ENB_
AP
P
,
"[SS_DRB][DRB_COMMON_REQ] acpDrbProcessFromSSDecSrv Failed
\n
"
);
LOG_A
(
ENB_
SS_DRB_AC
P
,
"[SS_DRB][DRB_COMMON_REQ] acpDrbProcessFromSSDecSrv Failed
\n
"
);
break
;
break
;
}
}
if
(
req
->
Common
.
CellId
){
if
(
req
->
Common
.
CellId
){
cell_index
=
get_cell_index
(
req
->
Common
.
CellId
,
SS_context
.
SSCell_list
);
cell_index
=
get_cell_index
(
req
->
Common
.
CellId
,
SS_context
.
SSCell_list
);
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
=
req
->
Common
.
CellId
;
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
=
req
->
Common
.
CellId
;
LOG_A
(
ENB_SS
,
"[SS_DRB] cell_index: %d eutra_cellId: %d PhysicalCellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
LOG_A
(
ENB_SS
_DRB_ACP
,
"[SS_DRB] cell_index: %d eutra_cellId: %d PhysicalCellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
}
}
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
>=
SS_STATE_CELL_ACTIVE
)
{
{
LOG_A
(
ENB_
AP
P
,
"[SS_DRB][DRB_COMMON_REQ] DRB_COMMON_REQ Received in CELL_ACTIVE
\n
"
);
LOG_A
(
ENB_
SS_DRB_AC
P
,
"[SS_DRB][DRB_COMMON_REQ] DRB_COMMON_REQ Received in CELL_ACTIVE
\n
"
);
ss_task_handle_drb_pdu_req
(
req
,
cell_index
);
ss_task_handle_drb_pdu_req
(
req
,
cell_index
);
}
}
else
else
{
{
LOG_W
(
ENB_
AP
P
,
"[SS_DRB][DRB_COMMON_REQ] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
LOG_W
(
ENB_
SS_DRB_AC
P
,
"[SS_DRB][DRB_COMMON_REQ] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
}
}
acpDrbProcessFromSSFreeSrv
(
req
);
acpDrbProcessFromSSFreeSrv
(
req
);
LOG_A
(
ENB_SS
,
"Exit from fxn:%s at line:%d
\n
"
,
__FUNCTION__
,
__LINE__
);
LOG_A
(
ENB_SS
_DRB_ACP
,
"Exit from fxn:%s at line:%d
\n
"
,
__FUNCTION__
,
__LINE__
);
return
;
return
;
}
}
else
if
(
MSG_DrbProcessToSS_userId
==
userId
)
else
if
(
MSG_DrbProcessToSS_userId
==
userId
)
{
{
LOG_A
(
ENB_
AP
P
,
"[SS_DRB] DRB_COMMON_IND Received; ignoring
\n
"
);
LOG_A
(
ENB_
SS_DRB_AC
P
,
"[SS_DRB] DRB_COMMON_IND Received; ignoring
\n
"
);
break
;
break
;
}
}
}
}
LOG_A
(
ENB_SS
,
"Exit from fxn:%s at line:%d
\n
"
,
__FUNCTION__
,
__LINE__
);
LOG_A
(
ENB_SS
_DRB_ACP
,
"Exit from fxn:%s at line:%d
\n
"
,
__FUNCTION__
,
__LINE__
);
}
}
void
*
ss_eNB_drb_process_itti_msg
(
void
*
notUsed
)
void
*
ss_eNB_drb_process_itti_msg
(
void
*
notUsed
)
...
@@ -299,17 +299,17 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
...
@@ -299,17 +299,17 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
int
cell_index
=
0
;
int
cell_index
=
0
;
if
(
received_msg
->
ittiMsg
.
ss_drb_pdu_ind
.
physCellId
){
if
(
received_msg
->
ittiMsg
.
ss_drb_pdu_ind
.
physCellId
){
cell_index
=
get_cell_index_pci
(
received_msg
->
ittiMsg
.
ss_drb_pdu_ind
.
physCellId
,
SS_context
.
SSCell_list
);
cell_index
=
get_cell_index_pci
(
received_msg
->
ittiMsg
.
ss_drb_pdu_ind
.
physCellId
,
SS_context
.
SSCell_list
);
LOG_A
(
ENB_SS
,
"[SS_DRB] cell_index in SS_DRB_PDU_IND: %d PhysicalCellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
LOG_A
(
ENB_SS
_DRB
,
"[SS_DRB] cell_index in SS_DRB_PDU_IND: %d PhysicalCellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
}
}
task_id_t
origin_task
=
ITTI_MSG_ORIGIN_ID
(
received_msg
);
task_id_t
origin_task
=
ITTI_MSG_ORIGIN_ID
(
received_msg
);
if
(
origin_task
==
TASK_SS_PORTMAN
)
if
(
origin_task
==
TASK_SS_PORTMAN
)
{
{
LOG_D
(
ENB_
APP
,
"[SS_DRB] DUMMY WAKEUP recevied from PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
LOG_D
(
ENB_
SS_DRB
,
"[SS_DRB] DUMMY WAKEUP recevied from PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
}
}
else
else
{
{
LOG_A
(
ENB_
APP
,
"[SS_DRB] Received SS_DRB_PDU_IND from RRC PDCP
\n
"
);
LOG_A
(
ENB_
SS_DRB
,
"[SS_DRB] Received SS_DRB_PDU_IND from RRC PDCP
\n
"
);
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
>=
SS_STATE_CELL_ACTIVE
)
{
{
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
...
@@ -317,7 +317,7 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
...
@@ -317,7 +317,7 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
}
}
else
else
{
{
LOG_A
(
ENB_
APP
,
"ERROR [SS_DRB][SS_DRB_PDU_IND] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
LOG_A
(
ENB_
SS_DRB
,
"ERROR [SS_DRB][SS_DRB_PDU_IND] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
}
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
...
@@ -326,12 +326,12 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
...
@@ -326,12 +326,12 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
break
;
break
;
case
TERMINATE_MESSAGE
:
case
TERMINATE_MESSAGE
:
LOG_A
(
ENB_
APP
,
"[SS_DRB] Received TERMINATE_MESSAGE
\n
"
);
LOG_A
(
ENB_
SS_DRB
,
"[SS_DRB] Received TERMINATE_MESSAGE
\n
"
);
itti_exit_task
();
itti_exit_task
();
break
;
break
;
default:
default:
LOG_A
(
ENB_
APP
,
"[SS_DRB] Received unhandled message %d:%s
\n
"
,
LOG_A
(
ENB_
SS_DRB
,
"[SS_DRB] Received unhandled message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
break
;
break
;
}
}
...
@@ -348,7 +348,7 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
...
@@ -348,7 +348,7 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
void
ss_eNB_drb_init
(
void
)
void
ss_eNB_drb_init
(
void
)
{
{
IpAddress_t
ipaddr
;
IpAddress_t
ipaddr
;
LOG_A
(
ENB_
AP
P
,
"[SS_DRB] Starting System Simulator DRB Thread
\n
"
);
LOG_A
(
ENB_
SS_DRB_AC
P
,
"[SS_DRB] Starting System Simulator DRB Thread
\n
"
);
const
char
*
hostIp
;
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
...
@@ -370,11 +370,11 @@ void ss_eNB_drb_init(void)
...
@@ -370,11 +370,11 @@ void ss_eNB_drb_init(void)
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_drb_g
);
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_drb_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_A
(
ENB_
AP
P
,
"[SS_DRB] Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
ENB_
SS_DRB_AC
P
,
"[SS_DRB] Connection failure err=%d
\n
"
,
ret
);
return
;
return
;
}
}
int
fd1
=
acpGetSocketFd
(
ctx_drb_g
);
int
fd1
=
acpGetSocketFd
(
ctx_drb_g
);
LOG_A
(
ENB_
AP
P
,
"[SS_DRB] Connection performed : %d
\n
"
,
fd1
);
LOG_A
(
ENB_
SS_DRB_AC
P
,
"[SS_DRB] Connection performed : %d
\n
"
,
fd1
);
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
assert
(
buffer
);
assert
(
buffer
);
...
...
openair3/SS/ss_eNB_port_man_task.c
View file @
7e8fb445
...
@@ -52,8 +52,9 @@
...
@@ -52,8 +52,9 @@
#include "ss_eNB_context.h"
#include "ss_eNB_context.h"
#include "acpSys.h"
#include "acpSys.h"
extern
int
prc
;
extern
RAN_CONTEXT_t
RC
;
extern
RAN_CONTEXT_t
RC
;
extern
int
cell_index
;
acpCtx_t
ctx_g
=
NULL
;
acpCtx_t
ctx_g
=
NULL
;
int
cell_index_pm
=
0
;
int
cell_index_pm
=
0
;
...
@@ -74,14 +75,14 @@ extern SSConfigContext_t SS_context;
...
@@ -74,14 +75,14 @@ extern SSConfigContext_t SS_context;
*/
*/
static
void
ss_dumpReqMsg
(
struct
SYSTEM_CTRL_REQ
*
msg
)
static
void
ss_dumpReqMsg
(
struct
SYSTEM_CTRL_REQ
*
msg
)
{
{
LOG_A
(
ENB_SS
,
"SysProcess: received from the TTCN
\n
"
);
LOG_A
(
ENB_SS
_PORTMAN
,
"SysProcess: received from the TTCN
\n
"
);
LOG_A
(
ENB_SS
,
"
\t
Common:
\n
"
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
\t
Common:
\n
"
);
LOG_A
(
ENB_SS
,
"
\t\t
CellId=%d
\n
"
,
msg
->
Common
.
CellId
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
\t\t
CellId=%d
\n
"
,
msg
->
Common
.
CellId
);
LOG_A
(
ENB_SS
,
"
\t\t
RoutingInfo=%d
\n
"
,
msg
->
Common
.
RoutingInfo
.
d
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
\t\t
RoutingInfo=%d
\n
"
,
msg
->
Common
.
RoutingInfo
.
d
);
LOG_A
(
ENB_SS
,
"
\t\t
TimingInfo=%d
\n
"
,
msg
->
Common
.
TimingInfo
.
d
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
\t\t
TimingInfo=%d
\n
"
,
msg
->
Common
.
TimingInfo
.
d
);
LOG_A
(
ENB_SS
,
"
\t\t
CnfFlag=%d
\n
"
,
msg
->
Common
.
ControlInfo
.
CnfFlag
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
\t\t
CnfFlag=%d
\n
"
,
msg
->
Common
.
ControlInfo
.
CnfFlag
);
LOG_A
(
ENB_SS
,
"
\t\t
FollowOnFlag=%d
\n
"
,
msg
->
Common
.
ControlInfo
.
FollowOnFlag
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
\t\t
FollowOnFlag=%d
\n
"
,
msg
->
Common
.
ControlInfo
.
FollowOnFlag
);
LOG_A
(
ENB_SS
,
"
\t
Request=%d
\n
"
,
msg
->
Request
.
d
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
\t
Request=%d
\n
"
,
msg
->
Request
.
d
);
}
}
/*
/*
...
@@ -112,7 +113,7 @@ void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf)
...
@@ -112,7 +113,7 @@ void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf)
cnf
.
Common
.
Result
.
d
=
recvCnf
.
Common
.
Result
.
d
;
cnf
.
Common
.
Result
.
d
=
recvCnf
.
Common
.
Result
.
d
;
cnf
.
Common
.
Result
.
v
.
Success
=
recvCnf
.
Common
.
Result
.
v
.
Success
;
cnf
.
Common
.
Result
.
v
.
Success
=
recvCnf
.
Common
.
Result
.
v
.
Success
;
cnf
.
Confirm
.
d
=
recvCnf
.
Confirm
.
d
;
cnf
.
Confirm
.
d
=
recvCnf
.
Confirm
.
d
;
LOG_A
(
ENB_SS
,
"[SS-PORTMAN]
Attn CNF received cellId %d result %d type %d
\n
"
,
LOG_A
(
ENB_SS
_PORTMAN
,
"
Attn CNF received cellId %d result %d type %d
\n
"
,
cnf
.
Common
.
CellId
,
cnf
.
Common
.
Result
.
d
,
recvCnf
.
Confirm
.
d
);
cnf
.
Common
.
CellId
,
cnf
.
Common
.
Result
.
d
,
recvCnf
.
Confirm
.
d
);
switch
(
recvCnf
.
Confirm
.
d
)
switch
(
recvCnf
.
Confirm
.
d
)
{
{
...
@@ -148,7 +149,7 @@ void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf)
...
@@ -148,7 +149,7 @@ void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf)
break
;
break
;
case
SystemConfirm_Type_L1MacIndCtrl
:
case
SystemConfirm_Type_L1MacIndCtrl
:
LOG_A
(
ENB_SS
,
"[SS-PORTMAN]
SystemConfirm_Type_L1MacIndCtrl
\n
"
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
SystemConfirm_Type_L1MacIndCtrl
\n
"
);
cnf
.
Confirm
.
v
.
L1MacIndCtrl
=
true
;
cnf
.
Confirm
.
v
.
L1MacIndCtrl
=
true
;
break
;
break
;
case
SystemConfirm_Type_Sps
:
case
SystemConfirm_Type_Sps
:
...
@@ -164,7 +165,7 @@ void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf)
...
@@ -164,7 +165,7 @@ void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf)
case
SystemConfirm_Type_OCNG_Config
:
case
SystemConfirm_Type_OCNG_Config
:
case
SystemConfirm_Type_DirectIndicationInfo
:
case
SystemConfirm_Type_DirectIndicationInfo
:
default:
default:
LOG_A
(
ENB_SS
,
"[SYS] Error not handled CNF TYPE to [SS-PORTMAN]
%d
\n
"
,
recvCnf
.
Confirm
.
d
);
LOG_A
(
ENB_SS
_PORTMAN
,
"[SYS] Error not handled CNF TYPE to
%d
\n
"
,
recvCnf
.
Confirm
.
d
);
}
}
/* Encode message
/* Encode message
...
@@ -179,14 +180,14 @@ void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf)
...
@@ -179,14 +180,14 @@ void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf)
status
=
acpSendMsg
(
ctx_g
,
msgSize
,
buffer
);
status
=
acpSendMsg
(
ctx_g
,
msgSize
,
buffer
);
if
(
status
!=
0
)
if
(
status
!=
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS-PORTMAN]
acpSendMsg failed. Error : %d on fd: %d
\n
"
,
LOG_A
(
ENB_SS
_PORTMAN
,
"
acpSendMsg failed. Error : %d on fd: %d
\n
"
,
status
,
acpGetSocketFd
(
ctx_g
));
status
,
acpGetSocketFd
(
ctx_g
));
acpFree
(
buffer
);
acpFree
(
buffer
);
return
;
return
;
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SS-PORTMAN]
acpSendMsg Success
\n
"
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
acpSendMsg Success
\n
"
);
}
}
// Free allocated buffer
// Free allocated buffer
acpFree
(
buffer
);
acpFree
(
buffer
);
...
@@ -261,14 +262,14 @@ void ss_port_man_send_data(
...
@@ -261,14 +262,14 @@ void ss_port_man_send_data(
status
=
acpSendMsg
(
ctx_g
,
msgSize
,
buffer
);
status
=
acpSendMsg
(
ctx_g
,
msgSize
,
buffer
);
if
(
status
!=
0
)
if
(
status
!=
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS-PORTMAN]
acpSendMsg failed. Error : %d on fd: %d
\n
"
,
LOG_A
(
ENB_SS
_PORTMAN
,
"
acpSendMsg failed. Error : %d on fd: %d
\n
"
,
status
,
acpGetSocketFd
(
ctx_g
));
status
,
acpGetSocketFd
(
ctx_g
));
acpFree
(
buffer
);
acpFree
(
buffer
);
return
;
return
;
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SS-PORTMAN]
acpSendMsg Success
\n
"
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
acpSendMsg Success
\n
"
);
}
}
// Free allocated buffer
// Free allocated buffer
acpFree
(
buffer
);
acpFree
(
buffer
);
...
@@ -286,7 +287,7 @@ void ss_port_man_send_data(
...
@@ -286,7 +287,7 @@ void ss_port_man_send_data(
void
ss_eNB_port_man_init
(
void
)
void
ss_eNB_port_man_init
(
void
)
{
{
IpAddress_t
ipaddr
;
IpAddress_t
ipaddr
;
LOG_A
(
ENB_SS
,
"[SS-PORTMAN]
Starting System Simulator Manager
\n
"
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
Starting System Simulator Manager
\n
"
);
const
char
*
hostIp
;
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
...
@@ -311,11 +312,11 @@ void ss_eNB_port_man_init(void)
...
@@ -311,11 +312,11 @@ void ss_eNB_port_man_init(void)
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_g
);
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS-PORTMAN]
Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
Connection failure err=%d
\n
"
,
ret
);
return
;
return
;
}
}
int
fd1
=
acpGetSocketFd
(
ctx_g
);
int
fd1
=
acpGetSocketFd
(
ctx_g
);
LOG_A
(
ENB_SS
,
"[SS-PORTMAN]
Connection performed : %d
\n
"
,
fd1
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
Connection performed : %d
\n
"
,
fd1
);
//itti_subscribe_event_fd(TASK_SS_PORTMAN, fd1);
//itti_subscribe_event_fd(TASK_SS_PORTMAN, fd1);
...
@@ -338,7 +339,7 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
...
@@ -338,7 +339,7 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
size_t
msgSize
=
size
;
//2
size_t
msgSize
=
size
;
//2
unsigned
char
*
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
unsigned
char
*
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
assert
(
buffer
);
assert
(
buffer
);
LOG_D
(
ENB_SS
,
"Entry from fxn:%s
\n
"
,
__FUNCTION__
);
LOG_D
(
ENB_SS
_PORTMAN
,
"Entry from fxn:%s
\n
"
,
__FUNCTION__
);
int
userId
=
acpRecvMsg
(
ctx
,
&
msgSize
,
buffer
);
int
userId
=
acpRecvMsg
(
ctx
,
&
msgSize
,
buffer
);
// Error handling
// Error handling
...
@@ -349,16 +350,17 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
...
@@ -349,16 +350,17 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
// Message not mapped to user id,
// Message not mapped to user id,
// this error should not appear on server side for the messages
// this error should not appear on server side for the messages
// received from clients
// received from clients
LOG_E
(
GNB_APP
,
"
[SS-PORTMAN]
Error: Message not mapped to user id
\n
"
);
LOG_E
(
GNB_APP
,
"Error: Message not mapped to user id
\n
"
);
}
}
else
if
(
userId
==
-
ACP_ERR_SIDL_FAILURE
)
else
if
(
userId
==
-
ACP_ERR_SIDL_FAILURE
)
{
{
// Server returned service error,
// Server returned service error,
// this error should not appear on server side for the messages
// this error should not appear on server side for the messages
// received from clients
// received from clients
LOG_E
(
GNB_APP
,
"
[SS-PORTMAN]
Error: Server returned service error
\n
"
);
LOG_E
(
GNB_APP
,
"Error: Server returned service error
\n
"
);
SidlStatus
sidlStatus
=
-
1
;
SidlStatus
sidlStatus
=
-
1
;
acpGetMsgSidlStatus
(
msgSize
,
buffer
,
&
sidlStatus
);
acpGetMsgSidlStatus
(
msgSize
,
buffer
,
&
sidlStatus
);
acpFree
(
buffer
);
}
}
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
else
if
(
userId
==
-
ACP_PEER_DISCONNECTED
){
LOG_E
(
GNB_APP
,
"[SS_SRB] Error: Peer ordered shutdown
\n
"
);
LOG_E
(
GNB_APP
,
"[SS_SRB] Error: Peer ordered shutdown
\n
"
);
...
@@ -377,7 +379,7 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
...
@@ -377,7 +379,7 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
//Send Dummy Wake up ITTI message to SRB task.
//Send Dummy Wake up ITTI message to SRB task.
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
SS_context
.
SSCell_list
[
cell_index_pm
].
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
SS_context
.
SSCell_list
[
cell_index_pm
].
State
>=
SS_STATE_CELL_ACTIVE
)
{
{
LOG_A
(
ENB_SS
,
"[SS-PORTMAN]
Sending Wake up signal/SS_RRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB task
\n
"
,
SS_RRC_PDU_IND
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
Sending Wake up signal/SS_RRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB task
\n
"
,
SS_RRC_PDU_IND
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SS_PORTMAN
,
0
,
SS_RRC_PDU_IND
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SS_PORTMAN
,
0
,
SS_RRC_PDU_IND
);
if
(
message_p
)
if
(
message_p
)
{
{
...
@@ -391,16 +393,19 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
...
@@ -391,16 +393,19 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
int
send_res
=
itti_send_msg_to_task
(
TASK_SS_SRB
,
0
,
message_p
);
int
send_res
=
itti_send_msg_to_task
(
TASK_SS_SRB
,
0
,
message_p
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_E
(
ENB_SS
,
"Error in sending Wake up signal /SS_RRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB
\n
"
,
SS_RRC_PDU_IND
);
LOG_E
(
ENB_SS
_PORTMAN
,
"Error in sending Wake up signal /SS_RRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB
\n
"
,
SS_RRC_PDU_IND
);
}
}
}
}
}
}
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SS-PORTMAN]
received msg %d from the client.
\n
"
,
userId
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
received msg %d from the client.
\n
"
,
userId
);
if
(
acpSysProcessDecSrv
(
ctx
,
buffer
,
msgSize
,
&
req
)
!=
0
)
if
(
acpSysProcessDecSrv
(
ctx
,
buffer
,
msgSize
,
&
req
)
!=
0
)
{
acpFree
(
buffer
);
return
;
return
;
}
ss_dumpReqMsg
(
req
);
ss_dumpReqMsg
(
req
);
...
@@ -410,10 +415,10 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
...
@@ -410,10 +415,10 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
struct
SYSTEM_CTRL_REQ
*
sys_req
=
(
struct
SYSTEM_CTRL_REQ
*
)
req
;
struct
SYSTEM_CTRL_REQ
*
sys_req
=
(
struct
SYSTEM_CTRL_REQ
*
)
req
;
if
(
sys_req
->
Request
.
d
==
SystemRequest_Type_EnquireTiming
)
if
(
sys_req
->
Request
.
d
==
SystemRequest_Type_EnquireTiming
)
{
{
LOG_I
(
ENB_SS
,
"[SS-PORTMAN]
Received EnquireTiming
\n
"
);
LOG_I
(
ENB_SS
_PORTMAN
,
"
Received EnquireTiming
\n
"
);
ret_Val
=
ss_eNB_port_man_handle_enquiryTiming
(
sys_req
);
ret_Val
=
ss_eNB_port_man_handle_enquiryTiming
(
sys_req
);
if
(
ret_Val
==
false
)
if
(
ret_Val
==
false
)
LOG_E
(
ENB_SS
,
"Error Sending EnquiryTiming Respone to TTCN
\n
"
);
LOG_E
(
ENB_SS
_PORTMAN
,
"Error Sending EnquiryTiming Respone to TTCN
\n
"
);
}
}
else
else
{
{
...
@@ -422,13 +427,17 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
...
@@ -422,13 +427,17 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
{
{
SS_SYS_PORT_MSG_IND
(
message_p
).
req
=
req
;
SS_SYS_PORT_MSG_IND
(
message_p
).
req
=
req
;
SS_SYS_PORT_MSG_IND
(
message_p
).
userId
=
userId
;
SS_SYS_PORT_MSG_IND
(
message_p
).
userId
=
userId
;
if
(
SS_SYS_PORT_MSG_IND
(
message_p
).
req
)
itti_send_msg_to_task
(
TASK_SYS
,
0
,
message_p
);
itti_send_msg_to_task
(
TASK_SYS
,
0
,
message_p
);
}
}
}
}
sys_req
=
NULL
;
}
}
}
}
acpSysProcessFreeSrv
(
req
);
acpSysProcessFreeSrv
(
req
);
LOG_D
(
ENB_SS
,
"Exit from fxn:%s
\n
"
,
__FUNCTION__
);
LOG_D
(
ENB_SS_PORTMAN
,
"Exit from fxn:%s
\n
"
,
__FUNCTION__
);
acpFree
(
buffer
);
return
;
return
;
}
}
...
@@ -445,20 +454,17 @@ void *ss_port_man_process_itti_msg(void *notUsed)
...
@@ -445,20 +454,17 @@ void *ss_port_man_process_itti_msg(void *notUsed)
{
{
MessageDef
*
received_msg
=
NULL
;
MessageDef
*
received_msg
=
NULL
;
int
result
;
int
result
;
LOG_D
(
ENB_SS
,
"Entry in fxn:%s
\n
"
,
__FUNCTION__
);
LOG_D
(
ENB_SS
_PORTMAN
,
"Entry in fxn:%s
\n
"
,
__FUNCTION__
);
itti_poll_msg
(
TASK_SS_PORTMAN
,
&
received_msg
);
itti_poll_msg
(
TASK_SS_PORTMAN
,
&
received_msg
);
/* Check if there is a packet to handle */
if
(
received_msg
!=
NULL
)
if
(
received_msg
!=
NULL
)
{
{
LOG_A
(
ENB_SS_PORTMAN
,
"Received a message id : %d
\n
"
,
LOG_A
(
ENB_SS
,
"[SS-PORTMAN] Received a message id : %d
\n
"
,
ITTI_MSG_ID
(
received_msg
));
ITTI_MSG_ID
(
received_msg
));
switch
(
ITTI_MSG_ID
(
received_msg
))
switch
(
ITTI_MSG_ID
(
received_msg
))
{
{
case
SS_SET_TIM_INFO
:
case
SS_SET_TIM_INFO
:
{
{
LOG_A
(
ENB_SS
,
"Received timing info
\n
"
);
LOG_A
(
ENB_SS
_PORTMAN
,
"Received timing info
\n
"
);
ss_port_man_send_data
(
0
,
0
,
&
received_msg
->
ittiMsg
.
ss_set_timinfo
);
ss_port_man_send_data
(
0
,
0
,
&
received_msg
->
ittiMsg
.
ss_set_timinfo
);
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
}
}
...
@@ -466,7 +472,7 @@ void *ss_port_man_process_itti_msg(void *notUsed)
...
@@ -466,7 +472,7 @@ void *ss_port_man_process_itti_msg(void *notUsed)
case
SS_SYS_PORT_MSG_CNF
:
case
SS_SYS_PORT_MSG_CNF
:
{
{
LOG_A
(
ENB_SS
,
"Received SS_SYS_PORT_MSG_CNF
\n
"
);
LOG_A
(
ENB_SS
_PORTMAN
,
"Received SS_SYS_PORT_MSG_CNF
\n
"
);
ss_port_man_send_cnf
(
*
(
SS_SYS_PORT_MSG_CNF
(
received_msg
).
cnf
));
ss_port_man_send_cnf
(
*
(
SS_SYS_PORT_MSG_CNF
(
received_msg
).
cnf
));
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
}
}
...
@@ -477,8 +483,9 @@ void *ss_port_man_process_itti_msg(void *notUsed)
...
@@ -477,8 +483,9 @@ void *ss_port_man_process_itti_msg(void *notUsed)
break
;
break
;
default:
default:
LOG_A
(
ENB_SS
,
"Received unhandled message %d:%s
\n
"
,
LOG_A
(
ENB_SS
_PORTMAN
,
"Received unhandled message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
break
;
break
;
}
}
...
@@ -488,7 +495,7 @@ void *ss_port_man_process_itti_msg(void *notUsed)
...
@@ -488,7 +495,7 @@ void *ss_port_man_process_itti_msg(void *notUsed)
}
}
ss_eNB_read_from_socket
(
ctx_g
);
ss_eNB_read_from_socket
(
ctx_g
);
LOG_D
(
ENB_SS
,
"Exit from fxn:%s
\n
"
,
__FUNCTION__
);
LOG_D
(
ENB_SS
_PORTMAN
,
"Exit from fxn:%s
\n
"
,
__FUNCTION__
);
return
NULL
;
return
NULL
;
}
}
...
@@ -505,7 +512,6 @@ void *ss_port_man_process_itti_msg(void *notUsed)
...
@@ -505,7 +512,6 @@ void *ss_port_man_process_itti_msg(void *notUsed)
void
*
ss_eNB_port_man_task
(
void
*
arg
)
void
*
ss_eNB_port_man_task
(
void
*
arg
)
{
{
ss_eNB_port_man_init
();
ss_eNB_port_man_init
();
while
(
1
)
while
(
1
)
{
{
/* Now handle notifications for other sockets */
/* Now handle notifications for other sockets */
...
@@ -558,16 +564,15 @@ bool ss_eNB_port_man_handle_enquiryTiming(struct SYSTEM_CTRL_REQ *sys_req)
...
@@ -558,16 +564,15 @@ bool ss_eNB_port_man_handle_enquiryTiming(struct SYSTEM_CTRL_REQ *sys_req)
status
=
acpSendMsg
(
ctx_g
,
msgSize
,
buffer
);
status
=
acpSendMsg
(
ctx_g
,
msgSize
,
buffer
);
if
(
status
!=
0
)
if
(
status
!=
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS-PORTMAN]
acpSendMsg failed for EnquiryTiming.
\n
"
);
LOG_A
(
ENB_SS
_PORTMAN
,
"
acpSendMsg failed for EnquiryTiming.
\n
"
);
acpFree
(
buffer
);
acpFree
(
buffer
);
return
false
;
return
false
;
}
}
LOG_A
(
ENB_SS
,
"[SS-PORTMAN]
enquiryTiming CNF sent successfully for SFN:%d SF:%d
\n
"
,
LOG_A
(
ENB_SS
_PORTMAN
,
"
enquiryTiming CNF sent successfully for SFN:%d SF:%d
\n
"
,
cnf
.
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
v
.
Number
,
cnf
.
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
v
.
Number
,
cnf
.
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
);
cnf
.
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
);
acpFree
(
buffer
);
return
true
;
return
true
;
}
}
openair3/SS/ss_eNB_srb_task.c
View file @
7e8fb445
...
@@ -100,7 +100,7 @@ static void ss_send_srb_data(ss_rrc_pdu_ind_t *pdu_ind,int cell_index)
...
@@ -100,7 +100,7 @@ static void ss_send_srb_data(ss_rrc_pdu_ind_t *pdu_ind,int cell_index)
LTE_UL_DCCH_Message_t
*
ul_dcch_msg
=
NULL
;
LTE_UL_DCCH_Message_t
*
ul_dcch_msg
=
NULL
;
LTE_UL_CCCH_Message_t
*
ul_ccch_msg
=
NULL
;
LTE_UL_CCCH_Message_t
*
ul_ccch_msg
=
NULL
;
LOG_A
(
ENB_SS
,
"[SS_SRB] Reported rrc sdu_size:%d
\t
srb_id %d rnti %d
\n
"
,
pdu_ind
->
sdu_size
,
pdu_ind
->
srb_id
,
pdu_ind
->
rnti
);
LOG_A
(
ENB_SS
_SRB
,
"[SS_SRB] Reported rrc sdu_size:%d
\t
srb_id %d rnti %d
\n
"
,
pdu_ind
->
sdu_size
,
pdu_ind
->
srb_id
,
pdu_ind
->
rnti
);
DevAssert
(
pdu_ind
!=
NULL
);
DevAssert
(
pdu_ind
!=
NULL
);
DevAssert
(
pdu_ind
->
sdu_size
>=
0
);
DevAssert
(
pdu_ind
->
sdu_size
>=
0
);
DevAssert
(
pdu_ind
->
srb_id
>=
0
);
DevAssert
(
pdu_ind
->
srb_id
>=
0
);
...
@@ -179,22 +179,22 @@ static void ss_send_srb_data(ss_rrc_pdu_ind_t *pdu_ind,int cell_index)
...
@@ -179,22 +179,22 @@ static void ss_send_srb_data(ss_rrc_pdu_ind_t *pdu_ind,int cell_index)
*/
*/
if
(
acpSysSrbProcessToSSEncSrv
(
ctx_srb_g
,
buffer
,
&
msgSize
,
&
ind
)
!=
0
)
if
(
acpSysSrbProcessToSSEncSrv
(
ctx_srb_g
,
buffer
,
&
msgSize
,
&
ind
)
!=
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_IND] acpSysSrbProcessToSSEncSrv Failure
\n
"
);
LOG_A
(
ENB_SS
_SRB
,
"[SS_SRB][EUTRA_RRC_PDU_IND] acpSysSrbProcessToSSEncSrv Failure
\n
"
);
return
;
return
;
}
}
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_IND] Buffer msgSize=%d (!!2) to EUTRACell %d"
,
(
int
)
msgSize
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
);
LOG_A
(
ENB_SS
_SRB
,
"[SS_SRB][EUTRA_RRC_PDU_IND] Buffer msgSize=%d (!!2) to EUTRACell %d"
,
(
int
)
msgSize
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
);
/* Send message
/* Send message
*/
*/
status
=
acpSendMsg
(
ctx_srb_g
,
msgSize
,
buffer
);
status
=
acpSendMsg
(
ctx_srb_g
,
msgSize
,
buffer
);
if
(
status
!=
0
)
if
(
status
!=
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_IND] acpSendMsg failed. Error : %d on fd: %d
\n
"
,
status
,
acpGetSocketFd
(
ctx_srb_g
));
LOG_A
(
ENB_SS
_SRB
,
"[SS_SRB][EUTRA_RRC_PDU_IND] acpSendMsg failed. Error : %d on fd: %d
\n
"
,
status
,
acpGetSocketFd
(
ctx_srb_g
));
return
;
return
;
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_IND] acpSendMsg Success
\n
"
);
LOG_A
(
ENB_SS
_SRB
,
"[SS_SRB][EUTRA_RRC_PDU_IND] acpSendMsg Success
\n
"
);
}
}
}
}
...
@@ -251,7 +251,7 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
...
@@ -251,7 +251,7 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
LOG_P
(
OAILOG_DEBUG
,
"DL_DCCH_Message"
,
lttng_sdu
,
SS_RRC_PDU_REQ
(
message_p
).
sdu_size
);
LOG_P
(
OAILOG_DEBUG
,
"DL_DCCH_Message"
,
lttng_sdu
,
SS_RRC_PDU_REQ
(
message_p
).
sdu_size
);
}
}
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_REQ] sending to TASK_RRC_ENB: {srb: %d, ch: %s, qty: %d rnti %d}
\n
"
,
LOG_A
(
ENB_SS
_SRB_ACP
,
"[SS_SRB][EUTRA_RRC_PDU_REQ] sending to TASK_RRC_ENB: {srb: %d, ch: %s, qty: %d rnti %d}
\n
"
,
SS_RRC_PDU_REQ
(
message_p
).
srb_id
,
SS_RRC_PDU_REQ
(
message_p
).
srb_id
,
req
->
RrcPdu
.
d
==
RRC_MSG_Request_Type_Ccch
?
"CCCH"
:
"DCCH"
,
SS_RRC_PDU_REQ
(
message_p
).
sdu_size
,
rnti_g
);
req
->
RrcPdu
.
d
==
RRC_MSG_Request_Type_Ccch
?
"CCCH"
:
"DCCH"
,
SS_RRC_PDU_REQ
(
message_p
).
sdu_size
,
rnti_g
);
...
@@ -266,8 +266,8 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
...
@@ -266,8 +266,8 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
tinfo
.
sf
=
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
;
tinfo
.
sf
=
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
;
timer_tinfo
=
tinfo
;
timer_tinfo
=
tinfo
;
msg_queued
=
msg_can_be_queued
(
tinfo
,
&
timer_tinfo
);
msg_queued
=
msg_can_be_queued
(
tinfo
,
&
timer_tinfo
);
LOG_I
(
ENB_SS
,
"msg_queued:%d
\n
"
,
msg_queued
);
LOG_I
(
ENB_SS
_SRB_ACP
,
"msg_queued:%d
\n
"
,
msg_queued
);
LOG_A
(
ENB_SS
,
"VT_TIMER SRB task received MSG for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_SS
_SRB_ACP
,
"VT_TIMER SRB task received MSG for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
if
(
msg_queued
)
if
(
msg_queued
)
{
{
...
@@ -281,10 +281,10 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
...
@@ -281,10 +281,10 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
timer_tinfo
.
sf
--
;
timer_tinfo
.
sf
--
;
msg_queued
=
vt_timer_setup
(
timer_tinfo
,
TASK_RRC_ENB
,
instance_g
,
message_p
);
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"
,
LOG_A
(
ENB_SS
_SRB_ACP
,
"RRC_PDU Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d"
,
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
}
}
LOG_I
(
ENB_SS
,
"msg_queued2:%d
\n
"
,
msg_queued
);
LOG_I
(
ENB_SS
_SRB_ACP
,
"msg_queued2:%d
\n
"
,
msg_queued
);
}
}
if
(
!
msg_queued
)
if
(
!
msg_queued
)
...
@@ -292,10 +292,10 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
...
@@ -292,10 +292,10 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
instance_g
,
message_p
);
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
instance_g
,
message_p
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS_SRB] Error in itti_send_msg_to_task"
);
LOG_A
(
ENB_SS
_SRB_ACP
,
"[SS_SRB] Error in itti_send_msg_to_task"
);
}
}
LOG_A
(
ENB_SS
,
"Send res: %d"
,
send_res
);
LOG_A
(
ENB_SS
_SRB_ACP
,
"Send res: %d"
,
send_res
);
}
}
}
}
}
}
...
@@ -319,7 +319,7 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
...
@@ -319,7 +319,7 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
while
(
1
)
while
(
1
)
{
{
int
userId
=
acpRecvMsg
(
ctx
,
&
msgSize
,
buffer
);
int
userId
=
acpRecvMsg
(
ctx
,
&
msgSize
,
buffer
);
LOG_A
(
ENB_SS
,
"[SS_SRB] Received msgSize=%d, userId=%d
\n
"
,
(
int
)
msgSize
,
userId
);
LOG_A
(
ENB_SS
_SRB_ACP
,
"[SS_SRB] Received msgSize=%d, userId=%d
\n
"
,
(
int
)
msgSize
,
userId
);
// Error handling
// Error handling
if
(
userId
<
0
)
if
(
userId
<
0
)
...
@@ -346,7 +346,7 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
...
@@ -346,7 +346,7 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SS_SRB] Invalid userId: %d
\n
"
,
userId
);
LOG_A
(
ENB_SS
_SRB_ACP
,
"[SS_SRB] Invalid userId: %d
\n
"
,
userId
);
break
;
break
;
}
}
}
}
...
@@ -361,17 +361,17 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
...
@@ -361,17 +361,17 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
else
if
(
MSG_SysSrbProcessFromSS_userId
==
userId
)
else
if
(
MSG_SysSrbProcessFromSS_userId
==
userId
)
{
{
struct
EUTRA_RRC_PDU_REQ
*
req
=
NULL
;
struct
EUTRA_RRC_PDU_REQ
*
req
=
NULL
;
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_REQ] EUTRA_RRC_PDU_REQ Received
\n
"
);
LOG_A
(
ENB_SS
_SRB_ACP
,
"[SS_SRB][EUTRA_RRC_PDU_REQ] EUTRA_RRC_PDU_REQ Received
\n
"
);
// Got the message
// Got the message
if
(
acpSysSrbProcessFromSSDecSrv
(
ctx
,
buffer
,
msgSize
,
&
req
)
!=
0
)
if
(
acpSysSrbProcessFromSSDecSrv
(
ctx
,
buffer
,
msgSize
,
&
req
)
!=
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_REQ] acpSysSrbProcessFromSSDecSrv Failed
\n
"
);
LOG_A
(
ENB_SS
_SRB_ACP
,
"[SS_SRB][EUTRA_RRC_PDU_REQ] acpSysSrbProcessFromSSDecSrv Failed
\n
"
);
break
;
break
;
}
}
if
(
req
->
Common
.
CellId
){
if
(
req
->
Common
.
CellId
){
cell_index
=
get_cell_index
(
req
->
Common
.
CellId
,
SS_context
.
SSCell_list
);
cell_index
=
get_cell_index
(
req
->
Common
.
CellId
,
SS_context
.
SSCell_list
);
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
=
req
->
Common
.
CellId
;
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
=
req
->
Common
.
CellId
;
LOG_A
(
ENB_SS
,
"[SS_SRB] cell_index: %d eutra_cellId: %d PhysicalCellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
LOG_A
(
ENB_SS
_SRB_ACP
,
"[SS_SRB] cell_index: %d eutra_cellId: %d PhysicalCellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
}
}
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
>=
SS_STATE_CELL_ACTIVE
)
{
{
...
@@ -379,7 +379,7 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
...
@@ -379,7 +379,7 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"ERROR [SS_SRB][EUTRA_RRC_PDU_REQ] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
LOG_A
(
ENB_SS
_SRB_ACP
,
"ERROR [SS_SRB][EUTRA_RRC_PDU_REQ] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
}
}
acpSysSrbProcessFromSSFreeSrv
(
req
);
acpSysSrbProcessFromSSFreeSrv
(
req
);
...
@@ -387,7 +387,7 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
...
@@ -387,7 +387,7 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
}
}
else
if
(
MSG_SysSrbProcessToSS_userId
==
userId
)
else
if
(
MSG_SysSrbProcessToSS_userId
==
userId
)
{
{
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_IND] EUTRA_RRC_PDU_IND Received; ignoring
\n
"
);
LOG_A
(
ENB_SS
_SRB_ACP
,
"[SS_SRB][EUTRA_RRC_PDU_IND] EUTRA_RRC_PDU_IND Received; ignoring
\n
"
);
break
;
break
;
}
}
}
}
...
@@ -405,7 +405,7 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
...
@@ -405,7 +405,7 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
void
ss_eNB_srb_init
(
void
)
void
ss_eNB_srb_init
(
void
)
{
{
IpAddress_t
ipaddr
;
IpAddress_t
ipaddr
;
LOG_A
(
ENB_SS
,
"[SS_SRB] Starting System Simulator SRB Thread
\n
"
);
LOG_A
(
ENB_SS
_SRB_ACP
,
"[SS_SRB] Starting System Simulator SRB Thread
\n
"
);
const
char
*
hostIp
;
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
...
@@ -429,11 +429,11 @@ void ss_eNB_srb_init(void)
...
@@ -429,11 +429,11 @@ void ss_eNB_srb_init(void)
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_srb_g
);
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_srb_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS_SRB] Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
ENB_SS
_SRB_ACP
,
"[SS_SRB] Connection failure err=%d
\n
"
,
ret
);
return
;
return
;
}
}
int
fd1
=
acpGetSocketFd
(
ctx_srb_g
);
int
fd1
=
acpGetSocketFd
(
ctx_srb_g
);
LOG_A
(
ENB_SS
,
"[SS_SRB] Connection performed : %d
\n
"
,
fd1
);
LOG_A
(
ENB_SS
_SRB_ACP
,
"[SS_SRB] Connection performed : %d
\n
"
,
fd1
);
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
assert
(
buffer
);
assert
(
buffer
);
...
@@ -471,16 +471,16 @@ void *ss_eNB_srb_process_itti_msg(void *notUsed)
...
@@ -471,16 +471,16 @@ void *ss_eNB_srb_process_itti_msg(void *notUsed)
task_id_t
origin_task
=
ITTI_MSG_ORIGIN_ID
(
received_msg
);
task_id_t
origin_task
=
ITTI_MSG_ORIGIN_ID
(
received_msg
);
if
(
received_msg
->
ittiMsg
.
ss_rrc_pdu_ind
.
physCellId
){
if
(
received_msg
->
ittiMsg
.
ss_rrc_pdu_ind
.
physCellId
){
cell_index
=
get_cell_index_pci
(
received_msg
->
ittiMsg
.
ss_rrc_pdu_ind
.
physCellId
,
SS_context
.
SSCell_list
);
cell_index
=
get_cell_index_pci
(
received_msg
->
ittiMsg
.
ss_rrc_pdu_ind
.
physCellId
,
SS_context
.
SSCell_list
);
LOG_A
(
ENB_SS
,
"[SS_SRB] cell_index in SS_RRC_PDU_IND: %d PhysicalCellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
LOG_A
(
ENB_SS
_SRB
,
"[SS_SRB] cell_index in SS_RRC_PDU_IND: %d PhysicalCellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
}
}
if
(
origin_task
==
TASK_SS_PORTMAN
)
if
(
origin_task
==
TASK_SS_PORTMAN
)
{
{
LOG_D
(
ENB_
APP
,
"[SS_SRB] DUMMY WAKEUP receviedfrom PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
LOG_D
(
ENB_
SS_SRB
,
"[SS_SRB] DUMMY WAKEUP receviedfrom PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SS_SRB] Received SS_RRC_PDU_IND from RRC
\n
"
);
LOG_A
(
ENB_SS
_SRB
,
"[SS_SRB] Received SS_RRC_PDU_IND from RRC
\n
"
);
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
>=
SS_STATE_CELL_ACTIVE
)
{
{
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
...
@@ -488,7 +488,7 @@ void *ss_eNB_srb_process_itti_msg(void *notUsed)
...
@@ -488,7 +488,7 @@ void *ss_eNB_srb_process_itti_msg(void *notUsed)
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"ERROR [SS_SRB][EUTRA_RRC_PDU_IND] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
LOG_A
(
ENB_SS
_SRB
,
"ERROR [SS_SRB][EUTRA_RRC_PDU_IND] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
}
}
}
}
...
@@ -499,12 +499,12 @@ void *ss_eNB_srb_process_itti_msg(void *notUsed)
...
@@ -499,12 +499,12 @@ void *ss_eNB_srb_process_itti_msg(void *notUsed)
break
;
break
;
case
TERMINATE_MESSAGE
:
case
TERMINATE_MESSAGE
:
LOG_A
(
ENB_SS
,
"[SS_SRB] Received TERMINATE_MESSAGE
\n
"
);
LOG_A
(
ENB_SS
_SRB
,
"[SS_SRB] Received TERMINATE_MESSAGE
\n
"
);
itti_exit_task
();
itti_exit_task
();
break
;
break
;
default:
default:
LOG_A
(
ENB_SS
,
"[SS_SRB] Received unhandled message %d:%s
\n
"
,
LOG_A
(
ENB_SS
_SRB
,
"[SS_SRB] Received unhandled message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
break
;
break
;
}
}
...
@@ -525,7 +525,7 @@ void *ss_eNB_srb_task(void *arg)
...
@@ -525,7 +525,7 @@ void *ss_eNB_srb_task(void *arg)
{
{
while
(
1
)
while
(
1
)
{
{
//LOG_A(ENB_SS,"[SS_SRB] Inside ss_eNB_srb_task \n");
//LOG_A(ENB_SS
_SRB_ACP
,"[SS_SRB] Inside ss_eNB_srb_task \n");
(
void
)
ss_eNB_srb_process_itti_msg
(
NULL
);
(
void
)
ss_eNB_srb_process_itti_msg
(
NULL
);
}
}
//acpFree(buffer);
//acpFree(buffer);
...
...
openair3/SS/ss_eNB_sys_task.c
View file @
7e8fb445
...
@@ -177,7 +177,7 @@ int cell_config_done_indication()
...
@@ -177,7 +177,7 @@ int cell_config_done_indication()
#ifndef NR_RRC_VERSION
#ifndef NR_RRC_VERSION
if
(
cell_config_done
<
0
)
if
(
cell_config_done
<
0
)
{
{
printf
(
"
[SYS]
Signal to OAI main code about cell config
\n
"
);
printf
(
"Signal to OAI main code about cell config
\n
"
);
pthread_mutex_lock
(
&
cell_config_done_mutex
);
pthread_mutex_lock
(
&
cell_config_done_mutex
);
cell_config_done
=
0
;
cell_config_done
=
0
;
pthread_cond_broadcast
(
&
cell_config_done_cond
);
pthread_cond_broadcast
(
&
cell_config_done_cond
);
...
@@ -214,18 +214,18 @@ static int sys_send_udp_msg(
...
@@ -214,18 +214,18 @@ static int sys_send_udp_msg(
udp_data_req_p
->
buffer_offset
=
buffer_offset
;
udp_data_req_p
->
buffer_offset
=
buffer_offset
;
if
(
msg_queued
)
if
(
msg_queued
)
{
{
LOG_A
(
ENB_SS
,
"UDP Message Queued for Proxy
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"UDP Message Queued for Proxy
\n
"
);
return
vt_timer_setup
(
timer_tinfo
,
TASK_UDP
,
0
,
message_p
);
return
vt_timer_setup
(
timer_tinfo
,
TASK_UDP
,
0
,
message_p
);
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"Sending UDP_DATA_REQ to TASK_UDP
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"Sending UDP_DATA_REQ to TASK_UDP
\n
"
);
return
itti_send_msg_to_task
(
TASK_UDP
,
0
,
message_p
);
return
itti_send_msg_to_task
(
TASK_UDP
,
0
,
message_p
);
}
}
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"Failed Sending UDP_DATA_REQ length %u offset %u
\n
"
,
buffer_len
,
buffer_offset
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"Failed Sending UDP_DATA_REQ length %u offset %u
\n
"
,
buffer_len
,
buffer_offset
);
return
-
1
;
return
-
1
;
}
}
}
}
...
@@ -247,7 +247,7 @@ static int sys_send_init_udp(const udpSockReq_t *req)
...
@@ -247,7 +247,7 @@ static int sys_send_init_udp(const udpSockReq_t *req)
UDP_INIT
(
message_p
).
port
=
req
->
port
;
UDP_INIT
(
message_p
).
port
=
req
->
port
;
//addr.s_addr = req->ss_ip_addr;
//addr.s_addr = req->ss_ip_addr;
UDP_INIT
(
message_p
).
address
=
req
->
address
;
//inet_ntoa(addr);
UDP_INIT
(
message_p
).
address
=
req
->
address
;
//inet_ntoa(addr);
LOG_A
(
ENB_SS
,
"Tx UDP_INIT IP addr %s (%x)
\n
"
,
UDP_INIT
(
message_p
).
address
,
UDP_INIT
(
message_p
).
port
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"Tx UDP_INIT IP addr %s (%x)
\n
"
,
UDP_INIT
(
message_p
).
address
,
UDP_INIT
(
message_p
).
port
);
MSC_LOG_EVENT
(
MSC_LOG_EVENT
(
MSC_GTPU_ENB
,
MSC_GTPU_ENB
,
"0 UDP bind %s:%u"
,
"0 UDP bind %s:%u"
,
...
@@ -266,7 +266,7 @@ static void ss_task_sys_handle_timing_info(ss_set_timinfo_t *tinfo)
...
@@ -266,7 +266,7 @@ static void ss_task_sys_handle_timing_info(ss_set_timinfo_t *tinfo)
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
SS_SET_TIM_INFO
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
SS_SET_TIM_INFO
);
if
(
message_p
)
if
(
message_p
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Reporting info sfn:%d
\t
sf:%d.
\n
"
,
tinfo
->
sfn
,
tinfo
->
sf
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Reporting info sfn:%d
\t
sf:%d.
\n
"
,
tinfo
->
sfn
,
tinfo
->
sf
);
SS_SET_TIM_INFO
(
message_p
).
sf
=
tinfo
->
sf
;
SS_SET_TIM_INFO
(
message_p
).
sf
=
tinfo
->
sf
;
SS_SET_TIM_INFO
(
message_p
).
sfn
=
tinfo
->
sfn
;
SS_SET_TIM_INFO
(
message_p
).
sfn
=
tinfo
->
sfn
;
SS_SET_TIM_INFO
(
message_p
).
cell_index
=
cell_index
;
SS_SET_TIM_INFO
(
message_p
).
cell_index
=
cell_index
;
...
@@ -274,7 +274,7 @@ static void ss_task_sys_handle_timing_info(ss_set_timinfo_t *tinfo)
...
@@ -274,7 +274,7 @@ static void ss_task_sys_handle_timing_info(ss_set_timinfo_t *tinfo)
int
send_res
=
itti_send_msg_to_task
(
TASK_SS_PORTMAN
,
0
,
message_p
);
int
send_res
=
itti_send_msg_to_task
(
TASK_SS_PORTMAN
,
0
,
message_p
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Error sending to [SS-PORTMAN]
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Error sending to [SS-PORTMAN]
\n
"
);
}
}
}
}
}
}
...
@@ -400,7 +400,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
...
@@ -400,7 +400,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
{
{
/** For MIB */
/** For MIB */
LOG_A
(
ENB_SS
,
"[SYS]
CellConfigRequest PHICH Duration: %d
\n
"
,
BCCH_CONFIG
.
v
.
BcchInfo
.
v
.
MIB
.
v
.
message
.
phich_Config
.
phich_Duration
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
CellConfigRequest PHICH Duration: %d
\n
"
,
BCCH_CONFIG
.
v
.
BcchInfo
.
v
.
MIB
.
v
.
message
.
phich_Config
.
phich_Duration
);
switch
(
AddOrReconfigure
->
Basic
.
v
.
BcchConfig
.
v
.
BcchInfo
.
v
.
MIB
.
v
.
message
.
phich_Config
.
phich_Duration
)
switch
(
AddOrReconfigure
->
Basic
.
v
.
BcchConfig
.
v
.
BcchInfo
.
v
.
MIB
.
v
.
message
.
phich_Config
.
phich_Duration
)
{
{
case
SQN_PHICH_Config_phich_Duration_e_normal
:
case
SQN_PHICH_Config_phich_Duration_e_normal
:
...
@@ -414,7 +414,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
...
@@ -414,7 +414,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
return
false
;
return
false
;
}
}
LOG_A
(
ENB_SS
,
"[SYS]
CellConfigRequest PHICH Resource: %d
\n
"
,
BCCH_CONFIG
.
v
.
BcchInfo
.
v
.
MIB
.
v
.
message
.
phich_Config
.
phich_Resource
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
CellConfigRequest PHICH Resource: %d
\n
"
,
BCCH_CONFIG
.
v
.
BcchInfo
.
v
.
MIB
.
v
.
message
.
phich_Config
.
phich_Resource
);
switch
(
AddOrReconfigure
->
Basic
.
v
.
BcchConfig
.
v
.
BcchInfo
.
v
.
MIB
.
v
.
message
.
phich_Config
.
phich_Resource
)
switch
(
AddOrReconfigure
->
Basic
.
v
.
BcchConfig
.
v
.
BcchInfo
.
v
.
MIB
.
v
.
message
.
phich_Config
.
phich_Resource
)
{
{
case
SQN_PHICH_Config_phich_Resource_e_oneSixth
:
case
SQN_PHICH_Config_phich_Resource_e_oneSixth
:
...
@@ -667,7 +667,6 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
...
@@ -667,7 +667,6 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
RRC_CONFIGURATION_REQ
(
msg_p
).
intraFreqReselection
[
cell_index
]
=
SIB1_CELL_ACCESS_REL_INFO
.
intraFreqReselection
;
RRC_CONFIGURATION_REQ
(
msg_p
).
intraFreqReselection
[
cell_index
]
=
SIB1_CELL_ACCESS_REL_INFO
.
intraFreqReselection
;
}
}
}
}
uint8_t
msg_queued
=
0
;
uint8_t
msg_queued
=
0
;
ss_set_timinfo_t
tinfo
,
timer_tinfo
;
ss_set_timinfo_t
tinfo
,
timer_tinfo
;
#if 0
#if 0
...
@@ -678,7 +677,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
...
@@ -678,7 +677,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
timer_tinfo = tinfo;
timer_tinfo = tinfo;
msg_queued = msg_can_be_queued(tinfo, &timer_tinfo);
msg_queued = msg_can_be_queued(tinfo, &timer_tinfo);
LOG_A(ENB_SS,"VT_TIMER SYS task received MSG for future SFN %d , SF %d\n",tinfo.sfn,tinfo.sf);
LOG_A(ENB_SS
_SYS_TASK
,"VT_TIMER SYS task received MSG for future SFN %d , SF %d\n",tinfo.sfn,tinfo.sf);
if(msg_queued)
if(msg_queued)
{
{
msg_queued = vt_timer_setup(timer_tinfo, TASK_RRC_ENB, 0,msg_p);
msg_queued = vt_timer_setup(timer_tinfo, TASK_RRC_ENB, 0,msg_p);
...
@@ -689,7 +688,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
...
@@ -689,7 +688,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
if (!msg_queued)
if (!msg_queued)
{
{
LOG_A(ENB_SS, "Sending Cell configuration to RRC from SYSTEM_CTRL_REQ \n");
LOG_A(ENB_SS
_SYS_TASK
, "Sending Cell configuration to RRC from SYSTEM_CTRL_REQ \n");
itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
}
}
#endif
#endif
...
@@ -710,7 +709,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
...
@@ -710,7 +709,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
break
;
break
;
case
Attenuation_Type_UNBOUND_VALUE
:
case
Attenuation_Type_UNBOUND_VALUE
:
default:
default:
LOG_A
(
ENB_SS
,
"[SYS]
[InitialCellPower.v.Attenuation.v.Value] Unbound or Invalid value received
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
[InitialCellPower.v.Attenuation.v.Value] Unbound or Invalid value received
\n
"
);
}
}
cellConfig
->
header
.
cell_id
=
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
;
cellConfig
->
header
.
cell_id
=
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
;
...
@@ -809,20 +808,20 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
...
@@ -809,20 +808,20 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
if
(
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
d
==
true
)
if
(
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
d
==
true
)
{
{
msg_p
=
itti_alloc_new_message
(
TASK_ENB_APP
,
ENB_MODULE_ID_TO_INSTANCE
(
enb_id
),
SS_ULGRANT_INFO
);
msg_p
=
itti_alloc_new_message
(
TASK_ENB_APP
,
ENB_MODULE_ID_TO_INSTANCE
(
enb_id
),
SS_ULGRANT_INFO
);
LOG_I
(
ENB_SS
,
"[SYS]
Received ULGrant in Active State
\n
"
);
LOG_I
(
ENB_SS
_SYS_TASK
,
"
Received ULGrant in Active State
\n
"
);
SS_ULGRANT_INFO
(
msg_p
).
cell_index
=
cell_index
;
SS_ULGRANT_INFO
(
msg_p
).
cell_index
=
cell_index
;
if
(
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
d
==
UL_GrantConfig_Type_OnSR_Reception
)
if
(
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
d
==
UL_GrantConfig_Type_OnSR_Reception
)
{
{
RC
.
ss
.
ulgrant_info
[
cell_index
].
ulGrantType
=
ON_SR_RECEPTION_PRESENT
;
RC
.
ss
.
ulgrant_info
[
cell_index
].
ulGrantType
=
ON_SR_RECEPTION_PRESENT
;
SS_ULGRANT_INFO
(
msg_p
).
ulGrantType
=
ON_SR_RECEPTION_PRESENT
;
SS_ULGRANT_INFO
(
msg_p
).
ulGrantType
=
ON_SR_RECEPTION_PRESENT
;
LOG_I
(
ENB_SS
,
"[SYS]
Received ulGrantType ON_SR_RECEPTION
\n
"
);
LOG_I
(
ENB_SS
_SYS_TASK
,
"
Received ulGrantType ON_SR_RECEPTION
\n
"
);
destTaskMAC
=
true
;
destTaskMAC
=
true
;
}
}
else
if
(
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
d
==
UL_GrantConfig_Type_None
)
else
if
(
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
d
==
UL_GrantConfig_Type_None
)
{
{
RC
.
ss
.
ulgrant_info
[
cell_index
].
ulGrantType
=
NONE_PRESENT
;
RC
.
ss
.
ulgrant_info
[
cell_index
].
ulGrantType
=
NONE_PRESENT
;
SS_ULGRANT_INFO
(
msg_p
).
ulGrantType
=
NONE_PRESENT
;
SS_ULGRANT_INFO
(
msg_p
).
ulGrantType
=
NONE_PRESENT
;
LOG_I
(
ENB_SS
,
"[SYS]
Received ulGrantType UL_GrantConfig_Type_None
\n
"
);
LOG_I
(
ENB_SS
_SYS_TASK
,
"
Received ulGrantType UL_GrantConfig_Type_None
\n
"
);
destTaskMAC
=
true
;
destTaskMAC
=
true
;
}
}
else
if
(
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
d
==
UL_GrantConfig_Type_Periodic
)
else
if
(
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
d
==
UL_GrantConfig_Type_Periodic
)
...
@@ -830,19 +829,19 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
...
@@ -830,19 +829,19 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
SS_ULGRANT_INFO
(
msg_p
).
ulGrantType
=
PERIODIC_PRESENT
;
SS_ULGRANT_INFO
(
msg_p
).
ulGrantType
=
PERIODIC_PRESENT
;
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
ULGrantPeriodType
=
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
ULGrantPeriodType
=
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
v
.
Periodic
.
Period
.
d
;
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
v
.
Periodic
.
Period
.
d
;
LOG_I
(
ENB_SS
,
"[SYS]
ULGrantPeriodType:%d
\n
"
,
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
ULGrantPeriodType
);
LOG_I
(
ENB_SS
_SYS_TASK
,
"
ULGrantPeriodType:%d
\n
"
,
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
ULGrantPeriodType
);
if
(
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
v
.
Periodic
.
Period
.
d
==
ULGrant_Period_Type_Duration
)
if
(
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
v
.
Periodic
.
Period
.
d
==
ULGrant_Period_Type_Duration
)
{
{
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
period
.
duration
=
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
period
.
duration
=
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
v
.
Periodic
.
Period
.
v
.
Duration
;
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
v
.
Periodic
.
Period
.
v
.
Duration
;
LOG_I
(
ENB_SS
,
"[SYS]
Received Periodic ULGrant type ULGrant_Period_Type_Duration: %d received:%d
\n
"
,
LOG_I
(
ENB_SS
_SYS_TASK
,
"
Received Periodic ULGrant type ULGrant_Period_Type_Duration: %d received:%d
\n
"
,
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
period
.
duration
,
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
period
.
duration
,
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
v
.
Periodic
.
Period
.
v
.
Duration
);
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
v
.
Periodic
.
Period
.
v
.
Duration
);
}
}
else
if
(
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
v
.
Periodic
.
Period
.
d
==
ULGrant_Period_Type_OnlyOnce
)
else
if
(
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
v
.
Periodic
.
Period
.
d
==
ULGrant_Period_Type_OnlyOnce
)
{
{
LOG_I
(
ENB_SS
,
"[SYS]
Received Periodic ULGrant type ULGrant_Period_Type_OnlyOnce
\n
"
);
LOG_I
(
ENB_SS
_SYS_TASK
,
"
Received Periodic ULGrant type ULGrant_Period_Type_OnlyOnce
\n
"
);
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
period
.
onlyOnce
=
true
;
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
period
.
onlyOnce
=
true
;
}
}
...
@@ -850,7 +849,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
...
@@ -850,7 +849,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
{
{
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
Continuous
=
1
;
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
Continuous
=
1
;
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
NumOfCycles
=
0
;
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
NumOfCycles
=
0
;
LOG_I
(
ENB_SS
,
"[SYS]
line:%d Continuous:%d NumOfCycles:%d
\n
"
,
LOG_I
(
ENB_SS
_SYS_TASK
,
"
line:%d Continuous:%d NumOfCycles:%d
\n
"
,
__LINE__
,
__LINE__
,
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
Continuous
,
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
Continuous
,
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
NumOfCycles
);
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
NumOfCycles
);
...
@@ -860,14 +859,14 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
...
@@ -860,14 +859,14 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
NumOfCycles
=
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
NumOfCycles
=
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
v
.
Periodic
.
NoOfRepetitions
.
v
.
NumOfCycles
;
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
v
.
Periodic
.
NoOfRepetitions
.
v
.
NumOfCycles
;
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
Continuous
=
0
;
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
Continuous
=
0
;
LOG_I
(
ENB_SS
,
"[SYS]
line:%d Continuous:%d NumOfCycles:%d
\n
"
,
LOG_I
(
ENB_SS
_SYS_TASK
,
"
line:%d Continuous:%d NumOfCycles:%d
\n
"
,
__LINE__
,
__LINE__
,
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
Continuous
,
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
Continuous
,
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
NumOfCycles
);
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
transRepType
.
NumOfCycles
);
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Received invalid Transmission Repetation Type in Periodic ULGrant%d
\n
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Received invalid Transmission Repetation Type in Periodic ULGrant%d
\n
"
,
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
ULGrantPeriodType
);
SS_ULGRANT_INFO
(
msg_p
).
periodiGrantInfo
.
ULGrantPeriodType
);
break
;
break
;
}
}
...
@@ -875,7 +874,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
...
@@ -875,7 +874,7 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SYS]
ULGrantType %d is not supported. Current supported ULGrant is OnSR_Reception & periodic only
\n
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"
ULGrantType %d is not supported. Current supported ULGrant is OnSR_Reception & periodic only
\n
"
,
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
d
);
AddOrReconfigure
->
Active
.
v
.
CcchDcchDtchConfig
.
v
.
UL
.
v
.
UL_GrantConfig
.
v
.
d
);
}
}
}
}
...
@@ -896,12 +895,12 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
...
@@ -896,12 +895,12 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
{
{
msg_queued
=
vt_timer_setup
(
tinfo
,
TASK_MAC_ENB
,
0
,
msg_p
);
msg_queued
=
vt_timer_setup
(
tinfo
,
TASK_MAC_ENB
,
0
,
msg_p
);
}
}
LOG_A
(
ENB_SS
,
"Enquiry Timing MSG queued for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"Enquiry Timing MSG queued for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
}
}
if
(
!
msg_queued
)
if
(
!
msg_queued
)
{
{
LOG_A
(
ENB_SS
,
"Sending SS_ULGRANT_INFO to MAC
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"Sending SS_ULGRANT_INFO to MAC
\n
"
);
itti_send_msg_to_task
(
TASK_MAC_ENB
,
ENB_MODULE_ID_TO_INSTANCE
(
enb_id
),
msg_p
);
itti_send_msg_to_task
(
TASK_MAC_ENB
,
ENB_MODULE_ID_TO_INSTANCE
(
enb_id
),
msg_p
);
}
}
}
}
...
@@ -927,7 +926,7 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
...
@@ -927,7 +926,7 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
/* The request has send confirm flag flase so do nothing in this funciton */
/* The request has send confirm flag flase so do nothing in this funciton */
if
(
reqCnfFlag_g
==
false
)
if
(
reqCnfFlag_g
==
false
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
No confirm required
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
No confirm required
\n
"
);
return
;
return
;
}
}
...
@@ -936,7 +935,7 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
...
@@ -936,7 +935,7 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
if
(
message_p
)
if
(
message_p
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Send SS_SYS_PORT_MSG_CNF
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Send SS_SYS_PORT_MSG_CNF
\n
"
);
msgCnf
->
Common
.
CellId
=
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
;
msgCnf
->
Common
.
CellId
=
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
;
msgCnf
->
Common
.
Result
.
d
=
resType
;
msgCnf
->
Common
.
Result
.
d
=
resType
;
msgCnf
->
Common
.
Result
.
v
.
Success
=
resVal
;
msgCnf
->
Common
.
Result
.
v
.
Success
=
resVal
;
...
@@ -945,7 +944,7 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
...
@@ -945,7 +944,7 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
{
{
case
SystemConfirm_Type_Cell
:
case
SystemConfirm_Type_Cell
:
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Send confirm for cell configuration
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Send confirm for cell configuration
\n
"
);
msgCnf
->
Confirm
.
v
.
Cell
=
true
;
msgCnf
->
Confirm
.
v
.
Cell
=
true
;
break
;
break
;
}
}
...
@@ -975,7 +974,7 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
...
@@ -975,7 +974,7 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
break
;
break
;
case
SystemConfirm_Type_PdcchOrder
:
case
SystemConfirm_Type_PdcchOrder
:
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Send confirm for PDCCHOrder to Port Sys
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Send confirm for PDCCHOrder to Port Sys
\n
"
);
msgCnf
->
Confirm
.
v
.
PdcchOrder
=
true
;
msgCnf
->
Confirm
.
v
.
PdcchOrder
=
true
;
break
;
break
;
}
}
...
@@ -995,13 +994,13 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
...
@@ -995,13 +994,13 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
case
SystemConfirm_Type_OCNG_Config
:
case
SystemConfirm_Type_OCNG_Config
:
case
SystemConfirm_Type_DirectIndicationInfo
:
case
SystemConfirm_Type_DirectIndicationInfo
:
default:
default:
LOG_A
(
ENB_SS
,
"[SYS]
Error not handled CNF TYPE to [SS-PORTMAN]
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Error not handled CNF TYPE to [SS-PORTMAN]
\n
"
);
}
}
SS_SYS_PORT_MSG_CNF
(
message_p
).
cnf
=
msgCnf
;
SS_SYS_PORT_MSG_CNF
(
message_p
).
cnf
=
msgCnf
;
int
send_res
=
itti_send_msg_to_task
(
TASK_SS_PORTMAN
,
0
,
message_p
);
int
send_res
=
itti_send_msg_to_task
(
TASK_SS_PORTMAN
,
0
,
message_p
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Error sending to [SS-PORTMAN]
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Error sending to [SS-PORTMAN]
\n
"
);
}
}
}
}
}
}
...
@@ -1030,12 +1029,12 @@ int sys_handle_cell_config_req(struct SYSTEM_CTRL_REQ *req)
...
@@ -1030,12 +1029,12 @@ int sys_handle_cell_config_req(struct SYSTEM_CTRL_REQ *req)
{
{
case
CellConfigRequest_Type_AddOrReconfigure
:
case
CellConfigRequest_Type_AddOrReconfigure
:
LOG_A
(
ENB_SS
,
"[SYS]
CellConfigRequest_Type_AddOrReconfigure receivied
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
CellConfigRequest_Type_AddOrReconfigure receivied
\n
"
);
status
=
sys_add_reconfig_cell
(
req
);
status
=
sys_add_reconfig_cell
(
req
);
if
(
status
)
if
(
status
)
{
{
/** TODO Signal to main thread */
/** TODO Signal to main thread */
LOG_A
(
ENB_SS
,
"[SYS]
Signalling main thread for cell config done indication
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Signalling main thread for cell config done indication
\n
"
);
cell_config_done_indication
();
cell_config_done_indication
();
}
}
//cell configuration
//cell configuration
...
@@ -1065,14 +1064,14 @@ int sys_handle_cell_config_req(struct SYSTEM_CTRL_REQ *req)
...
@@ -1065,14 +1064,14 @@ int sys_handle_cell_config_req(struct SYSTEM_CTRL_REQ *req)
break
;
break
;
case
CellConfigRequest_Type_Release
:
/**TODO: NOT IMPLEMNTED */
case
CellConfigRequest_Type_Release
:
/**TODO: NOT IMPLEMNTED */
LOG_A
(
ENB_SS
,
"[SYS]
CellConfigRequest_Type_Release receivied
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
CellConfigRequest_Type_Release receivied
\n
"
);
returnState
=
SS_STATE_NOT_CONFIGURED
;
returnState
=
SS_STATE_NOT_CONFIGURED
;
break
;
break
;
case
CellConfigRequest_Type_UNBOUND_VALUE
:
/** TODO: NOT IMPLEMNTED */
case
CellConfigRequest_Type_UNBOUND_VALUE
:
/** TODO: NOT IMPLEMNTED */
LOG_A
(
ENB_SS
,
"[SYS]
CellConfigRequest_Type_UNBOUND_VALUE receivied
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
CellConfigRequest_Type_UNBOUND_VALUE receivied
\n
"
);
break
;
break
;
default:
default:
LOG_A
(
ENB_SS
,
"[SYS]
CellConfigRequest INVALID Type receivied
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
CellConfigRequest INVALID Type receivied
\n
"
);
}
}
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
return
returnState
;
return
returnState
;
...
@@ -1101,12 +1100,12 @@ static int sys_handle_radiobearer_list(struct SYSTEM_CTRL_REQ *req)
...
@@ -1101,12 +1100,12 @@ static int sys_handle_radiobearer_list(struct SYSTEM_CTRL_REQ *req)
MessageDef
*
msg_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
RRC_RBLIST_CFG_REQ
);
MessageDef
*
msg_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
RRC_RBLIST_CFG_REQ
);
if
(
msg_p
)
if
(
msg_p
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
BearerList size:%lu
\n
"
,
BearerList
->
d
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
BearerList size:%lu
\n
"
,
BearerList
->
d
);
RRC_RBLIST_CFG_REQ
(
msg_p
).
rb_count
=
0
;
RRC_RBLIST_CFG_REQ
(
msg_p
).
rb_count
=
0
;
RRC_RBLIST_CFG_REQ
(
msg_p
).
cell_index
=
cell_index
;
RRC_RBLIST_CFG_REQ
(
msg_p
).
cell_index
=
cell_index
;
for
(
int
i
=
0
;
i
<
BearerList
->
d
;
i
++
)
for
(
int
i
=
0
;
i
<
BearerList
->
d
;
i
++
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
RB Index i:%d
\n
"
,
i
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
RB Index i:%d
\n
"
,
i
);
memset
(
&
RRC_RBLIST_CFG_REQ
(
msg_p
).
rb_list
[
i
],
0
,
sizeof
(
rb_info
));
memset
(
&
RRC_RBLIST_CFG_REQ
(
msg_p
).
rb_list
[
i
],
0
,
sizeof
(
rb_info
));
if
(
BearerList
->
v
[
i
].
Id
.
d
==
RadioBearerId_Type_Srb
)
if
(
BearerList
->
v
[
i
].
Id
.
d
==
RadioBearerId_Type_Srb
)
{
{
...
@@ -1129,7 +1128,7 @@ static int sys_handle_radiobearer_list(struct SYSTEM_CTRL_REQ *req)
...
@@ -1129,7 +1128,7 @@ static int sys_handle_radiobearer_list(struct SYSTEM_CTRL_REQ *req)
{
{
if
(
BearerList
->
v
[
i
].
Config
.
v
.
AddOrReconfigure
.
Pdcp
.
v
.
v
.
Config
.
Rb
.
v
.
d
==
PDCP_RBConfig_Type_Srb
)
if
(
BearerList
->
v
[
i
].
Config
.
v
.
AddOrReconfigure
.
Pdcp
.
v
.
v
.
Config
.
Rb
.
v
.
d
==
PDCP_RBConfig_Type_Srb
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
PDCP Config for Bearer Id: %d is Null
\n
"
,
RRC_RBLIST_CFG_REQ
(
msg_p
).
rb_list
[
i
].
RbId
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
PDCP Config for Bearer Id: %d is Null
\n
"
,
RRC_RBLIST_CFG_REQ
(
msg_p
).
rb_list
[
i
].
RbId
);
}
}
else
if
(
BearerList
->
v
[
i
].
Config
.
v
.
AddOrReconfigure
.
Pdcp
.
v
.
v
.
Config
.
Rb
.
v
.
d
==
PDCP_RBConfig_Type_Drb
)
else
if
(
BearerList
->
v
[
i
].
Config
.
v
.
AddOrReconfigure
.
Pdcp
.
v
.
v
.
Config
.
Rb
.
v
.
d
==
PDCP_RBConfig_Type_Drb
)
{
{
...
@@ -1319,7 +1318,7 @@ static int sys_handle_radiobearer_list(struct SYSTEM_CTRL_REQ *req)
...
@@ -1319,7 +1318,7 @@ static int sys_handle_radiobearer_list(struct SYSTEM_CTRL_REQ *req)
if
(
BearerList
->
v
[
i
].
Config
.
v
.
AddOrReconfigure
.
Pdcp
.
v
.
v
.
Config
.
Rb
.
v
.
v
.
Drb
.
v
.
R8
.
ethernetHeaderCompression_r16
.
d
)
if
(
BearerList
->
v
[
i
].
Config
.
v
.
AddOrReconfigure
.
Pdcp
.
v
.
v
.
Config
.
Rb
.
v
.
v
.
Drb
.
v
.
R8
.
ethernetHeaderCompression_r16
.
d
)
{
{
LOG_A
(
ENB_SS
,
"Unsupported IE: ethernetHeaderCompression_r16
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"Unsupported IE: ethernetHeaderCompression_r16
\n
"
);
}
}
}
}
}
}
...
@@ -1449,21 +1448,21 @@ static int sys_handle_radiobearer_list(struct SYSTEM_CTRL_REQ *req)
...
@@ -1449,21 +1448,21 @@ static int sys_handle_radiobearer_list(struct SYSTEM_CTRL_REQ *req)
timer_tinfo
=
tinfo
;
timer_tinfo
=
tinfo
;
msg_queued
=
msg_can_be_queued
(
tinfo
,
&
timer_tinfo
);
msg_queued
=
msg_can_be_queued
(
tinfo
,
&
timer_tinfo
);
LOG_A
(
ENB_SS
,
"VT_TIMER SYS task received MSG for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"VT_TIMER SYS task received MSG for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
if
(
msg_queued
)
if
(
msg_queued
)
{
{
msg_queued
=
vt_timer_setup
(
timer_tinfo
,
TASK_RRC_ENB
,
0
,
msg_p
);
msg_queued
=
vt_timer_setup
(
timer_tinfo
,
TASK_RRC_ENB
,
0
,
msg_p
);
LOG_A
(
ENB_SS
,
"RB List Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d
\n
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"RB List Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
}
}
}
}
if
(
!
msg_queued
)
if
(
!
msg_queued
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Send RRC_RBLIST_CFG_REQ to TASK_RRC_ENB, RB Count : %d, Message: %s
\n
"
,
RRC_RBLIST_CFG_REQ
(
msg_p
).
rb_count
,
ITTI_MSG_NAME
(
msg_p
));
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Send RRC_RBLIST_CFG_REQ to TASK_RRC_ENB, RB Count : %d, Message: %s
\n
"
,
RRC_RBLIST_CFG_REQ
(
msg_p
).
rb_count
,
ITTI_MSG_NAME
(
msg_p
));
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
0
,
msg_p
);
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
0
,
msg_p
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Error sending RRC_RBLIST_CFG_REQ to RRC_ENB
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Error sending RRC_RBLIST_CFG_REQ to RRC_ENB
\n
"
);
}
}
}
}
}
}
...
@@ -1492,17 +1491,17 @@ int sys_handle_pdcp_count_req(struct PDCP_CountReq_Type *PdcpCount)
...
@@ -1492,17 +1491,17 @@ int sys_handle_pdcp_count_req(struct PDCP_CountReq_Type *PdcpCount)
switch
(
PdcpCount
->
d
)
switch
(
PdcpCount
->
d
)
{
{
case
PDCP_CountReq_Type_Get
:
case
PDCP_CountReq_Type_Get
:
LOG_A
(
ENB_SS
,
"[SYS]
Pdcp_CountReq_Type_Get receivied
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Pdcp_CountReq_Type_Get receivied
\n
"
);
MessageDef
*
get_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
SS_REQ_PDCP_CNT
);
MessageDef
*
get_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
SS_REQ_PDCP_CNT
);
SS_REQ_PDCP_CNT
(
get_p
).
rnti
=
SS_context
.
SSCell_list
[
cell_index
].
ss_rnti_g
;
SS_REQ_PDCP_CNT
(
get_p
).
rnti
=
SS_context
.
SSCell_list
[
cell_index
].
ss_rnti_g
;
switch
(
PdcpCount
->
v
.
Get
.
d
)
switch
(
PdcpCount
->
v
.
Get
.
d
)
{
{
case
PdcpCountGetReq_Type_AllRBs
:
case
PdcpCountGetReq_Type_AllRBs
:
LOG_A
(
ENB_SS
,
"[SYS]
Pdcp_CountReq_Type_Get AllRBs receivied
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Pdcp_CountReq_Type_Get AllRBs receivied
\n
"
);
SS_REQ_PDCP_CNT
(
get_p
).
rb_id
=
-
1
;
SS_REQ_PDCP_CNT
(
get_p
).
rb_id
=
-
1
;
break
;
break
;
case
PdcpCountGetReq_Type_SingleRB
:
case
PdcpCountGetReq_Type_SingleRB
:
LOG_A
(
ENB_SS
,
"[SYS]
Pdcp_CountReq_Type_Get SingleRB receivied
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Pdcp_CountReq_Type_Get SingleRB receivied
\n
"
);
switch
(
PdcpCount
->
v
.
Get
.
v
.
SingleRB
.
d
)
switch
(
PdcpCount
->
v
.
Get
.
v
.
SingleRB
.
d
)
{
{
case
RadioBearerId_Type_Srb
:
case
RadioBearerId_Type_Srb
:
...
@@ -1520,21 +1519,21 @@ int sys_handle_pdcp_count_req(struct PDCP_CountReq_Type *PdcpCount)
...
@@ -1520,21 +1519,21 @@ int sys_handle_pdcp_count_req(struct PDCP_CountReq_Type *PdcpCount)
}
}
break
;
break
;
case
PdcpCountGetReq_Type_UNBOUND_VALUE
:
case
PdcpCountGetReq_Type_UNBOUND_VALUE
:
LOG_A
(
ENB_SS
,
"[SYS]
PdcpCountGetReq_Type_UNBOUND_VALUE received
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
PdcpCountGetReq_Type_UNBOUND_VALUE received
\n
"
);
break
;
break
;
default:
default:
LOG_A
(
ENB_SS
,
"[SYS]
Pdcp_CountReq_Type (GET) Invalid
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Pdcp_CountReq_Type (GET) Invalid
\n
"
);
}
}
LOG_A
(
ENB_SS
,
" [SYS]
SS_REQ_PDCP_CNT(message_p).rb_id %d
\n
"
,
SS_REQ_PDCP_CNT
(
get_p
).
rb_id
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
SS_REQ_PDCP_CNT(message_p).rb_id %d
\n
"
,
SS_REQ_PDCP_CNT
(
get_p
).
rb_id
);
send_res
=
itti_send_msg_to_task
(
TASK_PDCP_ENB
,
0
,
get_p
);
send_res
=
itti_send_msg_to_task
(
TASK_PDCP_ENB
,
0
,
get_p
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Error sending SS_REQ_PDCP_CNT to PDCP_ENB
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Error sending SS_REQ_PDCP_CNT to PDCP_ENB
\n
"
);
}
}
break
;
break
;
case
PDCP_CountReq_Type_Set
:
case
PDCP_CountReq_Type_Set
:
LOG_A
(
ENB_SS
,
"[SYS]
Pdcp_CountReq_Type_Set receivied
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Pdcp_CountReq_Type_Set receivied
\n
"
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
SS_SET_PDCP_CNT
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
SS_SET_PDCP_CNT
);
for
(
int
i
=
0
;
i
<
PdcpCount
->
v
.
Set
.
d
;
i
++
)
for
(
int
i
=
0
;
i
<
PdcpCount
->
v
.
Set
.
d
;
i
++
)
{
{
...
@@ -1549,7 +1548,7 @@ int sys_handle_pdcp_count_req(struct PDCP_CountReq_Type *PdcpCount)
...
@@ -1549,7 +1548,7 @@ int sys_handle_pdcp_count_req(struct PDCP_CountReq_Type *PdcpCount)
case
RadioBearerId_Type_UNBOUND_VALUE
:
case
RadioBearerId_Type_UNBOUND_VALUE
:
break
;
break
;
default:
default:
LOG_A
(
ENB_SS
,
"[SYS]
Pdcp_CountReq_Type (SET) Invalid
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Pdcp_CountReq_Type (SET) Invalid
\n
"
);
}
}
if
(
PdcpCount
->
v
.
Set
.
v
[
i
].
UL
.
d
==
true
)
if
(
PdcpCount
->
v
.
Set
.
v
[
i
].
UL
.
d
==
true
)
{
{
...
@@ -1566,7 +1565,7 @@ int sys_handle_pdcp_count_req(struct PDCP_CountReq_Type *PdcpCount)
...
@@ -1566,7 +1565,7 @@ int sys_handle_pdcp_count_req(struct PDCP_CountReq_Type *PdcpCount)
send_res
=
itti_send_msg_to_task
(
TASK_PDCP_ENB
,
0
,
message_p
);
send_res
=
itti_send_msg_to_task
(
TASK_PDCP_ENB
,
0
,
message_p
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Error sending SS_SET_PDCP_CNT to PDCP_ENB
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Error sending SS_SET_PDCP_CNT to PDCP_ENB
\n
"
);
}
}
//Sending Confirm for Set PDCPCount
//Sending Confirm for Set PDCPCount
...
@@ -1580,10 +1579,10 @@ int sys_handle_pdcp_count_req(struct PDCP_CountReq_Type *PdcpCount)
...
@@ -1580,10 +1579,10 @@ int sys_handle_pdcp_count_req(struct PDCP_CountReq_Type *PdcpCount)
break
;
break
;
case
PDCP_CountReq_Type_UNBOUND_VALUE
:
case
PDCP_CountReq_Type_UNBOUND_VALUE
:
LOG_A
(
ENB_SS
,
"[SYS]
Pdcp_CountReq_Type UNBOUND receivied
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Pdcp_CountReq_Type UNBOUND receivied
\n
"
);
break
;
break
;
default:
default:
LOG_A
(
ENB_SS
,
"[SYS]
Pdcp_CountReq_Type INVALID Type receivied
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Pdcp_CountReq_Type INVALID Type receivied
\n
"
);
}
}
return
returnState
;
return
returnState
;
}
}
...
@@ -1594,20 +1593,20 @@ int sys_handle_pdcp_count_req(struct PDCP_CountReq_Type *PdcpCount)
...
@@ -1594,20 +1593,20 @@ int sys_handle_pdcp_count_req(struct PDCP_CountReq_Type *PdcpCount)
*/
*/
static
void
sys_send_proxy
(
void
*
msg
,
int
msgLen
,
int
msg_queued
,
ss_set_timinfo_t
timer_tinfo
)
static
void
sys_send_proxy
(
void
*
msg
,
int
msgLen
,
int
msg_queued
,
ss_set_timinfo_t
timer_tinfo
)
{
{
LOG_A
(
ENB_SS
,
"In sys_send_proxy
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"In sys_send_proxy
\n
"
);
uint32_t
peerIpAddr
;
uint32_t
peerIpAddr
;
uint16_t
peerPort
=
proxy_send_port
;
uint16_t
peerPort
=
proxy_send_port
;
IPV4_STR_ADDR_TO_INT_NWBO
(
local_address
,
peerIpAddr
,
" BAD IP Address"
);
IPV4_STR_ADDR_TO_INT_NWBO
(
local_address
,
peerIpAddr
,
" BAD IP Address"
);
LOG_A
(
ENB_SS
,
"******************* Sending CELL CONFIG length
\n
Buffer is :%d "
,
msgLen
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"******************* Sending CELL CONFIG length
\n
Buffer is :%d "
,
msgLen
);
int8_t
*
temp
=
msg
;
int8_t
*
temp
=
msg
;
for
(
int
i
=
0
;
i
<
msgLen
;
i
++
)
for
(
int
i
=
0
;
i
<
msgLen
;
i
++
)
{
{
LOG_A
(
ENB_SS
,
"%x "
,
temp
[
i
]);
LOG_A
(
ENB_SS
_SYS_TASK
,
"%x "
,
temp
[
i
]);
}
}
LOG_A
(
ENB_SS
,
"
\n
Cell Config End of Buffer
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
\n
Cell Config End of Buffer
\n
"
);
/** Send to proxy */
/** Send to proxy */
sys_send_udp_msg
((
uint8_t
*
)
msg
,
msgLen
,
0
,
peerIpAddr
,
peerPort
,
msg_queued
,
timer_tinfo
);
sys_send_udp_msg
((
uint8_t
*
)
msg
,
msgLen
,
0
,
peerIpAddr
,
peerPort
,
msg_queued
,
timer_tinfo
);
...
@@ -1620,7 +1619,7 @@ static void sys_send_proxy(void *msg, int msgLen, int msg_queued, ss_set_timinfo
...
@@ -1620,7 +1619,7 @@ static void sys_send_proxy(void *msg, int msgLen, int msg_queued, ss_set_timinfo
*/
*/
static
void
sys_cell_attn_update
(
uint8_t
cellId
,
uint8_t
attnVal
,
int
CellIndex
,
int
msg_queued
,
ss_set_timinfo_t
timer_tinfo
)
static
void
sys_cell_attn_update
(
uint8_t
cellId
,
uint8_t
attnVal
,
int
CellIndex
,
int
msg_queued
,
ss_set_timinfo_t
timer_tinfo
)
{
{
LOG_A
(
ENB_SS
,
"In sys_cell_attn_update, cellIndex:%d
\n
"
,
CellIndex
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"In sys_cell_attn_update, cellIndex:%d
\n
"
,
CellIndex
);
attenuationConfigReq_t
*
attnConf
=
NULL
;
attenuationConfigReq_t
*
attnConf
=
NULL
;
uint32_t
peerIpAddr
;
uint32_t
peerIpAddr
;
uint16_t
peerPort
=
proxy_send_port
;
uint16_t
peerPort
=
proxy_send_port
;
...
@@ -1636,7 +1635,7 @@ static void sys_cell_attn_update(uint8_t cellId, uint8_t attnVal,int CellIndex,
...
@@ -1636,7 +1635,7 @@ static void sys_cell_attn_update(uint8_t cellId, uint8_t attnVal,int CellIndex,
/** Send to proxy */
/** Send to proxy */
sys_send_udp_msg
((
uint8_t
*
)
attnConf
,
sizeof
(
attenuationConfigReq_t
),
0
,
peerIpAddr
,
peerPort
,
msg_queued
,
timer_tinfo
);
sys_send_udp_msg
((
uint8_t
*
)
attnConf
,
sizeof
(
attenuationConfigReq_t
),
0
,
peerIpAddr
,
peerPort
,
msg_queued
,
timer_tinfo
);
LOG_A
(
ENB_SS
,
"Out sys_cell_attn_update
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"Out sys_cell_attn_update
\n
"
);
return
;
return
;
}
}
/*
/*
...
@@ -1657,10 +1656,10 @@ static void sys_handle_cell_attn_req(struct SYSTEM_CTRL_REQ *req)
...
@@ -1657,10 +1656,10 @@ static void sys_handle_cell_attn_req(struct SYSTEM_CTRL_REQ *req)
timer_tinfo
=
tinfo
;
timer_tinfo
=
tinfo
;
msg_queued
=
msg_can_be_queued
(
tinfo
,
&
timer_tinfo
);
msg_queued
=
msg_can_be_queued
(
tinfo
,
&
timer_tinfo
);
LOG_A
(
ENB_SS
,
"VT_TIMER SYS task received cell_attn MSG for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"VT_TIMER SYS task received cell_attn MSG for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
if
(
msg_queued
)
if
(
msg_queued
)
{
{
LOG_A
(
ENB_SS
,
"Cell_Attn Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d
\n
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"Cell_Attn Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
}
}
}
}
...
@@ -1673,21 +1672,21 @@ static void sys_handle_cell_attn_req(struct SYSTEM_CTRL_REQ *req)
...
@@ -1673,21 +1672,21 @@ static void sys_handle_cell_attn_req(struct SYSTEM_CTRL_REQ *req)
{
{
case
Attenuation_Type_Value
:
case
Attenuation_Type_Value
:
attnVal
=
CellAttenuationList
->
v
[
i
].
Attenuation
.
v
.
Value
;
attnVal
=
CellAttenuationList
->
v
[
i
].
Attenuation
.
v
.
Value
;
LOG_A
(
ENB_SS
,
"[SYS]
CellAttenuationList for Cell_id %d value %d dBm received
\n
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"
CellAttenuationList for Cell_id %d value %d dBm received
\n
"
,
cellId
,
attnVal
);
cellId
,
attnVal
);
sys_cell_attn_update
(
cellId
,
attnVal
,
CellIndex
,
msg_queued
,
timer_tinfo
);
sys_cell_attn_update
(
cellId
,
attnVal
,
CellIndex
,
msg_queued
,
timer_tinfo
);
break
;
break
;
case
Attenuation_Type_Off
:
case
Attenuation_Type_Off
:
attnVal
=
80
;
/* TODO: attnVal hardcoded currently but Need to handle proper Attenuation_Type_Off */
attnVal
=
80
;
/* TODO: attnVal hardcoded currently but Need to handle proper Attenuation_Type_Off */
LOG_A
(
ENB_SS
,
"[SYS]
CellAttenuationList turn off for Cell_id %d received with attnVal : %d
\n
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"
CellAttenuationList turn off for Cell_id %d received with attnVal : %d
\n
"
,
cellId
,
attnVal
);
cellId
,
attnVal
);
sys_cell_attn_update
(
cellId
,
attnVal
,
CellIndex
,
msg_queued
,
timer_tinfo
);
sys_cell_attn_update
(
cellId
,
attnVal
,
CellIndex
,
msg_queued
,
timer_tinfo
);
break
;
break
;
case
Attenuation_Type_UNBOUND_VALUE
:
case
Attenuation_Type_UNBOUND_VALUE
:
LOG_A
(
ENB_SS
,
"[SYS]
CellAttenuationList Attenuation_Type_UNBOUND_VALUE received
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
CellAttenuationList Attenuation_Type_UNBOUND_VALUE received
\n
"
);
break
;
break
;
default:
default:
LOG_A
(
ENB_SS
,
"[SYS]
Invalid CellAttenuationList received
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Invalid CellAttenuationList received
\n
"
);
}
}
}
}
}
}
...
@@ -1698,7 +1697,7 @@ static void sys_handle_cell_attn_req(struct SYSTEM_CTRL_REQ *req)
...
@@ -1698,7 +1697,7 @@ static void sys_handle_cell_attn_req(struct SYSTEM_CTRL_REQ *req)
static
void
sys_handle_paging_req
(
struct
PagingTrigger_Type
*
pagingRequest
,
ss_set_timinfo_t
tinfo
)
static
void
sys_handle_paging_req
(
struct
PagingTrigger_Type
*
pagingRequest
,
ss_set_timinfo_t
tinfo
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Enter sys_handle_paging_req Paging_IND for processing
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Enter sys_handle_paging_req Paging_IND for processing
\n
"
);
/** TODO: Considering only one cell for now */
/** TODO: Considering only one cell for now */
uint8_t
cellId
=
0
;
//(uint8_t)pagingRequ ->CellId;
uint8_t
cellId
=
0
;
//(uint8_t)pagingRequ ->CellId;
...
@@ -1775,10 +1774,10 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
...
@@ -1775,10 +1774,10 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
case
SQN_PagingUE_Identity_ng_5G_S_TMSI_r15
:
case
SQN_PagingUE_Identity_ng_5G_S_TMSI_r15
:
case
SQN_PagingUE_Identity_fullI_RNTI_r15
:
case
SQN_PagingUE_Identity_fullI_RNTI_r15
:
case
SQN_PagingUE_Identity_UNBOUND_VALUE
:
case
SQN_PagingUE_Identity_UNBOUND_VALUE
:
LOG_A
(
ENB_SS
,
"[SYS]
Error Unhandled Paging request
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Error Unhandled Paging request
\n
"
);
break
;
break
;
default
:
default
:
LOG_A
(
ENB_SS
,
"[SYS]
Invalid Pging request received
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Invalid Pging request received
\n
"
);
}
}
p_sdl_msg
++
;
p_sdl_msg
++
;
...
@@ -1788,7 +1787,7 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
...
@@ -1788,7 +1787,7 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
if
(
pagingRequest
->
Paging
.
message
.
v
.
c1
.
v
.
paging
.
systemInfoModification
.
d
)
if
(
pagingRequest
->
Paging
.
message
.
v
.
c1
.
v
.
paging
.
systemInfoModification
.
d
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
System Info Modification received in Paging request
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
System Info Modification received in Paging request
\n
"
);
if
(
SQN_Paging_systemInfoModification_e_true
==
pagingRequest
->
Paging
.
message
.
v
.
c1
.
v
.
paging
.
systemInfoModification
.
v
)
if
(
SQN_Paging_systemInfoModification_e_true
==
pagingRequest
->
Paging
.
message
.
v
.
c1
.
v
.
paging
.
systemInfoModification
.
v
)
{
{
SS_PAGING_IND
(
message_p
).
systemInfoModification
=
true
;
SS_PAGING_IND
(
message_p
).
systemInfoModification
=
true
;
...
@@ -1797,7 +1796,7 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
...
@@ -1797,7 +1796,7 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
}
}
if
(
pagingRequest
->
SubframeOffsetList
.
d
)
if
(
pagingRequest
->
SubframeOffsetList
.
d
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Subframe Offset List present in Paging request
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Subframe Offset List present in Paging request
\n
"
);
SS_PAGING_IND
(
message_p
).
bSubframeOffsetListPresent
=
true
;
SS_PAGING_IND
(
message_p
).
bSubframeOffsetListPresent
=
true
;
SS_PAGING_IND
(
message_p
).
subframeOffsetList
.
num
=
0
;
SS_PAGING_IND
(
message_p
).
subframeOffsetList
.
num
=
0
;
for
(
int
i
=
0
;
i
<
pagingRequest
->
SubframeOffsetList
.
v
.
d
;
i
++
)
for
(
int
i
=
0
;
i
<
pagingRequest
->
SubframeOffsetList
.
v
.
d
;
i
++
)
...
@@ -1810,23 +1809,23 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
...
@@ -1810,23 +1809,23 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
0
,
message_p
);
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
0
,
message_p
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Error sending Paging to RRC_ENB"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Error sending Paging to RRC_ENB"
);
}
}
oneTimeProcessingFlag
=
0
;
oneTimeProcessingFlag
=
0
;
LOG_A
(
ENB_SS
,
"[SYS]
Paging_IND for Cell_id %d sent to RRC
\n
"
,
cellId
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Paging_IND for Cell_id %d sent to RRC
\n
"
,
cellId
);
break
;
break
;
case
SQN_PCCH_MessageType_messageClassExtension
:
case
SQN_PCCH_MessageType_messageClassExtension
:
LOG_A
(
ENB_SS
,
"[SYS]
PCCH_MessageType_messageClassExtension for Cell_id %d received
\n
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"
PCCH_MessageType_messageClassExtension for Cell_id %d received
\n
"
,
cellId
);
cellId
);
break
;
break
;
case
SQN_PCCH_MessageType_UNBOUND_VALUE
:
case
SQN_PCCH_MessageType_UNBOUND_VALUE
:
LOG_A
(
ENB_SS
,
"[SYS]
Invalid Pging request received Type_UNBOUND_VALUE received
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Invalid Pging request received Type_UNBOUND_VALUE received
\n
"
);
break
;
break
;
default:
default:
LOG_A
(
ENB_SS
,
"[SYS]
Invalid Pging request received
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Invalid Pging request received
\n
"
);
}
}
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
LOG_A
(
ENB_SS
,
"[SYS]
Exit sys_handle_paging_req Paging_IND processing for Cell_id %d
\n
"
,
cellId
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Exit sys_handle_paging_req Paging_IND processing for Cell_id %d
\n
"
,
cellId
);
}
}
static
void
sys_vt_add_sf
(
uint16_t
*
frameP
,
uint8_t
*
subframeP
,
int
offset
)
static
void
sys_vt_add_sf
(
uint16_t
*
frameP
,
uint8_t
*
subframeP
,
int
offset
)
...
@@ -1843,14 +1842,14 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req)
...
@@ -1843,14 +1842,14 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req)
bool
resVal
=
true
;
bool
resVal
=
true
;
struct
L1Mac_IndicationControl_Type
*
L1MacInd_Ctrl
=
&
(
req
->
Request
.
v
.
L1MacIndCtrl
);
struct
L1Mac_IndicationControl_Type
*
L1MacInd_Ctrl
=
&
(
req
->
Request
.
v
.
L1MacIndCtrl
);
assert
(
L1MacInd_Ctrl
);
assert
(
L1MacInd_Ctrl
);
LOG_A
(
ENB_SS
,
"[SYS]
l1macind ctrl, RachPreamble=%d UL_HARQ=%d HarqError=%d
\n
"
,
L1MacInd_Ctrl
->
RachPreamble
.
d
,
L1MacInd_Ctrl
->
UL_HARQ
.
d
,
L1MacInd_Ctrl
->
HarqError
.
d
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
l1macind ctrl, RachPreamble=%d UL_HARQ=%d HarqError=%d
\n
"
,
L1MacInd_Ctrl
->
RachPreamble
.
d
,
L1MacInd_Ctrl
->
UL_HARQ
.
d
,
L1MacInd_Ctrl
->
HarqError
.
d
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
SS_L1MACIND_CTRL
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
SS_L1MACIND_CTRL
);
if
(
message_p
)
if
(
message_p
)
{
{
SS_L1MACIND_CTRL
(
message_p
).
cell_index
=
cell_index
;
SS_L1MACIND_CTRL
(
message_p
).
cell_index
=
cell_index
;
if
(
L1MacInd_Ctrl
->
RachPreamble
.
d
)
if
(
L1MacInd_Ctrl
->
RachPreamble
.
d
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
l1macind ctrl RachPreamble type %d received from TTCN
\n
"
,
L1MacInd_Ctrl
->
RachPreamble
.
v
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
l1macind ctrl RachPreamble type %d received from TTCN
\n
"
,
L1MacInd_Ctrl
->
RachPreamble
.
v
);
if
(
IndicationAndControlMode_enable
==
L1MacInd_Ctrl
->
RachPreamble
.
v
)
if
(
IndicationAndControlMode_enable
==
L1MacInd_Ctrl
->
RachPreamble
.
v
)
{
{
SS_L1MACIND_CTRL
(
message_p
).
rachpreamble_enable
=
true
;
SS_L1MACIND_CTRL
(
message_p
).
rachpreamble_enable
=
true
;
...
@@ -1862,7 +1861,7 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req)
...
@@ -1862,7 +1861,7 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req)
SS_L1MACIND_CTRL
(
message_p
).
UL_HARQ_Ctrl
=
IndCtrlMode_NOT_PRESENT
;
SS_L1MACIND_CTRL
(
message_p
).
UL_HARQ_Ctrl
=
IndCtrlMode_NOT_PRESENT
;
if
(
L1MacInd_Ctrl
->
UL_HARQ
.
d
)
if
(
L1MacInd_Ctrl
->
UL_HARQ
.
d
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
l1macind ctrl UL_HARQ type %d received from TTCN
\n
"
,
L1MacInd_Ctrl
->
UL_HARQ
.
v
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
l1macind ctrl UL_HARQ type %d received from TTCN
\n
"
,
L1MacInd_Ctrl
->
UL_HARQ
.
v
);
if
(
IndicationAndControlMode_enable
==
L1MacInd_Ctrl
->
UL_HARQ
.
v
)
if
(
IndicationAndControlMode_enable
==
L1MacInd_Ctrl
->
UL_HARQ
.
v
)
{
{
SS_L1MACIND_CTRL
(
message_p
).
UL_HARQ_Ctrl
=
IndCtrlMode_ENABLE
;
SS_L1MACIND_CTRL
(
message_p
).
UL_HARQ_Ctrl
=
IndCtrlMode_ENABLE
;
...
@@ -1875,7 +1874,7 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req)
...
@@ -1875,7 +1874,7 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req)
SS_L1MACIND_CTRL
(
message_p
).
HarqError_Ctrl
=
IndCtrlMode_NOT_PRESENT
;
SS_L1MACIND_CTRL
(
message_p
).
HarqError_Ctrl
=
IndCtrlMode_NOT_PRESENT
;
if
(
L1MacInd_Ctrl
->
HarqError
.
d
)
if
(
L1MacInd_Ctrl
->
HarqError
.
d
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
l1macind ctrl HarqError type %d received from TTCN
\n
"
,
L1MacInd_Ctrl
->
HarqError
.
v
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
l1macind ctrl HarqError type %d received from TTCN
\n
"
,
L1MacInd_Ctrl
->
HarqError
.
v
);
if
(
IndicationAndControlMode_enable
==
L1MacInd_Ctrl
->
HarqError
.
v
)
if
(
IndicationAndControlMode_enable
==
L1MacInd_Ctrl
->
HarqError
.
v
)
{
{
SS_L1MACIND_CTRL
(
message_p
).
HarqError_Ctrl
=
IndCtrlMode_ENABLE
;
SS_L1MACIND_CTRL
(
message_p
).
HarqError_Ctrl
=
IndCtrlMode_ENABLE
;
...
@@ -1885,26 +1884,26 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req)
...
@@ -1885,26 +1884,26 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req)
SS_L1MACIND_CTRL
(
message_p
).
HarqError_Ctrl
=
IndCtrlMode_DISABLE
;
SS_L1MACIND_CTRL
(
message_p
).
HarqError_Ctrl
=
IndCtrlMode_DISABLE
;
}
}
}
}
LOG_D
(
ENB_SS
,
"fxn:%s line:%d
\n
"
,
__FUNCTION__
,
__LINE__
);
LOG_D
(
ENB_SS
_SYS_TASK
,
"fxn:%s line:%d req->Common.TimingInfo.d:%d
\n
"
,
__FUNCTION__
,
__LINE__
,
req
->
Common
.
TimingInfo
.
d
);
uint8_t
msg_queued
=
0
;
uint8_t
msg_queued
=
0
;
if
(
req
->
Common
.
TimingInfo
.
d
==
TimingInfo_Type_SubFrame
)
if
(
req
->
Common
.
TimingInfo
.
d
==
TimingInfo_Type_SubFrame
)
{
{
LOG_D
(
ENB_SS
,
"fxn:%s line:%d
\n
"
,
__FUNCTION__
,
__LINE__
);
LOG_D
(
ENB_SS
_SYS_TASK
,
"fxn:%s line:%d
\n
"
,
__FUNCTION__
,
__LINE__
);
ss_set_timinfo_t
tinfo
,
timer_tinfo
;
ss_set_timinfo_t
tinfo
,
timer_tinfo
;
tinfo
.
sfn
=
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
v
.
Number
;
tinfo
.
sfn
=
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
v
.
Number
;
tinfo
.
sf
=
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
;
tinfo
.
sf
=
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
;
LOG_D
(
ENB_SS
,
"fxn:%s line:%d tinfo.sfn:%d tinfo.sf:%d
\n
"
,
__FUNCTION__
,
__LINE__
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_D
(
ENB_SS
_SYS_TASK
,
"fxn:%s line:%d tinfo.sfn:%d tinfo.sf:%d
\n
"
,
__FUNCTION__
,
__LINE__
,
tinfo
.
sfn
,
tinfo
.
sf
);
timer_tinfo
=
tinfo
;
timer_tinfo
=
tinfo
;
msg_queued
=
msg_can_be_queued
(
tinfo
,
&
timer_tinfo
);
msg_queued
=
msg_can_be_queued
(
tinfo
,
&
timer_tinfo
);
LOG_A
(
ENB_SS
,
"VT_TIMER SYS task received MSG for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"VT_TIMER SYS task received MSG for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
if
(
msg_queued
)
if
(
msg_queued
)
{
{
sys_vt_add_sf
(
&
timer_tinfo
.
sfn
,
&
timer_tinfo
.
sf
,
4
);
sys_vt_add_sf
(
&
timer_tinfo
.
sfn
,
&
timer_tinfo
.
sf
,
4
);
msg_queued
=
vt_timer_setup
(
timer_tinfo
,
TASK_MAC_ENB
,
0
,
message_p
);
msg_queued
=
vt_timer_setup
(
timer_tinfo
,
TASK_MAC_ENB
,
0
,
message_p
);
}
}
LOG_A
(
ENB_SS
,
"RRC_PDU Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"RRC_PDU Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
}
}
...
@@ -1913,9 +1912,9 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req)
...
@@ -1913,9 +1912,9 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req)
int
send_res
=
itti_send_msg_to_task
(
TASK_MAC_ENB
,
0
,
message_p
);
int
send_res
=
itti_send_msg_to_task
(
TASK_MAC_ENB
,
0
,
message_p
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Error sending to MAC"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Error sending to MAC"
);
}
}
LOG_A
(
ENB_SS
,
"Send res: %d
"
,
send_res
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"Send res: %d
\n
"
,
send_res
);
}
}
}
}
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
...
@@ -1939,7 +1938,7 @@ static void sys_handle_ue_cat_info_req(struct UE_CategoryInfo_Type *UE_Cat_Info)
...
@@ -1939,7 +1938,7 @@ static void sys_handle_ue_cat_info_req(struct UE_CategoryInfo_Type *UE_Cat_Info)
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
RRC_UE_CAT_INFO
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
RRC_UE_CAT_INFO
);
if
(
message_p
)
if
(
message_p
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
UE Category Info received
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
UE Category Info received
\n
"
);
RRC_UE_CAT_INFO
(
message_p
).
ue_Category
=
UE_Cat_Info
->
ue_Category
;
RRC_UE_CAT_INFO
(
message_p
).
ue_Category
=
UE_Cat_Info
->
ue_Category
;
if
(
UE_Cat_Info
->
ue_Category_V1020
.
d
==
true
)
if
(
UE_Cat_Info
->
ue_Category_V1020
.
d
==
true
)
{
{
...
@@ -1994,7 +1993,7 @@ static void sys_handle_ue_cat_info_req(struct UE_CategoryInfo_Type *UE_Cat_Info)
...
@@ -1994,7 +1993,7 @@ static void sys_handle_ue_cat_info_req(struct UE_CategoryInfo_Type *UE_Cat_Info)
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
0
,
message_p
);
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
0
,
message_p
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Error sending RRC_UE_CAT_INFO to TASK_RRC_ENB"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Error sending RRC_UE_CAT_INFO to TASK_RRC_ENB"
);
}
}
}
}
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
...
@@ -2023,7 +2022,7 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
...
@@ -2023,7 +2022,7 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
MessageDef
*
msg_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
RRC_AS_SECURITY_CONFIG_REQ
);
MessageDef
*
msg_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
RRC_AS_SECURITY_CONFIG_REQ
);
if
(
msg_p
)
if
(
msg_p
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
AS Security Request Received
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
AS Security Request Received
\n
"
);
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
rnti
=
SS_context
.
SSCell_list
[
cell_index
].
ss_rnti_g
;
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
rnti
=
SS_context
.
SSCell_list
[
cell_index
].
ss_rnti_g
;
if
(
ASSecurity
->
d
==
AS_Security_Type_StartRestart
)
if
(
ASSecurity
->
d
==
AS_Security_Type_StartRestart
)
{
{
...
@@ -2036,7 +2035,7 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
...
@@ -2036,7 +2035,7 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
memset
(
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Integrity
.
kRRCint
,
0
,
32
);
memset
(
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Integrity
.
kRRCint
,
0
,
32
);
bitStrint_to_byteArray
(
ASSecurity
->
v
.
StartRestart
.
Integrity
.
v
.
KRRCint
,
256
,
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Integrity
.
kRRCint
,
intKey
);
bitStrint_to_byteArray
(
ASSecurity
->
v
.
StartRestart
.
Integrity
.
v
.
KRRCint
,
256
,
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Integrity
.
kRRCint
,
intKey
);
for
(
int
j
=
0
;
j
<
32
;
j
++
)
{
for
(
int
j
=
0
;
j
<
32
;
j
++
)
{
LOG_A
(
ENB_SS
,
"[SYS]
KRRCint in SS: %02x
\n
"
,
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Integrity
.
kRRCint
[
j
]);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
KRRCint in SS: %02x
\n
"
,
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Integrity
.
kRRCint
[
j
]);
}
}
if
(
ASSecurity
->
v
.
StartRestart
.
Integrity
.
v
.
ActTimeList
.
d
==
true
)
if
(
ASSecurity
->
v
.
StartRestart
.
Integrity
.
v
.
ActTimeList
.
d
==
true
)
{
{
...
@@ -2053,7 +2052,7 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
...
@@ -2053,7 +2052,7 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
case
RadioBearerId_Type_UNBOUND_VALUE
:
case
RadioBearerId_Type_UNBOUND_VALUE
:
break
;
break
;
default:
default:
LOG_A
(
ENB_SS
,
"[SYS]
AS Security Act time list is Invalid
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
AS Security Act time list is Invalid
\n
"
);
}
}
if
(
ASSecurity
->
v
.
StartRestart
.
Integrity
.
v
.
ActTimeList
.
v
.
v
[
i
].
UL
.
d
==
PDCP_ActTime_Type_SQN
)
if
(
ASSecurity
->
v
.
StartRestart
.
Integrity
.
v
.
ActTimeList
.
v
.
v
[
i
].
UL
.
d
==
PDCP_ActTime_Type_SQN
)
{
{
...
@@ -2077,13 +2076,13 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
...
@@ -2077,13 +2076,13 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
memset
(
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kRRCenc
,
0
,
16
);
memset
(
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kRRCenc
,
0
,
16
);
bitStrint_to_byteArray
(
ASSecurity
->
v
.
StartRestart
.
Ciphering
.
v
.
KRRCenc
,
128
,
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kRRCenc
,
intKey
);
bitStrint_to_byteArray
(
ASSecurity
->
v
.
StartRestart
.
Ciphering
.
v
.
KRRCenc
,
128
,
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kRRCenc
,
intKey
);
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
LOG_A
(
ENB_SS
,
"[SYS]
kRRCenc in SS: %02x
\n
"
,
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kRRCenc
[
i
]);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
kRRCenc in SS: %02x
\n
"
,
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kRRCenc
[
i
]);
}
}
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kUPenc
=
CALLOC
(
1
,
16
);
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kUPenc
=
CALLOC
(
1
,
16
);
memset
(
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kUPenc
,
0
,
16
);
memset
(
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kUPenc
,
0
,
16
);
bitStrint_to_byteArray
(
ASSecurity
->
v
.
StartRestart
.
Ciphering
.
v
.
KUPenc
,
128
,
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kUPenc
,
intKey
);
bitStrint_to_byteArray
(
ASSecurity
->
v
.
StartRestart
.
Ciphering
.
v
.
KUPenc
,
128
,
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kUPenc
,
intKey
);
for
(
int
k
=
0
;
k
<
16
;
k
++
)
{
for
(
int
k
=
0
;
k
<
16
;
k
++
)
{
LOG_A
(
ENB_SS
,
"[SYS]
kUPenc in SS: %02x
\n
"
,
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kUPenc
[
k
]);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
kUPenc in SS: %02x
\n
"
,
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
Ciphering
.
kUPenc
[
k
]);
}
}
LOG_A
(
ENB_SS
,
"[SYS] Ciphering ActTimeList.d = %lu
\n
"
,
ASSecurity
->
v
.
StartRestart
.
Ciphering
.
v
.
ActTimeList
.
d
);
LOG_A
(
ENB_SS
,
"[SYS] Ciphering ActTimeList.d = %lu
\n
"
,
ASSecurity
->
v
.
StartRestart
.
Ciphering
.
v
.
ActTimeList
.
d
);
for
(
int
i
=
0
;
i
<
ASSecurity
->
v
.
StartRestart
.
Ciphering
.
v
.
ActTimeList
.
d
;
i
++
)
for
(
int
i
=
0
;
i
<
ASSecurity
->
v
.
StartRestart
.
Ciphering
.
v
.
ActTimeList
.
d
;
i
++
)
...
@@ -2099,7 +2098,7 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
...
@@ -2099,7 +2098,7 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
case
RadioBearerId_Type_UNBOUND_VALUE
:
case
RadioBearerId_Type_UNBOUND_VALUE
:
break
;
break
;
default:
default:
LOG_A
(
ENB_SS
,
"[SYS]
AS Security Act time list is Invalid
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
AS Security Act time list is Invalid
\n
"
);
}
}
if
(
ASSecurity
->
v
.
StartRestart
.
Ciphering
.
v
.
ActTimeList
.
v
[
i
].
UL
.
d
==
PDCP_ActTime_Type_SQN
)
if
(
ASSecurity
->
v
.
StartRestart
.
Ciphering
.
v
.
ActTimeList
.
v
[
i
].
UL
.
d
==
PDCP_ActTime_Type_SQN
)
{
{
...
@@ -2123,10 +2122,12 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
...
@@ -2123,10 +2122,12 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
timer_tinfo
=
tinfo
;
timer_tinfo
=
tinfo
;
msg_queued
=
msg_can_be_queued
(
tinfo
,
&
timer_tinfo
);
msg_queued
=
msg_can_be_queued
(
tinfo
,
&
timer_tinfo
);
LOG_A
(
ENB_SS
,
"VT_TIMER SYS task received MSG for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"VT_TIMER SYS task received MSG for future SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
if
(
msg_queued
)
if
(
msg_queued
)
{
{
msg_queued
=
vt_timer_setup
(
timer_tinfo
,
TASK_RRC_ENB
,
0
,
msg_p
);
msg_queued
=
vt_timer_setup
(
timer_tinfo
,
TASK_RRC_ENB
,
0
,
msg_p
);
LOG_A
(
ENB_SS_SYS_TASK
,
"AS Security Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
}
}
LOG_A
(
ENB_SS
,
"AS_Security Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d
\n
"
,
LOG_A
(
ENB_SS
,
"AS_Security Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
...
@@ -2136,13 +2137,13 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
...
@@ -2136,13 +2137,13 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
0
,
msg_p
);
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
0
,
msg_p
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SYS] Error sending RRC_AS_SECURITY_CONFIG_REQ to RRC_ENB
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"Error sending RRC_AS_SECURITY_CONFIG_REQ to RRC_ENB
"
);
}
}
}
}
}
}
else
if
(
ASSecurity
->
d
==
AS_Security_Type_Release
)
else
if
(
ASSecurity
->
d
==
AS_Security_Type_Release
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
AS_Security_Type_Release received
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
AS_Security_Type_Release received
\n
"
);
}
}
}
}
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
...
@@ -2161,41 +2162,41 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
...
@@ -2161,41 +2162,41 @@ static void sys_handle_as_security_req(struct SYSTEM_CTRL_REQ *req)
*/
*/
static
void
ss_task_sys_handle_req
(
struct
SYSTEM_CTRL_REQ
*
req
,
ss_set_timinfo_t
*
tinfo
)
static
void
ss_task_sys_handle_req
(
struct
SYSTEM_CTRL_REQ
*
req
,
ss_set_timinfo_t
*
tinfo
)
{
{
LOG_A
(
ENB_SS
,
"swetank1212: SFN:%d SF:%d
\n
"
,
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
v
.
Number
,
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"swetank1212: SFN:%d SF:%d
\n
"
,
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
v
.
Number
,
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
);
if
(
req
->
Common
.
CellId
){
if
(
req
->
Common
.
CellId
){
cell_index
=
get_cell_index
(
req
->
Common
.
CellId
,
SS_context
.
SSCell_list
);
cell_index
=
get_cell_index
(
req
->
Common
.
CellId
,
SS_context
.
SSCell_list
);
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
=
req
->
Common
.
CellId
;
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
=
req
->
Common
.
CellId
;
LOG_A
(
ENB_SS
,
"[SYS]
cell_index: %d eutra_cellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
cell_index: %d eutra_cellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
);
printf
(
"
[SYS]
cell_index: %d eutra_cellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
);
printf
(
"cell_index: %d eutra_cellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
);
}
}
int
enterState
=
SS_context
.
SSCell_list
[
cell_index
].
State
;
int
enterState
=
SS_context
.
SSCell_list
[
cell_index
].
State
;
int
exitState
=
SS_context
.
SSCell_list
[
cell_index
].
State
;
int
exitState
=
SS_context
.
SSCell_list
[
cell_index
].
State
;
LOG_A
(
ENB_SS
,
"[SYS]
Current SS_STATE %d received SystemRequest_Type %d eutra_cellId %d cnf_flag %d
\n
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Current SS_STATE %d received SystemRequest_Type %d eutra_cellId %d cnf_flag %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
,
req
->
Common
.
ControlInfo
.
CnfFlag
);
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
,
req
->
Common
.
ControlInfo
.
CnfFlag
);
switch
(
SS_context
.
SSCell_list
[
cell_index
].
State
)
switch
(
SS_context
.
SSCell_list
[
cell_index
].
State
)
{
{
case
SS_STATE_NOT_CONFIGURED
:
case
SS_STATE_NOT_CONFIGURED
:
if
(
req
->
Request
.
d
==
SystemRequest_Type_Cell
)
if
(
req
->
Request
.
d
==
SystemRequest_Type_Cell
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
SystemRequest_Type_Cell received
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SystemRequest_Type_Cell received
\n
"
);
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
=
req
->
Request
.
v
.
Cell
.
v
.
AddOrReconfigure
.
Basic
.
v
.
StaticCellInfo
.
v
.
Common
.
PhysicalCellId
;
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
=
req
->
Request
.
v
.
Cell
.
v
.
AddOrReconfigure
.
Basic
.
v
.
StaticCellInfo
.
v
.
Common
.
PhysicalCellId
;
exitState
=
sys_handle_cell_config_req
(
req
);
exitState
=
sys_handle_cell_config_req
(
req
);
LOG_A
(
ENB_SS
,
"[SYS]
SS_STATE_NOT_CONFIGURED: PhysicalCellId is %d in SS_context
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SS_STATE_NOT_CONFIGURED: PhysicalCellId is %d in SS_context
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
SS_context
.
SSCell_list
[
cell_index
].
State
=
exitState
;
SS_context
.
SSCell_list
[
cell_index
].
State
=
exitState
;
if
(
RC
.
ss
.
State
<=
SS_STATE_CELL_CONFIGURED
)
if
(
RC
.
ss
.
State
<=
SS_STATE_CELL_CONFIGURED
)
RC
.
ss
.
State
=
exitState
;
RC
.
ss
.
State
=
exitState
;
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
LOG_A
(
ENB_SS_SYS_TASK
,
"
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
);
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
);
}
}
break
;
break
;
case
SS_STATE_CELL_CONFIGURED
:
case
SS_STATE_CELL_CONFIGURED
:
if
(
req
->
Request
.
d
==
SystemRequest_Type_RadioBearerList
)
if
(
req
->
Request
.
d
==
SystemRequest_Type_RadioBearerList
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
SystemRequest_Type_RadioBearerList received
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SystemRequest_Type_RadioBearerList received
\n
"
);
exitState
=
sys_handle_radiobearer_list
(
req
);
exitState
=
sys_handle_radiobearer_list
(
req
);
SS_context
.
SSCell_list
[
cell_index
].
State
=
exitState
;
SS_context
.
SSCell_list
[
cell_index
].
State
=
exitState
;
if
(
RC
.
ss
.
State
<=
SS_STATE_CELL_CONFIGURED
)
if
(
RC
.
ss
.
State
<=
SS_STATE_CELL_CONFIGURED
)
...
@@ -2203,7 +2204,7 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
...
@@ -2203,7 +2204,7 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
LOG_A
(
ENB_SS_SYS_TASK
,
"
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
);
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
);
}
}
break
;
break
;
...
@@ -2214,29 +2215,28 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
...
@@ -2214,29 +2215,28 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
switch
(
req
->
Request
.
d
)
switch
(
req
->
Request
.
d
)
{
{
case
SystemRequest_Type_Cell
:
case
SystemRequest_Type_Cell
:
LOG_A
(
ENB_SS
,
"[SYS]
SystemRequest_Type_Cell received
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SystemRequest_Type_Cell received
\n
"
);
exitState
=
sys_handle_cell_config_req
(
req
);
exitState
=
sys_handle_cell_config_req
(
req
);
LOG_A
(
ENB_SS
,
"[SYS]
SS_STATE_CELL_ACTIVE: PhysicalCellId is %d in SS_context
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SS_STATE_CELL_ACTIVE: PhysicalCellId is %d in SS_context
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
SS_context
.
SSCell_list
[
cell_index
].
State
=
exitState
;
SS_context
.
SSCell_list
[
cell_index
].
State
=
exitState
;
if
(
RC
.
ss
.
State
<=
SS_STATE_CELL_ACTIVE
)
if
(
RC
.
ss
.
State
<=
SS_STATE_CELL_ACTIVE
)
RC
.
ss
.
State
=
exitState
;
RC
.
ss
.
State
=
exitState
;
break
;
break
;
case
SystemRequest_Type_RadioBearerList
:
case
SystemRequest_Type_RadioBearerList
:
LOG_A
(
ENB_SS
,
"[SYS]
SystemRequest_Type_RadioBearerList received in SS_STATE_CELL_ACTIVE state
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SystemRequest_Type_RadioBearerList received in SS_STATE_CELL_ACTIVE state
\n
"
);
exitState
=
sys_handle_radiobearer_list
(
req
);
exitState
=
sys_handle_radiobearer_list
(
req
);
SS_context
.
SSCell_list
[
cell_index
].
State
=
exitState
;
SS_context
.
SSCell_list
[
cell_index
].
State
=
exitState
;
if
(
RC
.
ss
.
State
<=
SS_STATE_CELL_ACTIVE
)
if
(
RC
.
ss
.
State
<=
SS_STATE_CELL_ACTIVE
)
RC
.
ss
.
State
=
exitState
;
RC
.
ss
.
State
=
exitState
;
break
;
break
;
case
SystemRequest_Type_CellAttenuationList
:
case
SystemRequest_Type_CellAttenuationList
:
LOG_A
(
ENB_SS
,
"[SYS]
SystemRequest_Type_CellAttenuationList received
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SystemRequest_Type_CellAttenuationList received
\n
"
);
sys_handle_cell_attn_req
(
req
);
sys_handle_cell_attn_req
(
req
);
break
;
break
;
case
SystemRequest_Type_PdcpCount
:
case
SystemRequest_Type_PdcpCount
:
LOG_A
(
ENB_SS
,
"[SYS]
SystemRequest_Type PDCP_Count received
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SystemRequest_Type PDCP_Count received
\n
"
);
sys_handle_pdcp_count_req
(
&
(
req
->
Request
.
v
.
PdcpCount
));
sys_handle_pdcp_count_req
(
&
(
req
->
Request
.
v
.
PdcpCount
));
break
;
break
;
case
SystemRequest_Type_PdcpHandoverControl
:
case
SystemRequest_Type_PdcpHandoverControl
:
LOG_A
(
ENB_SS
,
"[SYS] SystemRequest_Type PdcpHandoverControl received
\n
"
);
LOG_A
(
ENB_SS
,
"[SYS] SystemRequest_Type PdcpHandoverControl received
\n
"
);
enum
SystemConfirm_Type_Sel
cnfType
=
SystemConfirm_Type_PdcpHandoverControl
;
enum
SystemConfirm_Type_Sel
cnfType
=
SystemConfirm_Type_PdcpHandoverControl
;
...
@@ -2244,19 +2244,18 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
...
@@ -2244,19 +2244,18 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
bool
resVal
=
true
;
bool
resVal
=
true
;
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
break
;
break
;
case
SystemRequest_Type_AS_Security
:
case
SystemRequest_Type_AS_Security
:
LOG_A
(
ENB_SS
,
"[SYS]
SystemRequest_Type_AS_Security received
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SystemRequest_Type_AS_Security received
\n
"
);
sys_handle_as_security_req
(
req
);
sys_handle_as_security_req
(
req
);
break
;
break
;
case
SystemRequest_Type_UE_Cat_Info
:
case
SystemRequest_Type_UE_Cat_Info
:
LOG_A
(
ENB_SS
,
"[SYS]
SystemRequest_Type UE_Cat received
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SystemRequest_Type UE_Cat received
\n
"
);
sys_handle_ue_cat_info_req
(
&
(
req
->
Request
.
v
.
UE_Cat_Info
));
sys_handle_ue_cat_info_req
(
&
(
req
->
Request
.
v
.
UE_Cat_Info
));
break
;
break
;
case
SystemRequest_Type_Paging
:
case
SystemRequest_Type_Paging
:
LOG_A
(
ENB_SS
,
"[SYS]
SystemRequest_Type Paging received
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SystemRequest_Type Paging received
\n
"
);
ss_set_timinfo_t
pg_timinfo
;
ss_set_timinfo_t
pg_timinfo
;
pg_timinfo
.
sfn
=
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
v
.
Number
;
pg_timinfo
.
sfn
=
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
SFN
.
v
.
Number
;
pg_timinfo
.
sf
=
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
;
pg_timinfo
.
sf
=
req
->
Common
.
TimingInfo
.
v
.
SubFrame
.
Subframe
.
v
.
Number
;
...
@@ -2264,48 +2263,48 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
...
@@ -2264,48 +2263,48 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
break
;
break
;
case
SystemRequest_Type_L1MacIndCtrl
:
case
SystemRequest_Type_L1MacIndCtrl
:
LOG_A
(
ENB_SS
,
"[SYS]
SystemRequest_Type L1MacIndCtrl received
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SystemRequest_Type L1MacIndCtrl received
\n
"
);
sys_handle_l1macind_ctrl
(
req
);
sys_handle_l1macind_ctrl
(
req
);
break
;
break
;
case
SystemRequest_Type_PdcchOrder
:
case
SystemRequest_Type_PdcchOrder
:
LOG_A
(
ENB_SS
,
"[SYS]
SystemRequest_Type_PdcchOrder received
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SystemRequest_Type_PdcchOrder received
\n
"
);
sys_handle_pdcch_order
(
&
req
->
Request
.
v
.
PdcchOrder
);
sys_handle_pdcch_order
(
&
req
->
Request
.
v
.
PdcchOrder
);
break
;
break
;
case
SystemRequest_Type_UNBOUND_VALUE
:
case
SystemRequest_Type_UNBOUND_VALUE
:
LOG_A
(
ENB_SS
,
"[SYS]
SystemRequest_Type_UNBOUND_VALUE received
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
SystemRequest_Type_UNBOUND_VALUE received
\n
"
);
break
;
break
;
default:
default:
LOG_A
(
ENB_SS
,
"[SYS]
Error ! Invalid SystemRequest_Type received
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
Error ! Invalid SystemRequest_Type received
\n
"
);
}
}
break
;
break
;
case
SS_STATE_AS_SECURITY_ACTIVE
:
case
SS_STATE_AS_SECURITY_ACTIVE
:
if
(
req
->
Request
.
d
==
SystemRequest_Type_RadioBearerList
)
if
(
req
->
Request
.
d
==
SystemRequest_Type_RadioBearerList
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
ERROR!!! TODO SystemRequest_Type_RadioBearerList received
\n
"
);
LOG_A
(
ENB_SS_SYS_TASK
,
"
ERROR!!! TODO SystemRequest_Type_RadioBearerList received
\n
"
);
//sys_handle_cell_config_req(&(req->Request.v.Cell));
//sys_handle_cell_config_req(&(req->Request.v.Cell));
//RC.ss.State = SS_STATE_AS_RBS_ACTIVE;
//RC.ss.State = SS_STATE_AS_RBS_ACTIVE;
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
LOG_A
(
ENB_SS_SYS_TASK
,
"
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
);
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
);
}
}
break
;
break
;
case
SS_STATE_AS_RBS_ACTIVE
:
case
SS_STATE_AS_RBS_ACTIVE
:
LOG_A
(
ENB_SS
,
"[SYS]
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
LOG_A
(
ENB_SS_SYS_TASK
,
"
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
);
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
);
break
;
break
;
default:
default:
LOG_A
(
ENB_SS
,
"[SYS]
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
LOG_A
(
ENB_SS_SYS_TASK
,
"
Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
);
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
);
break
;
break
;
}
}
LOG_A
(
ENB_SS
,
"[SYS]
Current SS_STATE %d New SS_STATE %d received SystemRequest_Type %d
\n
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Current SS_STATE %d New SS_STATE %d received SystemRequest_Type %d
\n
"
,
enterState
,
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
);
enterState
,
SS_context
.
SSCell_list
[
cell_index
].
State
,
req
->
Request
.
d
);
}
}
/*
/*
...
@@ -2336,7 +2335,7 @@ bool valid_sys_msg(struct SYSTEM_CTRL_REQ *req)
...
@@ -2336,7 +2335,7 @@ bool valid_sys_msg(struct SYSTEM_CTRL_REQ *req)
// return FALSE;
// return FALSE;
// }
// }
LOG_A
(
ENB_SS
,
"[SYS]
received req : %d for cell %d SS_context.SSCell_list[cell_index].State %d
\n
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"
received req : %d for cell %d SS_context.SSCell_list[cell_index].State %d
\n
"
,
req
->
Request
.
d
,
req
->
Common
.
CellId
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
req
->
Request
.
d
,
req
->
Common
.
CellId
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
switch
(
req
->
Request
.
d
)
switch
(
req
->
Request
.
d
)
{
{
...
@@ -2352,6 +2351,10 @@ bool valid_sys_msg(struct SYSTEM_CTRL_REQ *req)
...
@@ -2352,6 +2351,10 @@ bool valid_sys_msg(struct SYSTEM_CTRL_REQ *req)
cnfType
=
SystemConfirm_Type_Cell
;
cnfType
=
SystemConfirm_Type_Cell
;
}
}
break
;
break
;
case
SystemRequest_Type_EnquireTiming
:
sendDummyCnf
=
false
;
break
;
case
SystemRequest_Type_CellAttenuationList
:
case
SystemRequest_Type_CellAttenuationList
:
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
==
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
==
SS_STATE_CELL_ACTIVE
)
{
{
...
@@ -2416,7 +2419,7 @@ bool valid_sys_msg(struct SYSTEM_CTRL_REQ *req)
...
@@ -2416,7 +2419,7 @@ bool valid_sys_msg(struct SYSTEM_CTRL_REQ *req)
if
(
sendDummyCnf
)
if
(
sendDummyCnf
)
{
{
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
LOG_A
(
ENB_SS
,
"[SYS]
Sending Dummy OK Req %d cnTfype %d ResType %d ResValue %d
\n
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Sending Dummy OK Req %d cnTfype %d ResType %d ResValue %d
\n
"
,
req
->
Request
.
d
,
cnfType
,
resType
,
resVal
);
req
->
Request
.
d
,
cnfType
,
resType
,
resVal
);
}
}
return
valid
;
return
valid
;
...
@@ -2465,27 +2468,26 @@ void *ss_eNB_sys_process_itti_msg(void *notUsed)
...
@@ -2465,27 +2468,26 @@ void *ss_eNB_sys_process_itti_msg(void *notUsed)
case
SS_GET_TIM_INFO
:
case
SS_GET_TIM_INFO
:
{
{
LOG_A
(
ENB_SS
,
"[SYS]
received GET_TIM_INFO SFN: %d SF: %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
received GET_TIM_INFO SFN: %d SF: %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
ss_task_sys_handle_timing_info
(
&
tinfo
);
ss_task_sys_handle_timing_info
(
&
tinfo
);
}
}
break
;
break
;
case
SS_SYS_PORT_MSG_IND
:
case
SS_SYS_PORT_MSG_IND
:
{
{
if
(
valid_sys_msg
(
SS_SYS_PORT_MSG_IND
(
received_msg
).
req
))
if
(
valid_sys_msg
(
SS_SYS_PORT_MSG_IND
(
received_msg
).
req
))
{
{
ss_task_sys_handle_req
(
SS_SYS_PORT_MSG_IND
(
received_msg
).
req
,
&
tinfo
);
ss_task_sys_handle_req
(
SS_SYS_PORT_MSG_IND
(
received_msg
).
req
,
&
tinfo
);
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Not hanled SYS_PORT message received
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Not hanled SYS_PORT message received
\n
"
);
}
}
}
}
break
;
break
;
case
SS_VNG_PROXY_REQ
:
{
case
SS_VNG_PROXY_REQ
:
{
LOG_A
(
ENB_SS
,
"[SYS]
received %s from %s
\n
"
,
ITTI_MSG_NAME
(
received_msg
),
LOG_A
(
ENB_SS
_SYS_TASK
,
"
received %s from %s
\n
"
,
ITTI_MSG_NAME
(
received_msg
),
ITTI_MSG_ORIGIN_NAME
(
received_msg
));
ITTI_MSG_ORIGIN_NAME
(
received_msg
));
VngCmdReq_t
*
req
=
(
VngCmdReq_t
*
)
malloc
(
sizeof
(
VngCmdReq_t
));
VngCmdReq_t
*
req
=
(
VngCmdReq_t
*
)
malloc
(
sizeof
(
VngCmdReq_t
));
...
@@ -2499,7 +2501,7 @@ printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
...
@@ -2499,7 +2501,7 @@ printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
req
->
cmd
=
SS_VNG_PROXY_REQ
(
received_msg
).
cmd
;
req
->
cmd
=
SS_VNG_PROXY_REQ
(
received_msg
).
cmd
;
req
->
NocLevel
=
SS_VNG_PROXY_REQ
(
received_msg
).
Noc_level
;
req
->
NocLevel
=
SS_VNG_PROXY_REQ
(
received_msg
).
Noc_level
;
LOG_A
(
ENB_SS
,
"VNG Command for cell_id: %d CMD %d "
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"VNG Command for cell_id: %d CMD %d "
,
req
->
header
.
cell_id
,
req
->
cmd
);
req
->
header
.
cell_id
,
req
->
cmd
);
ss_set_timinfo_t
timer_tinfo
=
{
0
};
ss_set_timinfo_t
timer_tinfo
=
{
0
};
sys_send_proxy
((
void
*
)
req
,
sizeof
(
VngCmdReq_t
),
0
,
timer_tinfo
);
sys_send_proxy
((
void
*
)
req
,
sizeof
(
VngCmdReq_t
),
0
,
timer_tinfo
);
...
@@ -2508,7 +2510,7 @@ printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
...
@@ -2508,7 +2510,7 @@ printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
case
SS_GET_PDCP_CNT
:
/** FIXME */
case
SS_GET_PDCP_CNT
:
/** FIXME */
{
{
LOG_A
(
ENB_SS
,
"[SYS]
received SS_GET_PDCP_CNT Count from PDCP size %d
\n
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"
received SS_GET_PDCP_CNT Count from PDCP size %d
\n
"
,
SS_GET_PDCP_CNT
(
received_msg
).
size
);
SS_GET_PDCP_CNT
(
received_msg
).
size
);
enum
SystemConfirm_Type_Sel
cnfType
=
SystemConfirm_Type_PdcpCount
;
enum
SystemConfirm_Type_Sel
cnfType
=
SystemConfirm_Type_PdcpCount
;
enum
ConfirmationResult_Type_Sel
resType
=
ConfirmationResult_Type_Success
;
enum
ConfirmationResult_Type_Sel
resType
=
ConfirmationResult_Type_Success
;
...
@@ -2551,7 +2553,7 @@ printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
...
@@ -2551,7 +2553,7 @@ printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
proxy_ss_header_t
hdr
;
proxy_ss_header_t
hdr
;
attenuationConfigCnf_t
attnCnf
;
attenuationConfigCnf_t
attnCnf
;
VngCmdResp_t
VngResp
;
VngCmdResp_t
VngResp
;
LOG_A
(
ENB_SS
,
"[SYS]
received UDP_DATA_IND
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
received UDP_DATA_IND
\n
"
);
enum
SystemConfirm_Type_Sel
cnfType
;
enum
SystemConfirm_Type_Sel
cnfType
;
enum
ConfirmationResult_Type_Sel
resType
=
ConfirmationResult_Type_Success
;
enum
ConfirmationResult_Type_Sel
resType
=
ConfirmationResult_Type_Success
;
bool
resVal
=
true
;
bool
resVal
=
true
;
...
@@ -2565,7 +2567,7 @@ printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
...
@@ -2565,7 +2567,7 @@ printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
cnfType
=
SystemConfirm_Type_CellAttenuationList
;
cnfType
=
SystemConfirm_Type_CellAttenuationList
;
memcpy
(
&
attnCnf
,
(
SS_SYS_PROXY_MSG_CNF
(
received_msg
).
buffer
),
sizeof
(
attenuationConfigCnf_t
));
memcpy
(
&
attnCnf
,
(
SS_SYS_PROXY_MSG_CNF
(
received_msg
).
buffer
),
sizeof
(
attenuationConfigCnf_t
));
if
(
false
==
SS_context
.
send_atten_cnf
)
{
if
(
false
==
SS_context
.
send_atten_cnf
)
{
LOG_A
(
ENB_SS
,
"[SYS]
received Cell_Attenuation_Cnf from Proxy for cell : %d
\n
"
,
attnCnf
.
header
.
cell_id
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
received Cell_Attenuation_Cnf from Proxy for cell : %d
\n
"
,
attnCnf
.
header
.
cell_id
);
SS_context
.
send_atten_cnf
=
true
;
SS_context
.
send_atten_cnf
=
true
;
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
}
}
...
@@ -2581,16 +2583,16 @@ printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
...
@@ -2581,16 +2583,16 @@ printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
SS_VNG_PROXY_RESP
(
vng_resp_p
).
sfn_sf
=
(
tinfo
.
sfn
<<
4
|
tinfo
.
sf
);
SS_VNG_PROXY_RESP
(
vng_resp_p
).
sfn_sf
=
(
tinfo
.
sfn
<<
4
|
tinfo
.
sf
);
SS_VNG_PROXY_RESP
(
vng_resp_p
).
status
=
VngResp
.
status
;
SS_VNG_PROXY_RESP
(
vng_resp_p
).
status
=
VngResp
.
status
;
LOG_A
(
ENB_SS
,
"Sending CMD_RESP for CNF @ sfn: %d sf: %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"Sending CMD_RESP for CNF @ sfn: %d sf: %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
int
res
=
itti_send_msg_to_task
(
TASK_VNG
,
0
,
vng_resp_p
);
int
res
=
itti_send_msg_to_task
(
TASK_VNG
,
0
,
vng_resp_p
);
if
(
res
<
0
)
if
(
res
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS-VNG] Error in itti_send_msg_to_task
\n
"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"[SS-VNG] Error in itti_send_msg_to_task
\n
"
);
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SS-VNG] Send ITTI message to %s
\n
"
,
ITTI_MSG_DESTINATION_NAME
(
vng_resp_p
));
LOG_A
(
ENB_SS
_SYS_TASK
,
"[SS-VNG] Send ITTI message to %s
\n
"
,
ITTI_MSG_DESTINATION_NAME
(
vng_resp_p
));
}
}
default:
default:
break
;
break
;
...
@@ -2603,12 +2605,12 @@ printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
...
@@ -2603,12 +2605,12 @@ printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
break
;
break
;
}
}
default:
default:
LOG_A
(
ENB_SS
,
"[SYS]
Received unhandled message %d:%s
\n
"
,
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Received unhandled message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
break
;
break
;
}
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"
[SYS]
Failed to free memory (%d)!
\n
"
,
result
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
received_msg
=
NULL
;
received_msg
=
NULL
;
}
}
return
NULL
;
return
NULL
;
...
@@ -2656,7 +2658,7 @@ void sys_handle_pdcch_order(struct RA_PDCCH_Order_Type *pdcchOrder)
...
@@ -2656,7 +2658,7 @@ void sys_handle_pdcch_order(struct RA_PDCCH_Order_Type *pdcchOrder)
bool
resVal
=
true
;
bool
resVal
=
true
;
if
(
message_p
)
if
(
message_p
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
pdcchOrder: preambleIndex%d prachMaskIndex:%d
\n
"
,
pdcchOrder
->
PreambleIndex
,
pdcchOrder
->
PrachMaskIndex
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
pdcchOrder: preambleIndex%d prachMaskIndex:%d
\n
"
,
pdcchOrder
->
PreambleIndex
,
pdcchOrder
->
PrachMaskIndex
);
SS_L1MACIND_CTRL
(
message_p
).
pdcchOrder
.
preambleIndex
=
pdcchOrder
->
PreambleIndex
;
SS_L1MACIND_CTRL
(
message_p
).
pdcchOrder
.
preambleIndex
=
pdcchOrder
->
PreambleIndex
;
SS_L1MACIND_CTRL
(
message_p
).
pdcchOrder
.
prachMaskIndex
=
pdcchOrder
->
PrachMaskIndex
;
SS_L1MACIND_CTRL
(
message_p
).
pdcchOrder
.
prachMaskIndex
=
pdcchOrder
->
PrachMaskIndex
;
SS_L1MACIND_CTRL
(
message_p
).
bitmask
|=
PDCCH_ORDER_PRESENT
;
SS_L1MACIND_CTRL
(
message_p
).
bitmask
|=
PDCCH_ORDER_PRESENT
;
...
@@ -2664,7 +2666,7 @@ void sys_handle_pdcch_order(struct RA_PDCCH_Order_Type *pdcchOrder)
...
@@ -2664,7 +2666,7 @@ void sys_handle_pdcch_order(struct RA_PDCCH_Order_Type *pdcchOrder)
int
send_res
=
itti_send_msg_to_task
(
TASK_MAC_ENB
,
0
,
message_p
);
int
send_res
=
itti_send_msg_to_task
(
TASK_MAC_ENB
,
0
,
message_p
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SYS]
Error sending SS_L1MACIND_CTRL with PdcchOrder to MAC"
);
LOG_A
(
ENB_SS
_SYS_TASK
,
"
Error sending SS_L1MACIND_CTRL with PdcchOrder to MAC"
);
}
}
else
else
{
{
...
...
openair3/SS/ss_eNB_sysind_task.c
View file @
7e8fb445
...
@@ -108,7 +108,7 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind,int cell_index)
...
@@ -108,7 +108,7 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind,int cell_index)
ind
.
Common
.
RlcBearerRouting
.
v
.
d
=
RlcBearerRouting_Type_EUTRA
;
ind
.
Common
.
RlcBearerRouting
.
v
.
d
=
RlcBearerRouting_Type_EUTRA
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
.
SSCell_list
[
cell_index
].
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
);
LOG_A
(
ENB_SS
_SYSIND
,
"[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
);
/* Populate and Send the SYSTEM_IND to Client */
/* Populate and Send the SYSTEM_IND to Client */
ind
.
Indication
.
d
=
SystemIndication_Type_RachPreamble
;
ind
.
Indication
.
d
=
SystemIndication_Type_RachPreamble
;
...
@@ -121,7 +121,7 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind,int cell_index)
...
@@ -121,7 +121,7 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind,int cell_index)
}
}
if
(
SysInd_Type_UL_HARQ
==
p_ind
->
sysind_type
)
if
(
SysInd_Type_UL_HARQ
==
p_ind
->
sysind_type
)
{
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND] SYSTEM_IND with UL HARQ %d
\n
"
,
p_ind
->
UL_Harq
);
LOG_A
(
ENB_SS
_SYSIND
,
"[SS_SYSIND] SYSTEM_IND with UL HARQ %d
\n
"
,
p_ind
->
UL_Harq
);
ind
.
Indication
.
d
=
SystemIndication_Type_UL_HARQ
;
ind
.
Indication
.
d
=
SystemIndication_Type_UL_HARQ
;
if
(
p_ind
->
UL_Harq
)
if
(
p_ind
->
UL_Harq
)
{
{
...
@@ -134,7 +134,7 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind,int cell_index)
...
@@ -134,7 +134,7 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind,int cell_index)
}
}
else
if
(
SysInd_Type_HarqError
==
p_ind
->
sysind_type
)
else
if
(
SysInd_Type_HarqError
==
p_ind
->
sysind_type
)
{
{
LOG_A
(
ENB_SS
,
"SYSTEM_IND with HarqError
\n
"
);
LOG_A
(
ENB_SS
_SYSIND
,
"SYSTEM_IND with HarqError
\n
"
);
ind
.
Indication
.
d
=
SystemIndication_Type_HarqError
;
ind
.
Indication
.
d
=
SystemIndication_Type_HarqError
;
if
(
p_ind
->
HarqError
.
bIsUL
)
if
(
p_ind
->
HarqError
.
bIsUL
)
{
{
...
@@ -153,21 +153,21 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind,int cell_index)
...
@@ -153,21 +153,21 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind,int cell_index)
/* Encode message */
/* Encode message */
if
(
acpSysIndProcessToSSEncSrv
(
ctx_sysind_g
,
buffer
,
&
msgSize
,
&
ind
)
!=
0
)
if
(
acpSysIndProcessToSSEncSrv
(
ctx_sysind_g
,
buffer
,
&
msgSize
,
&
ind
)
!=
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] acpSysIndProcessToSSEncSrv Failure
\n
"
);
LOG_A
(
ENB_SS
_SYSIND
,
"[SS_SYSIND][SYSTEM_IND] acpSysIndProcessToSSEncSrv Failure
\n
"
);
return
;
return
;
}
}
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] Buffer msgSize=%d (!!2) to EUTRACell %d
\n
"
,
(
int
)
msgSize
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
);
LOG_A
(
ENB_SS
_SYSIND
,
"[SS_SYSIND][SYSTEM_IND] Buffer msgSize=%d (!!2) to EUTRACell %d
\n
"
,
(
int
)
msgSize
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
);
/* Send message */
/* Send message */
status
=
acpSendMsg
(
ctx_sysind_g
,
msgSize
,
buffer
);
status
=
acpSendMsg
(
ctx_sysind_g
,
msgSize
,
buffer
);
if
(
status
!=
0
)
if
(
status
!=
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] acpSendMsg failed. Error : %d on fd: %d
\n
"
,
status
,
acpGetSocketFd
(
ctx_sysind_g
));
LOG_A
(
ENB_SS
_SYSIND
,
"[SS_SYSIND][SYSTEM_IND] acpSendMsg failed. Error : %d on fd: %d
\n
"
,
status
,
acpGetSocketFd
(
ctx_sysind_g
));
return
;
return
;
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] acpSendMsg Success
\n
"
);
LOG_A
(
ENB_SS
_SYSIND
,
"[SS_SYSIND][SYSTEM_IND] acpSendMsg Success
\n
"
);
}
}
}
}
...
@@ -190,7 +190,7 @@ ss_eNB_read_from_sysind_socket(acpCtx_t ctx)
...
@@ -190,7 +190,7 @@ ss_eNB_read_from_sysind_socket(acpCtx_t ctx)
while
(
1
)
while
(
1
)
{
{
int
userId
=
acpRecvMsg
(
ctx
,
&
msgSize
,
buffer
);
int
userId
=
acpRecvMsg
(
ctx
,
&
msgSize
,
buffer
);
LOG_D
(
ENB_SS
,
"[SS_SYSIND] Received msgSize=%d, userId=%d
\n
"
,
(
int
)
msgSize
,
userId
);
LOG_D
(
ENB_SS
_SYSIND_ACP
,
"[SS_SYSIND] Received msgSize=%d, userId=%d
\n
"
,
(
int
)
msgSize
,
userId
);
// Error handling
// Error handling
if
(
userId
<
0
)
if
(
userId
<
0
)
...
@@ -218,7 +218,7 @@ ss_eNB_read_from_sysind_socket(acpCtx_t ctx)
...
@@ -218,7 +218,7 @@ ss_eNB_read_from_sysind_socket(acpCtx_t ctx)
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Invalid userId: %d
\n
"
,
userId
);
LOG_A
(
ENB_SS
_SYSIND_ACP
,
"[SS_SYSIND] Invalid userId: %d
\n
"
,
userId
);
break
;
break
;
}
}
}
}
...
@@ -245,7 +245,7 @@ ss_eNB_read_from_sysind_socket(acpCtx_t ctx)
...
@@ -245,7 +245,7 @@ ss_eNB_read_from_sysind_socket(acpCtx_t ctx)
void
ss_eNB_sysind_init
(
void
)
void
ss_eNB_sysind_init
(
void
)
{
{
IpAddress_t
ipaddr
;
IpAddress_t
ipaddr
;
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Starting System Simulator SYSIND Thread
\n
"
);
LOG_A
(
ENB_SS
_SYSIND_ACP
,
"[SS_SYSIND] Starting System Simulator SYSIND Thread
\n
"
);
const
char
*
hostIp
;
const
char
*
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
hostIp
=
RC
.
ss
.
hostIp
;
acpConvertIp
(
hostIp
,
&
ipaddr
);
acpConvertIp
(
hostIp
,
&
ipaddr
);
...
@@ -266,11 +266,11 @@ void ss_eNB_sysind_init(void)
...
@@ -266,11 +266,11 @@ void ss_eNB_sysind_init(void)
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_sysind_g
);
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_sysind_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
ENB_SS
_SYSIND_ACP
,
"[SS_SYSIND] Connection failure err=%d
\n
"
,
ret
);
return
;
return
;
}
}
int
fd1
=
acpGetSocketFd
(
ctx_sysind_g
);
int
fd1
=
acpGetSocketFd
(
ctx_sysind_g
);
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Connection performed : %d
\n
"
,
fd1
);
LOG_A
(
ENB_SS
_SYSIND_ACP
,
"[SS_SYSIND] Connection performed : %d
\n
"
,
fd1
);
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
assert
(
buffer
);
assert
(
buffer
);
...
@@ -307,17 +307,17 @@ void *ss_eNB_sysind_process_itti_msg(void *notUsed)
...
@@ -307,17 +307,17 @@ void *ss_eNB_sysind_process_itti_msg(void *notUsed)
int
cell_index
=
0
;
int
cell_index
=
0
;
if
(
received_msg
->
ittiMsg
.
ss_system_ind
.
physCellId
){
if
(
received_msg
->
ittiMsg
.
ss_system_ind
.
physCellId
){
cell_index
=
get_cell_index_pci
(
received_msg
->
ittiMsg
.
ss_system_ind
.
physCellId
,
SS_context
.
SSCell_list
);
cell_index
=
get_cell_index_pci
(
received_msg
->
ittiMsg
.
ss_system_ind
.
physCellId
,
SS_context
.
SSCell_list
);
LOG_A
(
ENB_SS
,
"[SS_SYSIND] cell_index in SS_SYSTEM_IND: %d PhysicalCellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
LOG_A
(
ENB_SS
_SYSIND
,
"[SS_SYSIND] cell_index in SS_SYSTEM_IND: %d PhysicalCellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
}
}
task_id_t
origin_task
=
ITTI_MSG_ORIGIN_ID
(
received_msg
);
task_id_t
origin_task
=
ITTI_MSG_ORIGIN_ID
(
received_msg
);
if
(
origin_task
==
TASK_SS_PORTMAN
)
if
(
origin_task
==
TASK_SS_PORTMAN
)
{
{
LOG_D
(
ENB_
APP
,
"[SS_SYSIND] DUMMY WAKEUP receviedfrom PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
LOG_D
(
ENB_
SS_SYSIND
,
"[SS_SYSIND] DUMMY WAKEUP receviedfrom PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Received SS_SYSTEM_IND
\n
"
);
LOG_A
(
ENB_SS
_SYSIND
,
"[SS_SYSIND] Received SS_SYSTEM_IND
\n
"
);
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
>=
SS_STATE_CELL_CONFIGURED
)
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
>=
SS_STATE_CELL_CONFIGURED
)
{
{
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
...
@@ -325,7 +325,7 @@ void *ss_eNB_sysind_process_itti_msg(void *notUsed)
...
@@ -325,7 +325,7 @@ void *ss_eNB_sysind_process_itti_msg(void *notUsed)
}
}
else
else
{
{
LOG_E
(
ENB_SS
,
"[SS_SYSIND][SS_SYSTEM_IND] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
LOG_E
(
ENB_SS
_SYSIND
,
"[SS_SYSIND][SS_SYSTEM_IND] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
}
}
}
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
...
@@ -334,12 +334,12 @@ void *ss_eNB_sysind_process_itti_msg(void *notUsed)
...
@@ -334,12 +334,12 @@ void *ss_eNB_sysind_process_itti_msg(void *notUsed)
break
;
break
;
case
TERMINATE_MESSAGE
:
case
TERMINATE_MESSAGE
:
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Received TERMINATE_MESSAGE
\n
"
);
LOG_A
(
ENB_SS
_SYSIND
,
"[SS_SYSIND] Received TERMINATE_MESSAGE
\n
"
);
itti_exit_task
();
itti_exit_task
();
break
;
break
;
default:
default:
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Received unhandled message %d:%s
\n
"
,
LOG_A
(
ENB_SS
_SYSIND
,
"[SS_SYSIND] Received unhandled message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
break
;
break
;
}
}
...
...
openair3/SS/ss_eNB_vng_task.c
View file @
7e8fb445
...
@@ -72,7 +72,7 @@ void ss_vng_send_cnf(uint8_t status, EUTRA_CellId_Type CellId)
...
@@ -72,7 +72,7 @@ void ss_vng_send_cnf(uint8_t status, EUTRA_CellId_Type CellId)
cnf
.
Common
.
Result
.
v
.
Error
=
1
;
/** TODO: A dummy value */
cnf
.
Common
.
Result
.
v
.
Error
=
1
;
/** TODO: A dummy value */
cnf
.
Confirm
=
false
;
cnf
.
Confirm
=
false
;
}
}
LOG_A
(
ENB_SS
,
"[VNG] VNG CNF received cellId %d result %d
\n
"
,
LOG_A
(
ENB_SS
_VNG
,
"[VNG] VNG CNF received cellId %d result %d
\n
"
,
cnf
.
Common
.
CellId
,
cnf
.
Common
.
Result
.
d
);
cnf
.
Common
.
CellId
,
cnf
.
Common
.
Result
.
d
);
/* Encode message
/* Encode message
...
@@ -87,14 +87,14 @@ void ss_vng_send_cnf(uint8_t status, EUTRA_CellId_Type CellId)
...
@@ -87,14 +87,14 @@ void ss_vng_send_cnf(uint8_t status, EUTRA_CellId_Type CellId)
status
=
acpSendMsg
(
ctx_vng_g
,
msgSize
,
buffer
);
status
=
acpSendMsg
(
ctx_vng_g
,
msgSize
,
buffer
);
if
(
status
!=
0
)
if
(
status
!=
0
)
{
{
LOG_A
(
ENB_SS
,
"[VNG] acpSendMsg failed. Error : %d on fd: %d
\n
"
,
LOG_A
(
ENB_SS
_VNG
,
"[VNG] acpSendMsg failed. Error : %d on fd: %d
\n
"
,
status
,
acpGetSocketFd
(
ctx_vng_g
));
status
,
acpGetSocketFd
(
ctx_vng_g
));
acpFree
(
buffer
);
acpFree
(
buffer
);
return
;
return
;
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[VNG] acpSendMsg Success
\n
"
);
LOG_A
(
ENB_SS
_VNG
,
"[VNG] acpSendMsg Success
\n
"
);
}
}
// Free allocated buffer
// Free allocated buffer
acpFree
(
buffer
);
acpFree
(
buffer
);
...
@@ -124,11 +124,11 @@ vng_ss_configure_cell (EUTRA_CellId_Type CellId, Dl_Bandwidth_Type Bandwidth,
...
@@ -124,11 +124,11 @@ vng_ss_configure_cell (EUTRA_CellId_Type CellId, Dl_Bandwidth_Type Bandwidth,
int
res
=
itti_send_msg_to_task
(
TASK_SYS
,
0
,
message_p
);
int
res
=
itti_send_msg_to_task
(
TASK_SYS
,
0
,
message_p
);
if
(
res
<
0
)
if
(
res
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS-VNG] Error in itti_send_msg_to_task
\n
"
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Error in itti_send_msg_to_task
\n
"
);
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SS-VNG] Send ITTI message to %s
\n
"
,
ITTI_MSG_DESTINATION_NAME
(
message_p
));
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Send ITTI message to %s
\n
"
,
ITTI_MSG_DESTINATION_NAME
(
message_p
));
}
}
}
}
...
@@ -156,7 +156,7 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
...
@@ -156,7 +156,7 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
while
(
1
)
while
(
1
)
{
{
int
userId
=
acpRecvMsg
(
ctx
,
&
msgSize
,
buffer
);
int
userId
=
acpRecvMsg
(
ctx
,
&
msgSize
,
buffer
);
LOG_A
(
ENB_SS
,
"[SS-VNG] Received msgSize=%d, userId=%d
\n
"
,
(
int
)
msgSize
,
userId
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Received msgSize=%d, userId=%d
\n
"
,
(
int
)
msgSize
,
userId
);
// Error handling
// Error handling
if
(
userId
<
0
)
if
(
userId
<
0
)
...
@@ -181,7 +181,7 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
...
@@ -181,7 +181,7 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
}
}
else
else
{
{
LOG_A
(
ENB_SS
,
"[SS-VNG] Invalid userId: %d
\n
"
,
userId
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Invalid userId: %d
\n
"
,
userId
);
break
;
break
;
}
}
}
}
...
@@ -194,45 +194,45 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
...
@@ -194,45 +194,45 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
else
if
(
userId
==
MSG_VngProcess_userId
)
else
if
(
userId
==
MSG_VngProcess_userId
)
{
{
int
cell_index
;
int
cell_index
;
LOG_A
(
ENB_SS
,
"[SS-VNG] Received VNG Control Request
\n
"
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Received VNG Control Request
\n
"
);
if
(
acpVngProcessDecSrv
(
ctx
,
buffer
,
msgSize
,
&
req
)
!=
0
)
if
(
acpVngProcessDecSrv
(
ctx
,
buffer
,
msgSize
,
&
req
)
!=
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS-VNG] acpVngProcessDecSrv failed
\n
"
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] acpVngProcessDecSrv failed
\n
"
);
break
;
break
;
}
}
if
(
req
->
Common
.
CellId
){
if
(
req
->
Common
.
CellId
){
cell_index
=
get_cell_index
(
req
->
Common
.
CellId
,
SS_context
.
SSCell_list
);
cell_index
=
get_cell_index
(
req
->
Common
.
CellId
,
SS_context
.
SSCell_list
);
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
=
req
->
Common
.
CellId
;
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
=
req
->
Common
.
CellId
;
LOG_A
(
ENB_SS
,
"[SS-VNG] cell_index: %d eutra_cellId: %d PhysicalCellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] cell_index: %d eutra_cellId: %d PhysicalCellId: %d
\n
"
,
cell_index
,
SS_context
.
SSCell_list
[
cell_index
].
eutra_cellId
,
SS_context
.
SSCell_list
[
cell_index
].
PhysicalCellId
);
}
}
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
<
SS_STATE_CELL_ACTIVE
)
{
if
(
SS_context
.
SSCell_list
[
cell_index
].
State
<
SS_STATE_CELL_ACTIVE
)
{
LOG_A
(
ENB_SS
,
"[SS-VNG] Request received in an invalid state: %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Request received in an invalid state: %d
\n
"
,
SS_context
.
SSCell_list
[
cell_index
].
State
);
break
;
break
;
}
}
/** TODO: Dump message here */
/** TODO: Dump message here */
switch
(
req
->
Request
.
d
)
switch
(
req
->
Request
.
d
)
{
{
case
EUTRA_VngConfigRequest_Type_Configure
:
case
EUTRA_VngConfigRequest_Type_Configure
:
LOG_A
(
ENB_SS
,
"[SS-VNG] Received Configure request
\n
"
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Received Configure request
\n
"
);
vng_ss_configure_cell
(
req
->
Common
.
CellId
,
req
->
Request
.
v
.
Configure
.
Bandwidth
,
vng_ss_configure_cell
(
req
->
Common
.
CellId
,
req
->
Request
.
v
.
Configure
.
Bandwidth
,
req
->
Request
.
v
.
Configure
.
NocLevel
,
(
VngProxyCmd_e
)
EUTRA_VngConfigRequest_Type_Configure
,
cell_index
);
req
->
Request
.
v
.
Configure
.
NocLevel
,
(
VngProxyCmd_e
)
EUTRA_VngConfigRequest_Type_Configure
,
cell_index
);
break
;
break
;
case
EUTRA_VngConfigRequest_Type_Activate
:
case
EUTRA_VngConfigRequest_Type_Activate
:
LOG_A
(
ENB_SS
,
"[SS-VNG] Received Activate request
\n
"
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Received Activate request
\n
"
);
vng_ss_configure_cell
(
req
->
Common
.
CellId
,
(
0xFF
),
vng_ss_configure_cell
(
req
->
Common
.
CellId
,
(
0xFF
),
(
0xFFFF
),
(
VngProxyCmd_e
)
EUTRA_VngConfigRequest_Type_Activate
,
cell_index
);
(
0xFFFF
),
(
VngProxyCmd_e
)
EUTRA_VngConfigRequest_Type_Activate
,
cell_index
);
break
;
break
;
case
EUTRA_VngConfigRequest_Type_Deactivate
:
case
EUTRA_VngConfigRequest_Type_Deactivate
:
LOG_A
(
ENB_SS
,
"[SS-VNG] Received Deactivate request
\n
"
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Received Deactivate request
\n
"
);
vng_ss_configure_cell
(
req
->
Common
.
CellId
,
(
0xFF
),
vng_ss_configure_cell
(
req
->
Common
.
CellId
,
(
0xFF
),
(
0xFFFF
),
(
VngProxyCmd_e
)
EUTRA_VngConfigRequest_Type_Deactivate
,
cell_index
);
(
0xFFFF
),
(
VngProxyCmd_e
)
EUTRA_VngConfigRequest_Type_Deactivate
,
cell_index
);
break
;
break
;
case
EUTRA_VngConfigRequest_Type_UNBOUND_VALUE
:
case
EUTRA_VngConfigRequest_Type_UNBOUND_VALUE
:
default:
default:
LOG_A
(
ENB_SS
,
"[SS-VNG] Received unhandled message in VNG Port
\n
"
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Received unhandled message in VNG Port
\n
"
);
}
}
if
(
req
->
Request
.
d
==
EUTRA_VngConfigRequest_Type_UNBOUND_VALUE
||
req
->
Request
.
d
>
EUTRA_VngConfigRequest_Type_Deactivate
)
if
(
req
->
Request
.
d
==
EUTRA_VngConfigRequest_Type_UNBOUND_VALUE
||
req
->
Request
.
d
>
EUTRA_VngConfigRequest_Type_Deactivate
)
...
@@ -265,7 +265,7 @@ void *ss_eNB_vng_process_itti_msg(void *notUsed)
...
@@ -265,7 +265,7 @@ void *ss_eNB_vng_process_itti_msg(void *notUsed)
{
{
case
SS_VNG_PROXY_RESP
:
case
SS_VNG_PROXY_RESP
:
{
{
LOG_A
(
ENB_SS
,
"[SS-VNG] Response receieved from %s CellId: %d Status: %d
\n
"
,
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Response receieved from %s CellId: %d Status: %d
\n
"
,
ITTI_MSG_ORIGIN_NAME
(
received_msg
),
SS_VNG_PROXY_RESP
(
received_msg
).
cell_id
,
ITTI_MSG_ORIGIN_NAME
(
received_msg
),
SS_VNG_PROXY_RESP
(
received_msg
).
cell_id
,
SS_VNG_PROXY_RESP
(
received_msg
).
status
);
SS_VNG_PROXY_RESP
(
received_msg
).
status
);
...
@@ -280,7 +280,7 @@ void *ss_eNB_vng_process_itti_msg(void *notUsed)
...
@@ -280,7 +280,7 @@ void *ss_eNB_vng_process_itti_msg(void *notUsed)
break
;
break
;
}
}
default:
default:
LOG_A
(
ENB_SS
,
"[VNG] Received unhandled message %d:%s
\n
"
,
LOG_A
(
ENB_SS
_VNG
,
"[VNG] Received unhandled message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
}
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
...
@@ -313,7 +313,7 @@ void ss_eNB_vng_init(void)
...
@@ -313,7 +313,7 @@ void ss_eNB_vng_init(void)
// Port number
// Port number
int
port
=
RC
.
ss
.
Vngport
;
int
port
=
RC
.
ss
.
Vngport
;
LOG_A
(
ENB_SS
,
"[SS-VNG] Initializing VNG Port %s:%d
\n
"
,
hostIp
,
port
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Initializing VNG Port %s:%d
\n
"
,
hostIp
,
port
);
//acpInit(malloc, free, 1000);
//acpInit(malloc, free, 1000);
...
@@ -332,14 +332,14 @@ void ss_eNB_vng_init(void)
...
@@ -332,14 +332,14 @@ void ss_eNB_vng_init(void)
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_vng_g
);
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_vng_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_A
(
ENB_SS
,
"[SS-VNG] Connection failure err=%d
\n
"
,
ret
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Connection failure err=%d
\n
"
,
ret
);
return
;
return
;
}
}
#ifdef ACP_DEBUG_DUMP_MSGS
/** TODO: Need to verify */
#ifdef ACP_DEBUG_DUMP_MSGS
/** TODO: Need to verify */
adbgSetPrintLogFormat
(
ctx
,
true
);
adbgSetPrintLogFormat
(
ctx
,
true
);
#endif
#endif
int
fd1
=
acpGetSocketFd
(
ctx_vng_g
);
int
fd1
=
acpGetSocketFd
(
ctx_vng_g
);
LOG_A
(
ENB_SS
,
"[SS-VNG] Connected: %d
\n
"
,
fd1
);
LOG_A
(
ENB_SS
_VNG
,
"[SS-VNG] Connected: %d
\n
"
,
fd1
);
//itti_subscribe_event_fd(TASK_VNG, fd1);
//itti_subscribe_event_fd(TASK_VNG, fd1);
...
...
openair3/SS/ss_eNB_vt_timer_task.c
View file @
7e8fb445
...
@@ -70,13 +70,13 @@ uint8_t msg_can_be_queued(ss_set_timinfo_t req_tinfo, ss_set_timinfo_t *timer_ti
...
@@ -70,13 +70,13 @@ uint8_t msg_can_be_queued(ss_set_timinfo_t req_tinfo, ss_set_timinfo_t *timer_ti
curr_tinfo
.
sfn
=
SS_context
.
sfn
;
curr_tinfo
.
sfn
=
SS_context
.
sfn
;
curr_tinfo
.
sf
=
SS_context
.
sf
;
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
);
LOG_A
(
ENB_
SS_VT_TIMER
,
"VT_TIMER Enter msg_can_be_queued for SFN %d , SF %d
\n
"
,
req_tinfo
.
sfn
,
req_tinfo
.
sf
);
/*It is nonsense to check req_tinfo is after curr_tinfo */
/*It is nonsense to check req_tinfo is after curr_tinfo */
if
(
req_tinfo
.
sfn
!=
curr_tinfo
.
sfn
||
((
req_tinfo
.
sfn
==
curr_tinfo
.
sfn
)
&&
(
req_tinfo
.
sf
-
curr_tinfo
.
sf
)
>
0
)
)
if
(
req_tinfo
.
sfn
!=
curr_tinfo
.
sfn
||
((
req_tinfo
.
sfn
==
curr_tinfo
.
sfn
)
&&
(
req_tinfo
.
sf
-
curr_tinfo
.
sf
)
>
0
)
)
{
{
vt_subtract_sf
(
&
timer_tinfo
->
sfn
,
&
timer_tinfo
->
sf
,
4
);
/* queued ahead of 4 subframes because of mac schedule 4 subframes ahead when processing */
vt_subtract_sf
(
&
timer_tinfo
->
sfn
,
&
timer_tinfo
->
sf
,
4
);
/* queued ahead of 4 subframes because of mac schedule 4 subframes ahead when processing */
LOG_A
(
ENB_
APP
,
"VT_TIMER MSG to be queued TRUE for SFN %d , SF %d
\n
"
,
timer_tinfo
->
sfn
,
timer_tinfo
->
sf
);
LOG_A
(
ENB_
SS_VT_TIMER
,
"VT_TIMER MSG to be queued TRUE for SFN %d , SF %d
\n
"
,
timer_tinfo
->
sfn
,
timer_tinfo
->
sf
);
return
true
;
return
true
;
}
}
...
@@ -89,22 +89,22 @@ uint8_t msg_can_be_queued(ss_set_timinfo_t req_tinfo, ss_set_timinfo_t *timer_ti
...
@@ -89,22 +89,22 @@ uint8_t msg_can_be_queued(ss_set_timinfo_t req_tinfo, ss_set_timinfo_t *timer_ti
*/
*/
uint8_t
vt_timer_setup
(
ss_set_timinfo_t
tinfo
,
task_id_t
task_id
,
instance_t
instance
,
void
*
msg
)
uint8_t
vt_timer_setup
(
ss_set_timinfo_t
tinfo
,
task_id_t
task_id
,
instance_t
instance
,
void
*
msg
)
{
{
LOG_A
(
ENB_
APP
,
"VT_TIMER setup1 for SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_
SS_VT_TIMER
,
"VT_TIMER setup1 for SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
uint32_t
sfnSfKey
=
(
tinfo
.
sfn
<<
4
)
|
tinfo
.
sf
;
uint32_t
sfnSfKey
=
(
tinfo
.
sfn
<<
4
)
|
tinfo
.
sf
;
vt_timer_elm_t
*
timer_ele_p
;
vt_timer_elm_t
*
timer_ele_p
;
timer_ele_p
=
calloc
(
1
,
sizeof
(
vt_timer_elm_t
));
timer_ele_p
=
calloc
(
1
,
sizeof
(
vt_timer_elm_t
));
timer_ele_p
->
instance
=
instance
;
timer_ele_p
->
instance
=
instance
;
timer_ele_p
->
task_id
=
task_id
;
timer_ele_p
->
task_id
=
task_id
;
timer_ele_p
->
msg
=
msg
;
timer_ele_p
->
msg
=
msg
;
LOG_A
(
ENB_
APP
,
"VT_TIMER setup2 for SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_
SS_VT_TIMER
,
"VT_TIMER setup2 for SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
if
(
hashtable_insert
(
SS_context
.
vt_timer_table
,
if
(
hashtable_insert
(
SS_context
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
,
(
void
*
)
timer_ele_p
)
==
HASH_TABLE_OK
)
(
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
);
LOG_A
(
ENB_
SS_VT_TIMER
,
"VT_TIMER setup for SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
return
1
;
return
1
;
}
}
LOG_A
(
ENB_
APP
,
"VT_TIMER not setup for SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_
SS_VT_TIMER
,
"VT_TIMER not setup for SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
return
0
;
return
0
;
}
}
/*
/*
...
@@ -122,27 +122,27 @@ static inline void ss_vt_timer_check(ss_set_timinfo_t tinfo)
...
@@ -122,27 +122,27 @@ static inline void ss_vt_timer_check(ss_set_timinfo_t tinfo)
//printf("VT_TIMER foudn queued SFN %d , SF %d\n",tinfo.sfn,tinfo.sf);
//printf("VT_TIMER foudn queued SFN %d , SF %d\n",tinfo.sfn,tinfo.sf);
while
(
hashtable_is_key_exists
(
SS_context
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
)
==
HASH_TABLE_OK
)
while
(
hashtable_is_key_exists
(
SS_context
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
)
==
HASH_TABLE_OK
)
{
{
LOG_D
(
ENB_
APP
,
"VT_TIMER Timeout sending curr SFN %d SF %d
\n
"
,
LOG_D
(
ENB_
SS_VT_TIMER
,
"VT_TIMER Timeout sending curr SFN %d SF %d
\n
"
,
SS_context
.
sfn
,
SS_context
.
sf
);
SS_context
.
sfn
,
SS_context
.
sf
);
hash_rc
=
hashtable_get
(
SS_context
.
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
"
,
LOG_A
(
ENB_
SS_VT_TIMER
,
"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
);
tinfo
.
sfn
,
tinfo
.
sf
,
timer_ele_p
->
task_id
,
timer_ele_p
->
instance
);
int
send_res
=
itti_send_msg_to_task
(
timer_ele_p
->
task_id
,
timer_ele_p
->
instance
,
(
MessageDef
*
)
timer_ele_p
->
msg
);
int
send_res
=
itti_send_msg_to_task
(
timer_ele_p
->
task_id
,
timer_ele_p
->
instance
,
(
MessageDef
*
)
timer_ele_p
->
msg
);
if
(
send_res
<
0
)
if
(
send_res
<
0
)
{
{
LOG_A
(
ENB_
APP
,
"[VT_TIMER] Error in SS_VT_TIME_OUT itti_send_msg_to_task"
);
LOG_A
(
ENB_
SS_VT_TIMER
,
"[VT_TIMER] Error in SS_VT_TIME_OUT itti_send_msg_to_task"
);
}
}
else
else
{
{
LOG_A
(
ENB_
APP
,
"VT_TIMER Sent message to taskID %d timer_ele.task_id instance %ld
\n
"
,
LOG_A
(
ENB_
SS_VT_TIMER
,
"VT_TIMER Sent message to taskID %d timer_ele.task_id instance %ld
\n
"
,
timer_ele_p
->
task_id
,
timer_ele_p
->
instance
);
timer_ele_p
->
task_id
,
timer_ele_p
->
instance
);
hash_rc
=
hashtable_remove
(
SS_context
.
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
"
,
LOG_D
(
ENB_
SS_VT_TIMER
,
"VT_TIMER Timeout sending done curr SFN %d SF %d
\n
"
,
SS_context
.
sfn
,
SS_context
.
sf
);
SS_context
.
sfn
,
SS_context
.
sf
);
}
}
...
@@ -167,7 +167,7 @@ void *ss_eNB_vt_timer_process_itti_msg(void *notUsed)
...
@@ -167,7 +167,7 @@ void *ss_eNB_vt_timer_process_itti_msg(void *notUsed)
ss_set_timinfo_t
tinfo
;
ss_set_timinfo_t
tinfo
;
tinfo
.
sf
=
SS_UPD_TIM_INFO
(
received_msg
).
sf
;
tinfo
.
sf
=
SS_UPD_TIM_INFO
(
received_msg
).
sf
;
tinfo
.
sfn
=
SS_UPD_TIM_INFO
(
received_msg
).
sfn
;
tinfo
.
sfn
=
SS_UPD_TIM_INFO
(
received_msg
).
sfn
;
LOG_D
(
ENB_
APP
,
"[VT_TIMER] received_UPD_TIM_INFO SFN: %d SF: %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_D
(
ENB_
SS_VT_TIMER
,
"[VT_TIMER] received_UPD_TIM_INFO SFN: %d SF: %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
ss_vt_timer_check
(
tinfo
);
ss_vt_timer_check
(
tinfo
);
}
}
...
@@ -178,7 +178,7 @@ void *ss_eNB_vt_timer_process_itti_msg(void *notUsed)
...
@@ -178,7 +178,7 @@ void *ss_eNB_vt_timer_process_itti_msg(void *notUsed)
break
;
break
;
}
}
default:
default:
LOG_E
(
ENB_
APP
,
"[SS-VT_TIMER] Received unhandled message %d:%s
\n
"
,
LOG_E
(
ENB_
SS_VT_TIMER
,
"[SS-VT_TIMER] Received unhandled message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
}
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
...
@@ -209,14 +209,14 @@ void* ss_eNB_vt_timer_task(void *arg) {
...
@@ -209,14 +209,14 @@ void* ss_eNB_vt_timer_task(void *arg) {
int
retVal
=
ss_eNB_vt_timer_init
();
int
retVal
=
ss_eNB_vt_timer_init
();
if
(
retVal
!=
-
1
)
{
if
(
retVal
!=
-
1
)
{
LOG_A
(
ENB_
APP
,
"[SS-VT_TIMER] Enabled TASK_VT_TIMER starting the itti_msg_handler
\n
"
);
LOG_A
(
ENB_
SS_VT_TIMER
,
"[SS-VT_TIMER] Enabled TASK_VT_TIMER starting the itti_msg_handler
\n
"
);
while
(
1
)
{
while
(
1
)
{
(
void
)
ss_eNB_vt_timer_process_itti_msg
(
NULL
);
(
void
)
ss_eNB_vt_timer_process_itti_msg
(
NULL
);
}
}
}
else
{
}
else
{
LOG_A
(
ENB_
APP
,
"[SS-VT_TIMER] TASK_VT_TIMER port disabled at eNB
\n
"
);
LOG_A
(
ENB_
SS_VT_TIMER
,
"[SS-VT_TIMER] TASK_VT_TIMER port disabled at eNB
\n
"
);
sleep
(
10
);
sleep
(
10
);
}
}
...
...
openair3/SS/ss_eNB_vtp_task.c
View file @
7e8fb445
...
@@ -65,7 +65,7 @@ static int vtp_send_init_udp(const vtp_udpSockReq_t *req)
...
@@ -65,7 +65,7 @@ static int vtp_send_init_udp(const vtp_udpSockReq_t *req)
UDP_INIT
(
message_p
).
port
=
req
->
port
;
UDP_INIT
(
message_p
).
port
=
req
->
port
;
//addr.s_addr = req->ss_ip_addr;
//addr.s_addr = req->ss_ip_addr;
UDP_INIT
(
message_p
).
address
=
req
->
address
;
//inet_ntoa(addr);
UDP_INIT
(
message_p
).
address
=
req
->
address
;
//inet_ntoa(addr);
LOG_A
(
ENB_
AP
P
,
"Tx UDP_INIT IP addr %s (%x)
\n
"
,
UDP_INIT
(
message_p
).
address
,
UDP_INIT
(
message_p
).
port
);
LOG_A
(
ENB_
SS_VT
P
,
"Tx UDP_INIT IP addr %s (%x)
\n
"
,
UDP_INIT
(
message_p
).
address
,
UDP_INIT
(
message_p
).
port
);
MSC_LOG_EVENT
(
MSC_LOG_EVENT
(
MSC_GTPU_ENB
,
MSC_GTPU_ENB
,
"0 UDP bind %s:%u"
,
"0 UDP bind %s:%u"
,
...
@@ -118,14 +118,14 @@ void ss_vtp_send_tinfo(
...
@@ -118,14 +118,14 @@ void ss_vtp_send_tinfo(
status
=
acpSendMsg
(
ctx_vtp_g
,
msgSize
,
buffer
);
status
=
acpSendMsg
(
ctx_vtp_g
,
msgSize
,
buffer
);
if
(
status
!=
0
)
if
(
status
!=
0
)
{
{
LOG_E
(
ENB_
AP
P
,
"[SS-VTP] acpSendMsg failed. Error : %d on fd: %d the VTP at SS will be disabled
\n
"
,
LOG_E
(
ENB_
SS_VT
P
,
"[SS-VTP] acpSendMsg failed. Error : %d on fd: %d the VTP at SS will be disabled
\n
"
,
status
,
acpGetSocketFd
(
ctx_vtp_g
));
status
,
acpGetSocketFd
(
ctx_vtp_g
));
acpFree
(
buffer
);
acpFree
(
buffer
);
return
;
return
;
}
}
else
else
{
{
LOG_A
(
ENB_
AP
P
,
"[SS-VTP] acpSendMsg VTP_Send Success SFN %d SF %d virtualTime.Enable %d
\n
"
,
tinfo
->
sfn
,
tinfo
->
sf
,
virtualTime
.
Enable
);
LOG_A
(
ENB_
SS_VT
P
,
"[SS-VTP] acpSendMsg VTP_Send Success SFN %d SF %d virtualTime.Enable %d
\n
"
,
tinfo
->
sfn
,
tinfo
->
sf
,
virtualTime
.
Enable
);
SS_context
.
vtinfo
=
*
tinfo
;
SS_context
.
vtinfo
=
*
tinfo
;
}
}
// Free allocated buffer
// Free allocated buffer
...
@@ -149,7 +149,7 @@ static int vtp_send_udp_msg(
...
@@ -149,7 +149,7 @@ static int vtp_send_udp_msg(
if
(
message_p
)
if
(
message_p
)
{
{
LOG_A
(
ENB_
AP
P
,
"Sending UDP_DATA_REQ length %u offset %u buffer %d %d %d
\n
"
,
buffer_len
,
buffer_offset
,
buffer
[
0
],
buffer
[
1
],
buffer
[
2
]);
LOG_A
(
ENB_
SS_VT
P
,
"Sending UDP_DATA_REQ length %u offset %u buffer %d %d %d
\n
"
,
buffer_len
,
buffer_offset
,
buffer
[
0
],
buffer
[
1
],
buffer
[
2
]);
udp_data_req_p
=
&
message_p
->
ittiMsg
.
udp_data_req
;
udp_data_req_p
=
&
message_p
->
ittiMsg
.
udp_data_req
;
udp_data_req_p
->
peer_address
=
peerIpAddr
;
udp_data_req_p
->
peer_address
=
peerIpAddr
;
udp_data_req_p
->
peer_port
=
peerPort
;
udp_data_req_p
->
peer_port
=
peerPort
;
...
@@ -160,7 +160,7 @@ static int vtp_send_udp_msg(
...
@@ -160,7 +160,7 @@ static int vtp_send_udp_msg(
}
}
else
else
{
{
LOG_A
(
ENB_
AP
P
,
"Failed Sending UDP_DATA_REQ length %u offset %u"
,
buffer_len
,
buffer_offset
);
LOG_A
(
ENB_
SS_VT
P
,
"Failed Sending UDP_DATA_REQ length %u offset %u"
,
buffer_len
,
buffer_offset
);
return
-
1
;
return
-
1
;
}
}
}
}
...
@@ -171,13 +171,13 @@ static int vtp_send_udp_msg(
...
@@ -171,13 +171,13 @@ static int vtp_send_udp_msg(
*/
*/
static
void
vtp_send_proxy
(
void
*
msg
,
int
msgLen
)
static
void
vtp_send_proxy
(
void
*
msg
,
int
msgLen
)
{
{
LOG_A
(
ENB_
AP
P
,
"In sys_send_proxy
\n
"
);
LOG_A
(
ENB_
SS_VT
P
,
"In sys_send_proxy
\n
"
);
uint32_t
peerIpAddr
;
uint32_t
peerIpAddr
;
uint16_t
peerPort
=
vtp_proxy_send_port
;
uint16_t
peerPort
=
vtp_proxy_send_port
;
IPV4_STR_ADDR_TO_INT_NWBO
(
vtp_local_address
,
peerIpAddr
,
" BAD IP Address"
);
IPV4_STR_ADDR_TO_INT_NWBO
(
vtp_local_address
,
peerIpAddr
,
" BAD IP Address"
);
LOG_A
(
ENB_
AP
P
,
"
\n
Cell Config End of Buffer
\n
"
);
LOG_A
(
ENB_
SS_VT
P
,
"
\n
Cell Config End of Buffer
\n
"
);
/** Send to proxy */
/** Send to proxy */
vtp_send_udp_msg
((
uint8_t
*
)
msg
,
msgLen
,
0
,
peerIpAddr
,
peerPort
);
vtp_send_udp_msg
((
uint8_t
*
)
msg
,
msgLen
,
0
,
peerIpAddr
,
peerPort
);
...
@@ -186,7 +186,7 @@ static void vtp_send_proxy(void *msg, int msgLen)
...
@@ -186,7 +186,7 @@ static void vtp_send_proxy(void *msg, int msgLen)
static
inline
void
ss_send_vtp_resp
(
struct
VirtualTimeInfo_Type
*
virtualTime
)
static
inline
void
ss_send_vtp_resp
(
struct
VirtualTimeInfo_Type
*
virtualTime
)
{
{
VtpCmdReq_t
*
req
=
(
VtpCmdReq_t
*
)
malloc
(
sizeof
(
VtpCmdReq_t
));
VtpCmdReq_t
*
req
=
(
VtpCmdReq_t
*
)
malloc
(
sizeof
(
VtpCmdReq_t
));
LOG_A
(
ENB_
AP
P
,
"itti_alloc %p
\n
"
,
req
);
LOG_A
(
ENB_
SS_VT
P
,
"itti_alloc %p
\n
"
,
req
);
req
->
header
.
preamble
=
0xFEEDC0DE
;
req
->
header
.
preamble
=
0xFEEDC0DE
;
req
->
header
.
msg_id
=
SS_VTP_RESP
;
req
->
header
.
msg_id
=
SS_VTP_RESP
;
req
->
header
.
length
=
sizeof
(
proxy_ss_header_t
);
req
->
header
.
length
=
sizeof
(
proxy_ss_header_t
);
...
@@ -195,7 +195,7 @@ static inline void ss_send_vtp_resp(struct VirtualTimeInfo_Type *virtualTime)
...
@@ -195,7 +195,7 @@ static inline void ss_send_vtp_resp(struct VirtualTimeInfo_Type *virtualTime)
req
->
tinfo
.
sfn
=
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
;
req
->
tinfo
.
sfn
=
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
;
req
->
tinfo
.
sf
=
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
;
req
->
tinfo
.
sf
=
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
;
LOG_A
(
ENB_
AP
P
,
"VTP_ACK Command to proxy sent for cell_id: %d SFN %d SF %d
\n
"
,
LOG_A
(
ENB_
SS_VT
P
,
"VTP_ACK Command to proxy sent for cell_id: %d SFN %d SF %d
\n
"
,
req
->
header
.
cell_id
,
req
->
tinfo
.
sfn
,
req
->
tinfo
.
sf
);
req
->
header
.
cell_id
,
req
->
tinfo
.
sfn
,
req
->
tinfo
.
sf
);
vtp_send_proxy
((
void
*
)
req
,
sizeof
(
VtpCmdReq_t
));
vtp_send_proxy
((
void
*
)
req
,
sizeof
(
VtpCmdReq_t
));
...
@@ -216,7 +216,7 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx, bool vtInit)
...
@@ -216,7 +216,7 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx, bool vtInit)
while
(
1
)
while
(
1
)
{
{
int
userId
=
acpRecvMsg
(
ctx
,
&
msgSize
,
buffer
);
int
userId
=
acpRecvMsg
(
ctx
,
&
msgSize
,
buffer
);
LOG_A
(
ENB_
AP
P
,
"[SS-VTP] Received msgSize=%d, userId=%d
\n
"
,
(
int
)
msgSize
,
userId
);
LOG_A
(
ENB_
SS_VT
P
,
"[SS-VTP] Received msgSize=%d, userId=%d
\n
"
,
(
int
)
msgSize
,
userId
);
// Error handling
// Error handling
if
(
userId
<
0
)
if
(
userId
<
0
)
...
@@ -256,12 +256,12 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx, bool vtInit)
...
@@ -256,12 +256,12 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx, bool vtInit)
if
(
userId
==
MSG_SysVTEnquireTimingAck_userId
)
if
(
userId
==
MSG_SysVTEnquireTimingAck_userId
)
{
{
LOG_A
(
ENB_
AP
P
,
"[SS-VTP] Received VTEnquireTimingAck Request
\n
"
);
LOG_A
(
ENB_
SS_VT
P
,
"[SS-VTP] Received VTEnquireTimingAck Request
\n
"
);
LOG_D
(
ENB_SS
,
"fxn1:%s received VTEnquireTimingAck Request from TTCN
\n
"
,
__FUNCTION__
);
LOG_D
(
ENB_SS
_VTP
,
"fxn1:%s received VTEnquireTimingAck Request from TTCN
\n
"
,
__FUNCTION__
);
if
(
acpSysVTEnquireTimingAckDecSrv
(
ctx
,
buffer
,
msgSize
,
&
virtualTime
)
!=
0
)
if
(
acpSysVTEnquireTimingAckDecSrv
(
ctx
,
buffer
,
msgSize
,
&
virtualTime
)
!=
0
)
{
{
LOG_E
(
ENB_
AP
P
,
"[SS-VTP] acpVngProcessDecSrv failed
\n
"
);
LOG_E
(
ENB_
SS_VT
P
,
"[SS-VTP] acpVngProcessDecSrv failed
\n
"
);
break
;
break
;
}
}
...
@@ -271,18 +271,18 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx, bool vtInit)
...
@@ -271,18 +271,18 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx, bool vtInit)
ss_send_vtp_resp
(
virtualTime
);
ss_send_vtp_resp
(
virtualTime
);
if
(
virtualTime
->
TimingInfo
.
SFN
.
d
&&
(
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
&
32
)
==
0
)
{
if
(
virtualTime
->
TimingInfo
.
SFN
.
d
&&
(
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
&
32
)
==
0
)
{
LOG_I
(
ENB_
AP
P
,
"[SS-VTP] SFN: %d
\n
"
,
LOG_I
(
ENB_
SS_VT
P
,
"[SS-VTP] SFN: %d
\n
"
,
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
);
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
);
if
(
virtualTime
->
TimingInfo
.
Subframe
.
d
)
{
if
(
virtualTime
->
TimingInfo
.
Subframe
.
d
)
{
LOG_I
(
ENB_
AP
P
,
"[SS-VTP]SubFrame: %d
\n
"
,
LOG_I
(
ENB_
SS_VT
P
,
"[SS-VTP]SubFrame: %d
\n
"
,
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
);
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
);
}
}
}
}
}
else
{
}
else
{
ss_send_vtp_resp
(
virtualTime
);
ss_send_vtp_resp
(
virtualTime
);
LOG_W
(
ENB_
AP
P
,
"[SS-VTP] disabled
\n
"
);
LOG_W
(
ENB_
SS_VT
P
,
"[SS-VTP] disabled
\n
"
);
}
}
acpSysVTEnquireTimingAckFreeSrv
(
virtualTime
);
acpSysVTEnquireTimingAckFreeSrv
(
virtualTime
);
// TODo forward the message to sys_task ACK
// TODo forward the message to sys_task ACK
...
@@ -310,15 +310,15 @@ void *ss_eNB_vtp_process_itti_msg(void *notUsed)
...
@@ -310,15 +310,15 @@ void *ss_eNB_vtp_process_itti_msg(void *notUsed)
ss_set_timinfo_t
tinfo
;
ss_set_timinfo_t
tinfo
;
tinfo
.
sf
=
SS_UPD_TIM_INFO
(
received_msg
).
sf
;
tinfo
.
sf
=
SS_UPD_TIM_INFO
(
received_msg
).
sf
;
tinfo
.
sfn
=
SS_UPD_TIM_INFO
(
received_msg
).
sfn
;
tinfo
.
sfn
=
SS_UPD_TIM_INFO
(
received_msg
).
sfn
;
LOG_D
(
ENB_SS
,
"fxn1:%s Received SS_UPD_TIM_INFO
\n
"
,
__FUNCTION__
);
LOG_D
(
ENB_SS
_VTP
,
"fxn1:%s Received SS_UPD_TIM_INFO
\n
"
,
__FUNCTION__
);
if
(
SS_UPD_TIM_INFO
(
received_msg
).
physCellId
)
{
if
(
SS_UPD_TIM_INFO
(
received_msg
).
physCellId
)
{
cellIndex
=
get_cell_index_pci
(
SS_UPD_TIM_INFO
(
received_msg
).
physCellId
,
SS_context
.
SSCell_list
);
cellIndex
=
get_cell_index_pci
(
SS_UPD_TIM_INFO
(
received_msg
).
physCellId
,
SS_context
.
SSCell_list
);
LOG_A
(
ENB_SS
,
"[VTP] cellIndex in SS_UPD_TIM_INFO: %d PhysicalCellId: %d
\n
"
,
cellIndex
,
SS_context
.
SSCell_list
[
cellIndex
].
PhysicalCellId
);
LOG_A
(
ENB_SS
_VTP
,
"[VTP] cellIndex in SS_UPD_TIM_INFO: %d PhysicalCellId: %d
\n
"
,
cellIndex
,
SS_context
.
SSCell_list
[
cellIndex
].
PhysicalCellId
);
}
}
if
(
isConnected
==
true
)
{
if
(
isConnected
==
true
)
{
if
((
tinfo
.
sfn
%
32
)
==
0
&&
tinfo
.
sf
==
0
)
{
if
((
tinfo
.
sfn
%
32
)
==
0
&&
tinfo
.
sf
==
0
)
{
LOG_W
(
ENB_
AP
P
,
"[VTP] received VTP_UPD_TIM_INFO SFN: %d SF: %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_W
(
ENB_
SS_VT
P
,
"[VTP] received VTP_UPD_TIM_INFO SFN: %d SF: %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
}
}
ss_vtp_send_tinfo
(
TASK_VTP
,
&
tinfo
);
ss_vtp_send_tinfo
(
TASK_VTP
,
&
tinfo
);
}
}
...
@@ -328,15 +328,15 @@ void *ss_eNB_vtp_process_itti_msg(void *notUsed)
...
@@ -328,15 +328,15 @@ void *ss_eNB_vtp_process_itti_msg(void *notUsed)
case
TERMINATE_MESSAGE
:
case
TERMINATE_MESSAGE
:
{
{
LOG_D
(
ENB_SS
,
"fxn1:%s Received TERMINATE_MESSAGE
\n
"
,
__FUNCTION__
);
LOG_D
(
ENB_SS
_VTP
,
"fxn1:%s Received TERMINATE_MESSAGE
\n
"
,
__FUNCTION__
);
LOG_E
(
ENB_
AP
P
,
"[SS-VTP] Terminate message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
LOG_E
(
ENB_
SS_VT
P
,
"[SS-VTP] Terminate message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
itti_exit_task
();
itti_exit_task
();
}
}
break
;
break
;
default:
default:
LOG_D
(
ENB_SS
,
"fxn1:%s Received unhandled message
\n
"
,
__FUNCTION__
);
LOG_D
(
ENB_SS
_VTP
,
"fxn1:%s Received unhandled message
\n
"
,
__FUNCTION__
);
LOG_E
(
ENB_
AP
P
,
"[SS-VTP] Received unhandled message %d:%s
\n
"
,
LOG_E
(
ENB_
SS_VT
P
,
"[SS-VTP] Received unhandled message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
}
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
...
@@ -345,7 +345,7 @@ void *ss_eNB_vtp_process_itti_msg(void *notUsed)
...
@@ -345,7 +345,7 @@ void *ss_eNB_vtp_process_itti_msg(void *notUsed)
}
}
ss_eNB_read_from_vtp_socket
(
ctx_vtp_g
,
false
);
ss_eNB_read_from_vtp_socket
(
ctx_vtp_g
,
false
);
LOG_D
(
ENB_SS
,
"Exit from fxn1:%s
\n
"
,
__FUNCTION__
);
LOG_D
(
ENB_SS
_VTP
,
"Exit from fxn1:%s
\n
"
,
__FUNCTION__
);
return
NULL
;
return
NULL
;
}
}
...
@@ -364,7 +364,7 @@ int ss_eNB_vtp_init(void)
...
@@ -364,7 +364,7 @@ int ss_eNB_vtp_init(void)
{
{
port
=
7780
;
port
=
7780
;
}
}
LOG_A
(
ENB_
AP
P
,
"[SS-VTP] Initializing VTP Port %s:%d
\n
"
,
hostIp
,
port
);
LOG_A
(
ENB_
SS_VT
P
,
"[SS-VTP] Initializing VTP Port %s:%d
\n
"
,
hostIp
,
port
);
// acpInit(malloc, free, 1000);
// acpInit(malloc, free, 1000);
const
struct
acpMsgTable
msgTable
[]
=
{
const
struct
acpMsgTable
msgTable
[]
=
{
{
"SysVTEnquireTimingAck"
,
MSG_SysVTEnquireTimingAck_userId
},
{
"SysVTEnquireTimingAck"
,
MSG_SysVTEnquireTimingAck_userId
},
...
@@ -381,14 +381,14 @@ int ss_eNB_vtp_init(void)
...
@@ -381,14 +381,14 @@ int ss_eNB_vtp_init(void)
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_vtp_g
);
int
ret
=
acpServerInitWithCtx
(
ipaddr
,
port
,
msgTable
,
aSize
,
&
ctx_vtp_g
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
LOG_E
(
ENB_
AP
P
,
"[SS-VTP] Connection failure err=%d
\n
"
,
ret
);
LOG_E
(
ENB_
SS_VT
P
,
"[SS-VTP] Connection failure err=%d
\n
"
,
ret
);
return
-
1
;
return
-
1
;
}
}
#ifdef ACP_DEBUG_DUMP_MSGS
/** TODO: Need to verify */
#ifdef ACP_DEBUG_DUMP_MSGS
/** TODO: Need to verify */
adbgSetPrintLogFormat
(
ctx
,
true
);
adbgSetPrintLogFormat
(
ctx
,
true
);
#endif
#endif
int
fd1
=
acpGetSocketFd
(
ctx_vtp_g
);
int
fd1
=
acpGetSocketFd
(
ctx_vtp_g
);
LOG_A
(
ENB_
AP
P
,
"[SS-VTP] Connected: %d
\n
"
,
fd1
);
LOG_A
(
ENB_
SS_VT
P
,
"[SS-VTP] Connected: %d
\n
"
,
fd1
);
itti_mark_task_ready
(
TASK_VTP
);
itti_mark_task_ready
(
TASK_VTP
);
return
0
;
return
0
;
...
@@ -403,11 +403,10 @@ static void ss_eNB_wait_first_msg(void)
...
@@ -403,11 +403,10 @@ static void ss_eNB_wait_first_msg(void)
{
{
ss_eNB_read_from_vtp_socket
(
ctx_vtp_g
,
true
);
ss_eNB_read_from_vtp_socket
(
ctx_vtp_g
,
true
);
if
(
isConnected
==
true
){
if
(
isConnected
==
true
){
LOG_A
(
ENB_APP
,
"[SS_VTP] VT-HANDSHAKE with Client Completed (on-start)
\n
"
);
LOG_A
(
ENB_SS_VTP
,
"[SS_VTP] VT-HANDSHAKE with Client Completed (on-start)
\n
"
);
RC
.
ss
.
vtp_ready
=
1
;
break
;
break
;
}
}
LOG_A
(
ENB_
AP
P
,
"[SS_VTP] Waiting for VT-HANDSHAKE with Client(on-start)
\n
"
);
LOG_A
(
ENB_
SS_VT
P
,
"[SS_VTP] Waiting for VT-HANDSHAKE with Client(on-start)
\n
"
);
}
}
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
@@ -419,7 +418,7 @@ void* ss_eNB_vtp_task(void *arg) {
...
@@ -419,7 +418,7 @@ void* ss_eNB_vtp_task(void *arg) {
sleep
(
5
);
sleep
(
5
);
int
retVal
=
ss_eNB_vtp_init
();
int
retVal
=
ss_eNB_vtp_init
();
if
(
retVal
!=
-
1
)
{
if
(
retVal
!=
-
1
)
{
LOG_A
(
ENB_
AP
P
,
"[SS-VTP] Enabled VTP starting the itti_msg_handler
\n
"
);
LOG_A
(
ENB_
SS_VT
P
,
"[SS-VTP] Enabled VTP starting the itti_msg_handler
\n
"
);
ss_eNB_wait_first_msg
();
ss_eNB_wait_first_msg
();
...
@@ -430,7 +429,7 @@ void* ss_eNB_vtp_task(void *arg) {
...
@@ -430,7 +429,7 @@ void* ss_eNB_vtp_task(void *arg) {
}
}
}
else
{
}
else
{
LOG_A
(
ENB_
AP
P
,
"[SS-VTP] VTP port disabled at eNB
\n
"
);
LOG_A
(
ENB_
SS_VT
P
,
"[SS-VTP] VTP port disabled at eNB
\n
"
);
sleep
(
10
);
sleep
(
10
);
}
}
...
...
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