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
canghaiwuhen
OpenXG-RAN
Commits
7ed0aa1d
Commit
7ed0aa1d
authored
Sep 20, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add F1U proto_agent calls, remove old code
parent
eacd1cfb
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
120 deletions
+60
-120
common/utils/LOG/log.h
common/utils/LOG/log.h
+0
-5
openair2/F1AP/f1ap_cu_task.c
openair2/F1AP/f1ap_cu_task.c
+12
-0
openair2/F1AP/f1ap_du_task.c
openair2/F1AP/f1ap_du_task.c
+13
-0
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+32
-17
openair2/LAYER2/RLC/rlc.c
openair2/LAYER2/RLC/rlc.c
+3
-88
openair2/LAYER2/RLC/rlc.h
openair2/LAYER2/RLC/rlc.h
+0
-10
No files found.
common/utils/LOG/log.h
View file @
7ed0aa1d
...
@@ -524,11 +524,6 @@ static inline void updateTimes(uint64_t start, Meas *M, int period, char * txt)
...
@@ -524,11 +524,6 @@ static inline void updateTimes(uint64_t start, Meas *M, int period, char * txt)
}
}
#endif
#endif
pthread_mutex_t
async_server_lock
;
pthread_cond_t
async_server_notify
;
int
async_server_shutdown
;
#endif
#endif
openair2/F1AP/f1ap_cu_task.c
View file @
7ed0aa1d
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include "f1ap_cu_interface_management.h"
#include "f1ap_cu_interface_management.h"
#include "f1ap_cu_rrc_message_transfer.h"
#include "f1ap_cu_rrc_message_transfer.h"
#include "f1ap_cu_task.h"
#include "f1ap_cu_task.h"
#include "proto_agent.h"
extern
RAN_CONTEXT_t
RC
;
extern
RAN_CONTEXT_t
RC
;
...
@@ -64,6 +65,17 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
...
@@ -64,6 +65,17 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
f1ap_du_data_from_du
->
assoc_id
=
sctp_new_association_resp
->
assoc_id
;
f1ap_du_data_from_du
->
assoc_id
=
sctp_new_association_resp
->
assoc_id
;
f1ap_du_data_from_du
->
sctp_in_streams
=
sctp_new_association_resp
->
in_streams
;
f1ap_du_data_from_du
->
sctp_in_streams
=
sctp_new_association_resp
->
in_streams
;
f1ap_du_data_from_du
->
sctp_out_streams
=
sctp_new_association_resp
->
out_streams
;
f1ap_du_data_from_du
->
sctp_out_streams
=
sctp_new_association_resp
->
out_streams
;
/* setup parameters for F1U and start the server */
const
cudu_params_t
params
=
{
.
local_interface
=
NULL
,
/* is not used */
.
local_ipv4_address
=
RC
.
rrc
[
instance
]
->
eth_params_s
.
my_addr
,
.
local_port
=
RC
.
rrc
[
instance
]
->
eth_params_s
.
my_portd
,
.
remote_ipv4_address
=
RC
.
rrc
[
instance
]
->
eth_params_s
.
remote_addr
,
.
remote_port
=
RC
.
rrc
[
instance
]
->
eth_params_s
.
remote_portd
};
AssertFatal
(
proto_agent_start
(
instance
,
&
params
)
==
0
,
"could not start PROTO_AGENT for F1U on instance %d!
\n
"
,
instance
);
}
}
void
cu_task_handle_sctp_data_ind
(
instance_t
instance
,
sctp_data_ind_t
*
sctp_data_ind
)
{
void
cu_task_handle_sctp_data_ind
(
instance_t
instance
,
sctp_data_ind_t
*
sctp_data_ind
)
{
...
...
openair2/F1AP/f1ap_du_task.c
View file @
7ed0aa1d
...
@@ -34,6 +34,9 @@
...
@@ -34,6 +34,9 @@
#include "f1ap_handlers.h"
#include "f1ap_handlers.h"
#include "f1ap_du_interface_management.h"
#include "f1ap_du_interface_management.h"
#include "f1ap_du_task.h"
#include "f1ap_du_task.h"
#include "proto_agent.h"
extern
RAN_CONTEXT_t
RC
;
f1ap_setup_req_t
*
f1ap_du_data
;
f1ap_setup_req_t
*
f1ap_du_data
;
...
@@ -95,6 +98,16 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
...
@@ -95,6 +98,16 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
f1ap_du_data
->
sctp_out_streams
=
sctp_new_association_resp
->
out_streams
;
f1ap_du_data
->
sctp_out_streams
=
sctp_new_association_resp
->
out_streams
;
f1ap_du_data
->
default_sctp_stream_id
=
0
;
f1ap_du_data
->
default_sctp_stream_id
=
0
;
/* setup parameters for F1U and start the server */
const
cudu_params_t
params
=
{
.
local_interface
=
NULL
,
/* is not used */
.
local_ipv4_address
=
RC
.
mac
[
instance
]
->
eth_params_n
.
my_addr
,
.
local_port
=
RC
.
mac
[
instance
]
->
eth_params_n
.
my_portd
,
.
remote_ipv4_address
=
RC
.
mac
[
instance
]
->
eth_params_n
.
remote_addr
,
.
remote_port
=
RC
.
mac
[
instance
]
->
eth_params_n
.
remote_portd
};
AssertFatal
(
proto_agent_start
(
instance
,
&
params
)
==
0
,
"could not start PROTO_AGENT for F1U on instance %d!
\n
"
,
instance
);
DU_send_F1_SETUP_REQUEST
(
instance
);
DU_send_F1_SETUP_REQUEST
(
instance
);
}
}
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
7ed0aa1d
...
@@ -189,11 +189,23 @@ boolean_t pdcp_data_req(
...
@@ -189,11 +189,23 @@ boolean_t pdcp_data_req(
(
unsigned
char
*
)
&
pdcp_pdu_p
->
data
[
0
],
(
unsigned
char
*
)
&
pdcp_pdu_p
->
data
[
0
],
sdu_buffer_sizeP
);
sdu_buffer_sizeP
);
#endif
#endif
rlc_status
=
rlc_data_req
(
ctxt_pP
,
srb_flagP
,
MBMS_FLAG_YES
,
rb_idP
,
muiP
,
confirmP
,
sdu_buffer_sizeP
,
pdcp_pdu_p
if
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
node_type
==
ngran_eNB_CU
||
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
node_type
==
ngran_ng_eNB_CU
||
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
node_type
==
ngran_gNB_CU
)
{
/* currently, there is no support to send also the source/destinationL2Id */
proto_agent_send_rlc_data_req
(
ctxt_pP
,
srb_flagP
,
MBMS_FLAG_NO
,
rb_idP
,
muiP
,
confirmP
,
sdu_buffer_sizeP
,
pdcp_pdu_p
);
/* assume good status */
rlc_status
=
RLC_OP_STATUS_OK
;
}
else
{
rlc_status
=
rlc_data_req
(
ctxt_pP
,
srb_flagP
,
MBMS_FLAG_YES
,
rb_idP
,
muiP
,
confirmP
,
sdu_buffer_sizeP
,
pdcp_pdu_p
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
NULL
,
NULL
,
NULL
,
NULL
#endif
#endif
);
);
}
}
else
{
}
else
{
rlc_status
=
RLC_OP_STATUS_OUT_OF_RESSOURCES
;
rlc_status
=
RLC_OP_STATUS_OUT_OF_RESSOURCES
;
LOG_W
(
PDCP
,
PROTOCOL_CTXT_FMT
" PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY
\n
"
,
LOG_W
(
PDCP
,
PROTOCOL_CTXT_FMT
" PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY
\n
"
,
...
@@ -377,21 +389,24 @@ boolean_t pdcp_data_req(
...
@@ -377,21 +389,24 @@ boolean_t pdcp_data_req(
#ifndef UETARGET
#ifndef UETARGET
if
((
pdcp_pdu_p
!=
NULL
)
&&
(
srb_flagP
==
0
)
&&
(
ctxt_pP
->
enb_flag
==
1
))
if
((
pdcp_pdu_p
!=
NULL
)
&&
(
srb_flagP
==
0
)
&&
(
ctxt_pP
->
enb_flag
==
1
))
{
{
if
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
node_type
==
ngran_eNB_CU
||
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
node_type
==
ngran_ng_eNB_CU
||
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
node_type
==
ngran_gNB_CU
)
{
/* currently, there is no support to send also the source/destinationL2Id */
proto_agent_send_rlc_data_req
(
ctxt_pP
,
srb_flagP
,
MBMS_FLAG_NO
,
rb_idP
,
muiP
,
confirmP
,
pdcp_pdu_size
,
pdcp_pdu_p
);
/* assume good status */
rlc_status
=
RLC_OP_STATUS_OK
;
}
else
{
{
rlc_status
=
rlc_data_req
(
ctxt_pP
,
srb_flagP
,
MBMS_FLAG_NO
,
rb_idP
,
muiP
,
LOG_E
(
PDCP
,
"proto_agent_send_rlc_data_req()
\n
"
);
confirmP
,
pdcp_pdu_size
,
pdcp_pdu_p
{
//proto_agent_send_rlc_data_req(0,cudu->cu[j].du_type, ctxt_pP, srb_flagP,
//MBMS_FLAG_NO,rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p);
}
//rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
//
,sourceL2Id
,
sourceL2Id
//
,destinationL2Id
,
destinationL2Id
#endif
#endif
//);
);
}
/* end if node_type is CU */
}
free_mem_block
(
pdcp_pdu_p
,
__FUNCTION__
);
free_mem_block
(
pdcp_pdu_p
,
__FUNCTION__
);
rlc_status
=
ack_result
;
rlc_status
=
ack_result
;
...
...
openair2/LAYER2/RLC/rlc.c
View file @
7ed0aa1d
...
@@ -54,68 +54,7 @@ extern boolean_t pdcp_data_ind(
...
@@ -54,68 +54,7 @@ extern boolean_t pdcp_data_ind(
#include "rlc_proto_agent_primitives.h"
#include "proto_agent.h"
// PROTO AGENT
#ifndef UETARGET
void
async_server_thread_init
(
void
)
{
//create log_list
//log_list_init(&log_list);
//AssertFatal(0, "this should not be reached!\n");
async_server_shutdown
=
0
;
if
((
pthread_mutex_init
(
&
async_server_lock
,
NULL
)
!=
0
)
||
(
pthread_cond_init
(
&
async_server_notify
,
NULL
)
!=
0
))
{
return
;
}
//if (pthread_create (&async_server_thread, NULL, proto_server_init, (void*) NULL)
// != 0) {
// async_server_thread_finalize();
// return;
//}
}
int
async_server_thread_finalize
(
void
)
{
int
err
=
0
;
if
(
pthread_mutex_lock
(
&
async_server_lock
)
!=
0
)
{
return
-
1
;
}
async_server_shutdown
=
1
;
/* Wake up LOG thread */
if
((
pthread_cond_broadcast
(
&
async_server_notify
)
!=
0
)
||
(
pthread_mutex_unlock
(
&
async_server_lock
)
!=
0
))
{
err
=
-
1
;
}
if
(
pthread_join
(
async_server_thread
,
NULL
)
!=
0
)
{
err
=
-
1
;
}
if
(
pthread_mutex_unlock
(
&
async_server_lock
)
!=
0
)
{
err
=
-
1
;
}
if
(
!
err
)
{
//log_list_free(&log_list);
pthread_mutex_lock
(
&
async_server_lock
);
pthread_mutex_destroy
(
&
async_server_lock
);
pthread_cond_destroy
(
&
async_server_notify
);
}
return
err
;
}
#endif
/*UETARGET*/
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void
rlc_util_print_hex_octets
(
comp_name_t
componentP
,
unsigned
char
*
dataP
,
const
signed
long
sizeP
)
void
rlc_util_print_hex_octets
(
comp_name_t
componentP
,
unsigned
char
*
dataP
,
const
signed
long
sizeP
)
...
@@ -680,24 +619,13 @@ void rlc_data_ind (
...
@@ -680,24 +619,13 @@ void rlc_data_ind (
T
(
T_ENB_RLC_UL
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
rnti
),
T_INT
(
rb_idP
),
T_INT
(
sdu_sizeP
));
T
(
T_ENB_RLC_UL
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
rnti
),
T_INT
(
rb_idP
),
T_INT
(
sdu_sizeP
));
#endif
#endif
#ifndef UETARGET
#ifndef UETARGET
if
(
(
!
srb_flagP
)
&&
(
ctxt_pP
->
enb_flag
==
1
)
)
if
(
ctxt_pP
->
enb_flag
==
1
)
{
{
proto_agent_send_pdcp_data_ind
(
ctxt_pP
,
srb_flagP
,
MBMS_flagP
,
rb_idP
,
sdu_sizeP
,
sdu_pP
);
}
else
{
switch
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
node_type
){
switch
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
node_type
){
case
ngran_eNB_CU
:
case
ngran_eNB_CU
:
case
ngran_ng_eNB_CU
:
case
ngran_ng_eNB_CU
:
case
ngran_gNB_CU
:
case
ngran_gNB_CU
:
pdcp_data_ind
(
p
roto_agent_send_p
dcp_data_ind
(
ctxt_pP
,
ctxt_pP
,
1
,
// srb_flagP,
1
,
// srb_flagP,
0
,
// MBMS_flagP,
0
,
// MBMS_flagP,
...
@@ -804,19 +732,6 @@ rlc_module_init (void)
...
@@ -804,19 +732,6 @@ rlc_module_init (void)
pool_buffer_init
();
pool_buffer_init
();
/*
#ifndef UETARGET
// Launch the RLC listening server
// as a separate thread
static int started = 0;
if (started == 0)
{
async_server_thread_init();
started = 1;
}
#endif
*/
return
(
0
);
return
(
0
);
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
...
...
openair2/LAYER2/RLC/rlc.h
View file @
7ed0aa1d
...
@@ -682,14 +682,4 @@ int rlc_module_init(void);
...
@@ -682,14 +682,4 @@ int rlc_module_init(void);
#define RLC_REVERSE_VIDEO "\e[7m"
#define RLC_REVERSE_VIDEO "\e[7m"
#define RLC_NORMAL_VIDEO "\e[27m"
#define RLC_NORMAL_VIDEO "\e[27m"
// PROTO AGENT
pthread_t
async_server_thread
;
int
async_server_thread_finalize
(
void
);
void
async_server_thread_init
(
void
);
#endif
#endif
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