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
Michael Black
OpenXG-RAN
Commits
686e5856
Commit
686e5856
authored
3 years ago
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace protobuf in 4G F1 split, first step: UL packets
parent
df82ee1b
Branches unavailable
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
2022.w32
2022.w31
2022.w31b
2022.w30
2022.w29
2022.w26
2022.w25
2022.w24
2022.w24b
2022.w23
2022.w22
2022.w21
2022.w20
2022.w19
2022.w18
2022.w17
2022.w15
2022.w15b
2022.w14a
2022.w13
2022.w13b
2022.w13a
2022.w12
2022.w10
2022.w09
2022.w09b
2022.w08
2022.w08b
2022.w07
2022.w07b
2022.w06
2022.w06a
2022.w05
2022.w05b
2022.w03_hotfix
2022.w03_b
2022.w02
2022.w01
setparam
flexran-eol
No related merge requests found
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
281 additions
and
166 deletions
+281
-166
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
common/utils/LOG/log.c
common/utils/LOG/log.c
+2
-0
common/utils/LOG/log.h
common/utils/LOG/log.h
+2
-0
common/utils/T/T_messages.txt
common/utils/T/T_messages.txt
+42
-0
common/utils/ocp_itti/intertask_interface.cpp
common/utils/ocp_itti/intertask_interface.cpp
+13
-13
common/utils/system.c
common/utils/system.c
+1
-1
common/utils/threadPool/thread-pool.h
common/utils/threadPool/thread-pool.h
+1
-1
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+3
-0
openair2/F1AP/f1ap_cu_task.c
openair2/F1AP/f1ap_cu_task.c
+2
-2
openair2/F1AP/f1ap_du_rrc_message_transfer.c
openair2/F1AP/f1ap_du_rrc_message_transfer.c
+1
-2
openair2/F1AP/f1ap_du_task.c
openair2/F1AP/f1ap_du_task.c
+5
-2
openair2/F1AP/f1ap_du_ue_context_management.c
openair2/F1AP/f1ap_du_ue_context_management.c
+125
-106
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+13
-1
openair2/LAYER2/PROTO_AGENT/proto_agent.c
openair2/LAYER2/PROTO_AGENT/proto_agent.c
+1
-0
openair2/LAYER2/rlc_v2/rlc_oai_api.c
openair2/LAYER2/rlc_v2/rlc_oai_api.c
+14
-0
openair2/RRC/LTE/rrc_eNB_S1AP.c
openair2/RRC/LTE/rrc_eNB_S1AP.c
+36
-22
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+15
-14
openair3/ocp-gtpu/gtp_itf.cpp
openair3/ocp-gtpu/gtp_itf.cpp
+1
-1
targets/COMMON/create_tasks.c
targets/COMMON/create_tasks.c
+3
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
686e5856
...
...
@@ -2830,7 +2830,7 @@ add_dependencies(lte-softmodem rrc_flag s1ap_flag x2_flag oai_iqplayer)
target_link_libraries
(
lte-softmodem
-Wl,--start-group
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB
F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U_OC
P SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB
M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U_OCP F1AP_LIB F1A
P SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB LFDS7
${
MSC_LIB
}
${
RAL_LIB
}
${
NAS_UE_LIB
}
ITTI
${
FLPT_MSG_LIB
}
${
ASYNC_IF_LIB
}
${
FLEXRAN_AGENT_LIB
}
${
FSPT_MSG_LIB
}
${
PROTO_AGENT_LIB
}
-Wl,--end-group z dl
)
...
...
This diff is collapsed.
Click to expand it.
common/utils/LOG/log.c
View file @
686e5856
...
...
@@ -476,6 +476,8 @@ int logInit (void)
register_log_component
(
"NR_MAC"
,
"log"
,
NR_MAC
);
register_log_component
(
"NR_PHY"
,
"log"
,
NR_PHY
);
register_log_component
(
"NGAP"
,
""
,
NGAP
);
register_log_component
(
"ITTI"
,
"log"
,
ITTI
);
register_log_component
(
"UTIL"
,
"log"
,
UTIL
);
for
(
int
i
=
0
;
log_level_names
[
i
].
name
!=
NULL
;
i
++
)
g_log
->
level2string
[
i
]
=
toupper
(
log_level_names
[
i
].
name
[
0
]);
// uppercased first letter of level name
...
...
This diff is collapsed.
Click to expand it.
common/utils/LOG/log.h
View file @
686e5856
...
...
@@ -237,6 +237,8 @@ typedef enum {
ASN
,
NFAPI_VNF
,
NFAPI_PNF
,
ITTI
,
UTIL
,
MAX_LOG_PREDEF_COMPONENTS
,
}
comp_name_t
;
...
...
This diff is collapsed.
Click to expand it.
common/utils/T/T_messages.txt
View file @
686e5856
...
...
@@ -1057,6 +1057,48 @@ ID = LEGACY_NFAPI_PNF_TRACE
DESC = NFAPI_PNF legacy logs - trace level
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_ITTI_INFO
DESC = ITTI legacy logs - info level
GROUP = ALL:LEGACY_ITTI:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_ITTI_ERROR
DESC = ITTI legacy logs - error level
GROUP = ALL:LEGACY_ITTI:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_ITTI_WARNING
DESC = ITTI legacy logs - warning level
GROUP = ALL:LEGACY_ITTI:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_ITTI_DEBUG
DESC = ITTI legacy logs - debug level
GROUP = ALL:LEGACY_ITTI:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_ITTI_TRACE
DESC = ITTI legacy logs - trace level
GROUP = ALL:LEGACY_ITTI:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_UTIL_INFO
DESC = UTIL legacy logs - info level
GROUP = ALL:LEGACY_UTIL:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_UTIL_ERROR
DESC = UTIL legacy logs - error level
GROUP = ALL:LEGACY_UTIL:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_UTIL_WARNING
DESC = UTIL legacy logs - warning level
GROUP = ALL:LEGACY_UTIL:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_UTIL_DEBUG
DESC = UTIL legacy logs - debug level
GROUP = ALL:LEGACY_UTIL:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_UTIL_TRACE
DESC = UTIL legacy logs - trace level
GROUP = ALL:LEGACY_UTIL:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
# this is a bad hack but I won't fix (function util_print_hex_octets
# in openairinterface5g/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c
# does funky things with the LOG_x macros but we work on the C pre-processor
...
...
This diff is collapsed.
Click to expand it.
common/utils/ocp_itti/intertask_interface.cpp
View file @
686e5856
...
...
@@ -136,12 +136,12 @@ extern "C" {
LOG_E
(
TMR
,
"Queue for %s task contains %ld messages
\n
"
,
itti_get_task_name
(
destination_task_id
),
s
);
if
(
s
>
50
)
LOG_I
(
TMR
,
"Queue for %s task size: %ld (last message %s)
\n
"
,
itti_get_task_name
(
destination_task_id
),
s
+
1
,
ITTI_MSG_NAME
(
message
));
LOG_I
(
ITTI
,
"Queue for %s task size: %ld (last message %s)
\n
"
,
itti_get_task_name
(
destination_task_id
),
s
+
1
,
ITTI_MSG_NAME
(
message
));
t
->
message_queue
.
insert
(
t
->
message_queue
.
begin
(),
message
);
eventfd_t
sem_counter
=
1
;
AssertFatal
(
sizeof
(
sem_counter
)
==
write
(
t
->
sem_fd
,
&
sem_counter
,
sizeof
(
sem_counter
)),
""
);
LOG_D
(
TMR
,
"sent messages id=%d to %s
\n
"
,
message_id
,
t
->
admin
.
name
);
LOG_D
(
ITTI
,
"sent messages id=%d to %s
\n
"
,
message_id
,
t
->
admin
.
name
);
return
0
;
}
...
...
@@ -152,7 +152,7 @@ extern "C" {
while
(
t
->
message_queue
.
size
()
>
0
&&
t
->
admin
.
func
!=
NULL
)
{
if
(
t
->
message_queue
.
size
()
>
1
)
LOG_W
(
TMR
,
"queue in no thread mode is %ld
\n
"
,
t
->
message_queue
.
size
());
LOG_W
(
ITTI
,
"queue in no thread mode is %ld
\n
"
,
t
->
message_queue
.
size
());
pthread_mutex_unlock
(
&
t
->
queue_cond_lock
);
t
->
admin
.
func
(
NULL
);
...
...
@@ -208,7 +208,7 @@ extern "C" {
message
->
ittiMsg
.
timer_has_expired
.
arg
=
it
->
second
.
timer_arg
;
if
(
itti_send_msg_to_task_locked
(
task_id
,
it
->
second
.
instance
,
message
)
<
0
)
{
LOG_W
(
TMR
,
"Failed to send msg TIMER_HAS_EXPIRED to task %u
\n
"
,
task_id
);
LOG_W
(
ITTI
,
"Failed to send msg TIMER_HAS_EXPIRED to task %u
\n
"
,
task_id
);
free
(
message
);
t
->
timer_map
.
erase
(
it
);
return
-
1
;
...
...
@@ -233,7 +233,7 @@ extern "C" {
epoll_timeout
=
t
->
next_timer
-
current_time
;
pthread_mutex_unlock
(
&
t
->
queue_cond_lock
);
LOG_D
(
TMR
,
"enter blocking wait for %s
\n
"
,
itti_get_task_name
(
task_id
)
);
LOG_D
(
ITTI
,
"enter blocking wait for %s, timeout: %d ms
\n
"
,
itti_get_task_name
(
task_id
),
epoll_timeout
);
t
->
nb_events
=
epoll_wait
(
t
->
epoll_fd
,
t
->
events
,
t
->
nb_fd_epoll
,
epoll_timeout
);
if
(
t
->
nb_events
<
0
&&
(
errno
==
EINTR
||
errno
==
EAGAIN
)
)
...
...
@@ -243,7 +243,7 @@ extern "C" {
AssertFatal
(
t
->
nb_events
>=
0
,
"epoll_wait failed for task %s, nb fds %d, timeout %lu: %s!
\n
"
,
itti_get_task_name
(
task_id
),
t
->
nb_fd_epoll
,
t
->
next_timer
!=
UINT64_MAX
?
t
->
next_timer
-
current_time
:
-
1
,
strerror
(
errno
));
LOG_D
(
TMR
,
"receive on %d descriptors for %s
\n
"
,
t
->
nb_events
,
itti_get_task_name
(
task_id
));
LOG_D
(
ITTI
,
"receive on %d descriptors for %s
\n
"
,
t
->
nb_events
,
itti_get_task_name
(
task_id
));
if
(
t
->
nb_events
==
0
)
/* No data to read -> return */
...
...
@@ -292,11 +292,11 @@ extern "C" {
// in this case, *received_msg is NULL
if
(
t
->
message_queue
.
empty
())
{
*
received_msg
=
NULL
;
LOG_D
(
TMR
,
"task %s received even from other fd (total fds: %d), returning msg NULL
\n
"
,
t
->
admin
.
name
,
t
->
nb_fd_epoll
);
LOG_D
(
ITTI
,
"task %s received even from other fd (total fds: %d), returning msg NULL
\n
"
,
t
->
admin
.
name
,
t
->
nb_fd_epoll
);
}
else
{
*
received_msg
=
t
->
message_queue
.
back
();
t
->
message_queue
.
pop_back
();
LOG_D
(
TMR
,
"task %s received a message
\n
"
,
t
->
admin
.
name
);
LOG_D
(
ITTI
,
"task %s received a message
\n
"
,
t
->
admin
.
name
);
}
pthread_mutex_unlock
(
&
t
->
queue_cond_lock
);
...
...
@@ -308,7 +308,7 @@ extern "C" {
pthread_mutex_lock
(
&
t
->
queue_cond_lock
);
if
(
!
t
->
message_queue
.
empty
())
{
LOG_D
(
TMR
,
"task %s received a message in polling mode
\n
"
,
t
->
admin
.
name
);
LOG_D
(
ITTI
,
"task %s received a message in polling mode
\n
"
,
t
->
admin
.
name
);
*
received_msg
=
t
->
message_queue
.
back
();
t
->
message_queue
.
pop_back
();
}
else
...
...
@@ -322,7 +322,7 @@ extern "C" {
void
*
args_p
)
{
task_list_t
*
t
=
tasks
[
task_id
];
threadCreate
(
&
t
->
thread
,
start_routine
,
args_p
,
(
char
*
)
itti_get_task_name
(
task_id
),
-
1
,
OAI_PRIORITY_RT
);
LOG_I
(
TMR
,
"Created Posix thread %s
\n
"
,
itti_get_task_name
(
task_id
)
);
LOG_I
(
ITTI
,
"Created Posix thread %s
\n
"
,
itti_get_task_name
(
task_id
)
);
return
0
;
}
...
...
@@ -344,7 +344,7 @@ extern "C" {
tasks
=
new_tasks
;
tasks
[
newQueue
]
=
new
task_list_t
;
pthread_mutex_unlock
(
&
lock_nb_queues
);
LOG_I
(
TMR
,
"Starting itti queue: %s as task %d
\n
"
,
taskInfo
->
name
,
newQueue
);
LOG_I
(
ITTI
,
"Starting itti queue: %s as task %d
\n
"
,
taskInfo
->
name
,
newQueue
);
pthread_mutex_init
(
&
tasks
[
newQueue
]
->
queue_cond_lock
,
NULL
);
memcpy
(
&
tasks
[
newQueue
]
->
admin
,
taskInfo
,
sizeof
(
task_info_t
));
AssertFatal
(
(
tasks
[
newQueue
]
->
epoll_fd
=
epoll_create1
(
0
)
)
>=
0
,
""
);
...
...
@@ -392,7 +392,7 @@ extern "C" {
clock_gettime
(
CLOCK_MONOTONIC
,
&
tp
);
if
(
interval_us
%
1000
!=
0
)
LOG_W
(
TMR
,
"Can't set timer precision below 1ms, rounding it
\n
"
);
LOG_W
(
ITTI
,
"Can't set timer precision below 1ms, rounding it
\n
"
);
timer
.
duration
=
interval_sec
*
1000
+
interval_us
/
1000
;
timer
.
timeout
=
((
uint64_t
)
tp
.
tv_sec
*
1000
+
tp
.
tv_nsec
/
(
1000
*
1000
)
+
timer
.
duration
);
...
...
@@ -421,7 +421,7 @@ extern "C" {
if
(
ret
==
1
)
return
0
;
else
{
LOG_W
(
TMR
,
"tried to remove a non existing timer
\n
"
);
LOG_W
(
ITTI
,
"tried to remove a non existing timer
\n
"
);
return
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
common/utils/system.c
View file @
686e5856
...
...
@@ -236,7 +236,7 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
ret
=
pthread_attr_setschedpolicy
(
&
attr
,
SCHED_OAI
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
if
(
priority
<
sched_get_priority_min
(
SCHED_OAI
)
||
priority
>
sched_get_priority_max
(
SCHED_OAI
))
{
LOG_E
(
TMR
,
"Prio not possible: %d, min is %d, max: %d, forced in the range
\n
"
,
LOG_E
(
UTIL
,
"Prio not possible: %d, min is %d, max: %d, forced in the range
\n
"
,
priority
,
sched_get_priority_min
(
SCHED_OAI
),
sched_get_priority_max
(
SCHED_OAI
));
...
...
This diff is collapsed.
Click to expand it.
common/utils/threadPool/thread-pool.h
View file @
686e5856
...
...
@@ -141,7 +141,7 @@ static inline notifiedFIFO_elt_t *pullNotifiedFIFO_nothreadSafe(notifiedFIFO_t
notifiedFIFO_elt_t
*
ret
=
nf
->
outF
;
if
(
nf
->
outF
==
nf
->
outF
->
next
)
LOG_E
(
TMR
,
"Circular list in thread pool: push several times the same buffer is forbidden
\n
"
);
LOG_E
(
UTIL
,
"Circular list in thread pool: push several times the same buffer is forbidden
\n
"
);
nf
->
outF
=
nf
->
outF
->
next
;
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_config.c
View file @
686e5856
...
...
@@ -1970,8 +1970,11 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
LOG_I
(
ENB_APP
,
"FIAP: DU_ip4_address in DU %p, strlen %d
\n
"
,
F1AP_SETUP_REQ
(
msg_p
).
DU_f1_ip_address
.
ipv4_address
,(
int
)
strlen
(
RC
.
mac
[
k
]
->
eth_params_n
.
my_addr
));
F1AP_SETUP_REQ
(
msg_p
).
DU_f1_ip_address
.
ipv6
=
0
;
F1AP_SETUP_REQ
(
msg_p
).
DU_f1_ip_address
.
ipv4
=
1
;
//strcpy(F1AP_SETUP_REQ (msg_p).DU_f1_ip_address.ipv6_address, "");
strcpy
(
F1AP_SETUP_REQ
(
msg_p
).
DU_f1_ip_address
.
ipv4_address
,
RC
.
mac
[
k
]
->
eth_params_n
.
my_addr
);
F1AP_SETUP_REQ
(
msg_p
).
DUport
=
RC
.
mac
[
k
]
->
eth_params_n
.
my_portd
;
F1AP_SETUP_REQ
(
msg_p
).
CUport
=
RC
.
mac
[
k
]
->
eth_params_n
.
remote_portd
;
//strcpy(F1AP_SETUP_REQ (msg_p).CU_ip_address[l].ipv6_address,*(F1ParamList.paramarray[l][ENB_CU_IPV6_ADDRESS_IDX].strptr));
//F1AP_SETUP_REQ (msg_p).CU_port = RC.mac[k]->eth_params_n.remote_portc; // maybe we dont need it
sprintf
(
aprefix
,
"%s.[%i].%s"
,
ENB_CONFIG_STRING_ENB_LIST
,
k
,
ENB_CONFIG_STRING_SCTP_CONFIG
);
...
...
This diff is collapsed.
Click to expand it.
openair2/F1AP/f1ap_cu_task.c
View file @
686e5856
...
...
@@ -45,8 +45,8 @@ static instance_t cu_task_create_gtpu_instance_to_du(eth_params_t *IPaddrs) {
openAddr_t
tmp
=
{
0
};
strncpy
(
tmp
.
originHost
,
IPaddrs
->
my_addr
,
sizeof
(
tmp
.
originHost
)
-
1
);
strncpy
(
tmp
.
destinationHost
,
IPaddrs
->
remote_addr
,
sizeof
(
tmp
.
destinationHost
)
-
1
);
sprintf
(
tmp
.
originService
,
"%d"
,
GTPV1U_UDP_PORT
);
sprintf
(
tmp
.
destinationService
,
"%d"
,
GTPV1U_UDP_PORT
);
sprintf
(
tmp
.
originService
,
"%d"
,
IPaddrs
->
my_portd
);
sprintf
(
tmp
.
destinationService
,
"%d"
,
IPaddrs
->
remote_portd
);
return
ocp_gtpv1Init
(
tmp
);
}
...
...
This diff is collapsed.
Click to expand it.
openair2/F1AP/f1ap_du_rrc_message_transfer.c
View file @
686e5856
...
...
@@ -744,7 +744,6 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
return
0
;
}
/* UL RRC Message Transfer */
int
DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER
(
instance_t
instanceP
,
int
CC_idP
,
...
...
@@ -764,7 +763,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP,
LOG_E
(
F1AP
,
"Failed to add UE
\n
"
);
return
-
1
;
}
/* Create */
/* 0. Message Type */
pdu
.
present
=
F1AP_F1AP_PDU_PR_initiatingMessage
;
...
...
This diff is collapsed.
Click to expand it.
openair2/F1AP/f1ap_du_task.c
View file @
686e5856
...
...
@@ -96,10 +96,12 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
.
remote_ipv4_address
=
tmp
->
remote_addr
,
.
remote_port
=
tmp
->
remote_portd
};
/*
if (!RC.nrrrc)
AssertFatal(proto_agent_start(instance, ¶ms) == 0,
"could not start PROTO_AGENT for F1U on instance %ld!\n", instance);
*/
DU_send_F1_SETUP_REQUEST
(
instance
);
}
...
...
@@ -149,7 +151,8 @@ void *F1AP_DU_task(void *arg) {
AssertFatal
(
getCxt
(
DUtype
,
myInstance
)
->
gtpInst
>
0
,
"Failed to create CU F1-U UDP listener"
);
// Fixme: fully inconsistent instances management
// dirty global var is a bad fix
DUuniqInstance
=
getCxt
(
DUtype
,
myInstance
)
->
gtpInst
;
extern
instance_t
legacyInstanceMapping
;
legacyInstanceMapping
=
DUuniqInstance
=
getCxt
(
DUtype
,
myInstance
)
->
gtpInst
;
du_task_send_sctp_association_req
(
myInstance
,
msgSetup
);
break
;
...
...
This diff is collapsed.
Click to expand it.
openair2/F1AP/f1ap_du_ue_context_management.c
View file @
686e5856
This diff is collapsed.
Click to expand it.
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
686e5856
...
...
@@ -154,7 +154,19 @@ boolean_t cu_f1u_data_req(
const
uint32_t
*
const
destinationL2Id
)
{
return
true
;
mem_block_t
*
memblock
=
get_free_mem_block
(
sdu_buffer_size
,
__func__
);
if
(
memblock
==
NULL
)
{
LOG_E
(
RLC
,
"%s:%d:%s: ERROR: get_free_mem_block failed
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
memcpy
(
memblock
->
data
,
sdu_buffer
,
sdu_buffer_size
);
// These -4 are boring
int
ret
=
pdcp_data_ind
(
ctxt_pP
,
srb_flagP
,
false
,
rb_id
-
4
,
sdu_buffer_size
,
memblock
);
if
(
!
ret
)
{
LOG_E
(
RLC
,
"%s:%d:%s: ERROR: pdcp_data_ind failed
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
/* what to do in case of failure? for the moment: nothing */
}
return
ret
;
}
void
*
pdcp_stats_thread
(
void
*
param
)
{
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/PROTO_AGENT/proto_agent.c
View file @
686e5856
...
...
@@ -192,6 +192,7 @@ error:
boolean_t
proto_agent_send_pdcp_data_ind
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
srb_flag_t
srb_flagP
,
const
MBMS_flag_t
MBMS_flagP
,
const
rb_id_t
rb_idP
,
sdu_size_t
sdu_sizeP
,
mem_block_t
*
sdu_pP
)
{
uint8_t
*
msg
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/rlc_v2/rlc_oai_api.c
View file @
686e5856
...
...
@@ -427,6 +427,20 @@ rb_found:
F1AP_UL_RRC_MESSAGE
(
msg
).
rrc_container_length
=
size
;
itti_send_msg_to_task
(
TASK_DU_F1
,
ENB_MODULE_ID_TO_INSTANCE
(
0
/*ctxt_pP->module_id*/
),
msg
);
return
;
}
else
{
// Fixme: very dirty workaround of incomplete F1-U implementation
instance_t
DUuniqInstance
=
0
;
MessageDef
*
msg
=
itti_alloc_new_message
(
TASK_RLC_ENB
,
0
,
GTPV1U_ENB_TUNNEL_DATA_REQ
);
gtpv1u_enb_tunnel_data_req_t
*
req
=&
GTPV1U_ENB_TUNNEL_DATA_REQ
(
msg
);
req
->
buffer
=
malloc
(
size
);
memcpy
(
req
->
buffer
,
buf
,
size
);
req
->
length
=
size
;
req
->
offset
=
0
;
req
->
rnti
=
ue
->
rnti
;
req
->
rab_id
=
rb_id
+
4
;
LOG_D
(
RLC
,
"Received uplink user-plane traffic at RLC-DU to be sent to the CU, size %d
\n
"
,
size
);
itti_send_msg_to_task
(
OCP_GTPV1_U
,
DUuniqInstance
,
msg
);
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LTE/rrc_eNB_S1AP.c
View file @
686e5856
...
...
@@ -1078,29 +1078,43 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP
(
&
ctxt
,
ue_context_p
);
}
/*
if ((RC.rrc[ctxt.module_id]->node_type == ngran_eNB_CU) ||
(RC.rrc[ctxt.module_id]->node_type == ngran_ng_eNB_CU) ||
(RC.rrc[ctxt.module_id]->node_type == ngran_gNB_CU) ){
message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_SETUP_REQ);
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container = ue_p->Srb0.Tx_buffer.Payload;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container_length = ue_p->Srb0.Tx_buffer.payload_size;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_CU_ue_id = 0;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_DU_ue_id = 0;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).old_gNB_DU_ue_id = 0xFFFFFFFF; // unknown
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rnti = ue_p->rnti;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).srb_id = CCCH;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).execute_duplication = 1;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).RAT_frequency_priority_information.en_dc = 0;
itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p);
LOG_D(RRC, "Send F1AP_UE_CONTEXT_SETUP_REQ with ITTI\n");
}
*/
return
(
0
);
if
((
RC
.
rrc
[
ctxt
.
module_id
]
->
node_type
==
ngran_eNB_CU
)
||
(
RC
.
rrc
[
ctxt
.
module_id
]
->
node_type
==
ngran_ng_eNB_CU
)
||
(
RC
.
rrc
[
ctxt
.
module_id
]
->
node_type
==
ngran_gNB_CU
)
){
struct
eNB_RRC_INST_s
*
rrc
=
RC
.
rrc
[
0
];
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_RRC_ENB
,
0
,
F1AP_UE_CONTEXT_SETUP_REQ
);
f1ap_ue_context_setup_t
*
req
=&
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
);
req
->
gNB_CU_ue_id
=
0
;
req
->
gNB_DU_ue_id
=
0
;
req
->
rnti
=
ue_context_p
->
ue_context
.
rnti
;
req
->
mcc
=
rrc
->
configuration
.
mcc
[
0
];
req
->
mnc
=
rrc
->
configuration
.
mnc
[
0
];
req
->
mnc_digit_length
=
rrc
->
configuration
.
mnc_digit_length
[
0
];
req
->
nr_cellid
=
rrc
->
nr_cellid
;
req
->
srbs_to_be_setup
=
malloc
(
sizeof
(
f1ap_srb_to_be_setup_t
));
req
->
srbs_to_be_setup_length
=
1
;
f1ap_srb_to_be_setup_t
*
SRBs
=
req
->
srbs_to_be_setup
;
SRBs
[
0
].
srb_id
=
CCCH
;
req
->
drbs_to_be_setup_length
=
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
msg_p
).
nb_of_e_rabs
;
req
->
drbs_to_be_setup
=
malloc
(
req
->
drbs_to_be_setup_length
*
sizeof
(
f1ap_drb_to_be_setup_t
));
f1ap_drb_to_be_setup_t
*
DRBs
=
req
->
drbs_to_be_setup
;
for
(
int
i
=
0
;
i
<
req
->
drbs_to_be_setup_length
;
i
++
)
{
DRBs
[
i
].
drb_id
=
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
msg_p
).
e_rab_param
[
i
].
e_rab_id
;
DRBs
[
i
].
rlc_mode
=
RLC_MODE_AM
;
DRBs
[
i
].
up_ul_tnl
[
0
].
tl_address
=
inet_addr
(
rrc
->
eth_params_s
.
my_addr
);
DRBs
[
i
].
up_ul_tnl
[
0
].
port
=
rrc
->
eth_params_s
.
my_portd
;
DRBs
[
i
].
up_ul_tnl_length
=
1
;
DRBs
[
i
].
up_dl_tnl
[
0
].
tl_address
=
inet_addr
(
rrc
->
eth_params_s
.
remote_addr
);
DRBs
[
i
].
up_dl_tnl
[
0
].
port
=
rrc
->
eth_params_s
.
remote_portd
;
DRBs
[
i
].
up_dl_tnl_length
=
1
;
}
LOG_I
(
RRC
,
"Send F1AP_UE_CONTEXT_SETUP_REQ with ITTI
\n
"
);
itti_send_msg_to_task
(
TASK_CU_F1
,
0
,
message_p
);
}
}
return
(
0
);
}
/*------------------------------------------------------------------------------*/
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB.c
View file @
686e5856
...
...
@@ -1370,17 +1370,18 @@ rrc_gNB_process_RRCReconfigurationComplete(
else
if
(
SRB_configList
!=
NULL
||
DRB_configList
!=
NULL
){
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
0
,
F1AP_UE_CONTEXT_SETUP_REQ
);
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
gNB_CU_ue_id
=
0
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
gNB_DU_ue_id
=
0
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
rnti
=
ue_context_pP
->
ue_context
.
rnti
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
mcc
=
RC
.
nrrrc
[
0
]
->
configuration
.
mcc
[
0
];
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
mnc
=
RC
.
nrrrc
[
0
]
->
configuration
.
mnc
[
0
];
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
mnc_digit_length
=
RC
.
nrrrc
[
0
]
->
configuration
.
mnc_digit_length
[
0
];
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
nr_cellid
=
RC
.
nrrrc
[
0
]
->
nr_cellid
;
f1ap_ue_context_setup_t
*
req
=&
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
);
req
->
gNB_CU_ue_id
=
0
;
req
->
gNB_DU_ue_id
=
0
;
req
->
rnti
=
ue_context_pP
->
ue_context
.
rnti
;
req
->
mcc
=
RC
.
nrrrc
[
0
]
->
configuration
.
mcc
[
0
];
req
->
mnc
=
RC
.
nrrrc
[
0
]
->
configuration
.
mnc
[
0
];
req
->
mnc_digit_length
=
RC
.
nrrrc
[
0
]
->
configuration
.
mnc_digit_length
[
0
];
req
->
nr_cellid
=
RC
.
nrrrc
[
0
]
->
nr_cellid
;
if
(
SRB_configList
!=
NULL
){
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
srbs_to_be_setup
=
malloc
(
SRB_configList
->
list
.
count
*
sizeof
(
f1ap_srb_to_be_setup_t
));
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
srbs_to_be_setup_length
=
SRB_configList
->
list
.
count
;
f1ap_srb_to_be_setup_t
*
SRBs
=
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
srbs_to_be_setup
;
req
->
srbs_to_be_setup
=
malloc
(
SRB_configList
->
list
.
count
*
sizeof
(
f1ap_srb_to_be_setup_t
));
req
->
srbs_to_be_setup_length
=
SRB_configList
->
list
.
count
;
f1ap_srb_to_be_setup_t
*
SRBs
=
req
->
srbs_to_be_setup
;
for
(
int
i
=
0
;
i
<
SRB_configList
->
list
.
count
;
i
++
){
if
(
SRB_configList
->
list
.
array
[
i
]
->
srb_Identity
>
1
){
SRBs
[
i
].
srb_id
=
SRB_configList
->
list
.
array
[
i
]
->
srb_Identity
;
...
...
@@ -1391,10 +1392,10 @@ rrc_gNB_process_RRCReconfigurationComplete(
if
(
DRB_configList
!=
NULL
){
gtpv1u_gnb_create_tunnel_req_t
create_tunnel_req
;
memset
(
&
create_tunnel_req
,
0
,
sizeof
(
gtpv1u_gnb_create_tunnel_req_t
));
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup
=
malloc
(
DRB_configList
->
list
.
count
*
sizeof
(
f1ap_drb_to_be_setup_t
));
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup_length
=
DRB_configList
->
list
.
count
;
f1ap_drb_to_be_setup_t
*
DRBs
=
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup
;
LOG_I
(
RRC
,
"Length of DRB list:%d, %d
\n
"
,
DRB_configList
->
list
.
count
,
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup_length
);
req
->
drbs_to_be_setup
=
malloc
(
DRB_configList
->
list
.
count
*
sizeof
(
f1ap_drb_to_be_setup_t
));
req
->
drbs_to_be_setup_length
=
DRB_configList
->
list
.
count
;
f1ap_drb_to_be_setup_t
*
DRBs
=
req
->
drbs_to_be_setup
;
LOG_I
(
RRC
,
"Length of DRB list:%d, %d
\n
"
,
DRB_configList
->
list
.
count
,
req
->
drbs_to_be_setup_length
);
for
(
int
i
=
0
;
i
<
DRB_configList
->
list
.
count
;
i
++
){
DRBs
[
i
].
drb_id
=
DRB_configList
->
list
.
array
[
i
]
->
drb_Identity
;
DRBs
[
i
].
rlc_mode
=
RLC_MODE_AM
;
...
...
This diff is collapsed.
Click to expand it.
openair3/ocp-gtpu/gtp_itf.cpp
View file @
686e5856
...
...
@@ -95,7 +95,7 @@ static teid_t gtpv1uNewTeid(void) {
#endif
}
static
instance_t
legacyInstanceMapping
=
0
;
instance_t
legacyInstanceMapping
=
0
;
#define compatInst(a) ((a)==0 || (a)==INSTANCE_DEFAULT?legacyInstanceMapping:a)
#define GTPV1U_HEADER_SIZE (8)
...
...
This diff is collapsed.
Click to expand it.
targets/COMMON/create_tasks.c
View file @
686e5856
...
...
@@ -91,6 +91,9 @@ int create_tasks(uint32_t enb_nb) {
if
(
NODE_IS_DU
(
type
))
{
rc
=
itti_create_task
(
TASK_DU_F1
,
F1AP_DU_task
,
NULL
);
AssertFatal
(
rc
>=
0
,
"Create task for DU F1AP failed
\n
"
);
// DU is now GTP-U instead of protobuf
rc
=
itti_create_task
(
TASK_GTPV1_U
,
gtpv1u_eNB_task
,
NULL
);
AssertFatal
(
rc
>=
0
,
"Create task for GTPV1U failed
\n
"
);
}
if
(
!
NODE_IS_CU
(
type
))
{
...
...
This diff is collapsed.
Click to expand it.
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