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
077cec4e
Commit
077cec4e
authored
Jan 19, 2019
by
laurent
Committed by
frtabu
Feb 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compilation, attach complete
parent
c1bbb1b2
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
385 additions
and
35 deletions
+385
-35
openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c
openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c
+1
-1
openair2/RRC/LTE/rrc_UE.c
openair2/RRC/LTE/rrc_UE.c
+0
-2
targets/ARCH/rfsimulator/simulator.c
targets/ARCH/rfsimulator/simulator.c
+3
-1
targets/ARCH/tcp_bridge/tcp_bridge_oai.c
targets/ARCH/tcp_bridge/tcp_bridge_oai.c
+352
-12
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+29
-19
No files found.
openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c
View file @
077cec4e
...
...
@@ -63,7 +63,7 @@ struct msghdr nas_msg_tx;
struct
msghdr
nas_msg_rx
;
#define GRAAL_NETLINK_ID 31
#ifdef UE_NAS_USE_TUN
static
int
tun_alloc
(
char
*
dev
)
...
...
openair2/RRC/LTE/rrc_UE.c
View file @
077cec4e
...
...
@@ -4670,7 +4670,6 @@ void *rrc_ue_task( void *args_p ) {
itti_send_msg_to_task
(
TASK_RAL_UE
,
instance
,
message_p
);
break
;
}
case
RRC_RAL_CONFIGURE_THRESHOLD_REQ
:
LOG_D
(
RRC
,
"[UE %d] Received %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
rrc_ue_ral_handle_configure_threshold_request
(
ue_mod_id
,
msg_p
);
...
...
@@ -4687,7 +4686,6 @@ void *rrc_ue_task( void *args_p ) {
LOG_D
(
RRC
,
"not sending connection request
\n
"
);
rrc_set_sub_state
(
ue_mod_id
,
RRC_SUB_STATE_IDLE_CONNECTING
);
}
break
;
}
...
...
targets/ARCH/rfsimulator/simulator.c
View file @
077cec4e
...
...
@@ -280,7 +280,7 @@ bool flushInput(tcp_bridge_state_t *t) {
else
blockSz
=
b
->
transferPtr
+
b
->
remainToTransfer
<
b
->
circularBufEnd
?
b
->
remainToTransfer
:
b
->
circularBufEnd
-
b
->
transferPtr
;
b
->
circularBufEnd
-
1
-
b
->
transferPtr
;
int
sz
=
recv
(
fd
,
b
->
transferPtr
,
blockSz
,
MSG_DONTWAIT
);
...
...
@@ -294,6 +294,8 @@ bool flushInput(tcp_bridge_state_t *t) {
AssertFatal
((
b
->
remainToTransfer
-=
sz
)
>=
0
,
""
);
b
->
transferPtr
+=
sz
;
if
(
b
->
transferPtr
==
b
->
circularBufEnd
-
1
)
b
->
transferPtr
=
(
char
*
)
b
->
circularBuf
;
// check the header and start block transfer
if
(
b
->
headerMode
==
true
&&
b
->
remainToTransfer
==
0
)
{
...
...
targets/ARCH/tcp_bridge/tcp_bridge_oai.c
View file @
077cec4e
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ue.c
View file @
077cec4e
...
...
@@ -785,11 +785,18 @@ static void *UE_thread_rxn_txnp4(void *arg) {
threadname
);
while
(
!
oai_exit
)
{
AssertFatal
(
pthread_mutex_lock
(
&
proc
->
mutex_rxtx
)
==
0
,
"[SCHED][UE] error locking mutex for UE RXTX
\n
"
);
while
(
proc
->
instance_cnt_rxtx
<
0
)
if
(
pthread_mutex_lock
(
&
proc
->
mutex_rxtx
)
!=
0
)
{
LOG_E
(
PHY
,
"[SCHED][UE] error locking mutex for UE RXTX
\n
"
);
exit_fun
(
"nothing to add"
);
}
while
(
proc
->
instance_cnt_rxtx
<
0
)
{
// most of the time, the thread is waiting here
pthread_cond_wait
(
&
proc
->
cond_rxtx
,
&
proc
->
mutex_rxtx
);
AssertFatal
(
pthread_mutex_unlock
(
&
proc
->
mutex_rxtx
)
==
0
,
"[SCHED][UE] error unlocking mutex for UE RXn_TXnp4
\n
"
);
}
if
(
pthread_mutex_unlock
(
&
proc
->
mutex_rxtx
)
!=
0
)
{
LOG_E
(
PHY
,
"[SCHED][UE] error unlocking mutex for UE RXn_TXnp4
\n
"
);
exit_fun
(
"nothing to add"
);
}
initRefTimes
(
t2
);
initRefTimes
(
t3
);
...
...
@@ -863,12 +870,18 @@ static void *UE_thread_rxn_txnp4(void *arg) {
phy_procedures_UE_S_TX
(
UE
,
0
,
0
);
updateTimes
(
current
,
&
t3
,
10000
,
"Delay to process sub-frame (case 3)"
);
AssertFatal
(
pthread_mutex_lock
(
&
proc
->
mutex_rxtx
)
==
0
,
"[SCHED][UE] error locking mutex for UE RXTX
\n
"
);
if
(
pthread_mutex_lock
(
&
proc
->
mutex_rxtx
)
!=
0
)
{
LOG_E
(
PHY
,
"[SCHED][UE] error locking mutex for UE RXTX
\n
"
);
exit_fun
(
"noting to add"
);
}
proc
->
instance_cnt_rxtx
--
;
#if BASIC_SIMULATOR
AssertFatal
(
pthread_cond_signal
(
&
proc
->
cond_rxtx
)
==
0
,
""
);
#if
1 //
BASIC_SIMULATOR
if
(
pthread_cond_signal
(
&
proc
->
cond_rxtx
)
!=
0
)
abort
(
);
#endif
AssertFatal
(
pthread_mutex_unlock
(
&
proc
->
mutex_rxtx
)
==
0
,
"[SCHED][UE] error unlocking mutex for UE RXTX
\n
"
);
if
(
pthread_mutex_unlock
(
&
proc
->
mutex_rxtx
)
!=
0
)
{
LOG_E
(
PHY
,
"[SCHED][UE] error unlocking mutex for UE RXTX
\n
"
);
exit_fun
(
"noting to add"
);
}
}
// thread finished
...
...
@@ -1012,6 +1025,7 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
}
while
(
phy_stub_ticking
->
ticking_var
<
0
)
{
// most of the time, the thread is waiting here
//pthread_cond_wait( &proc->cond_rxtx, &proc->mutex_rxtx )
LOG_D
(
MAC
,
"Waiting for ticking_var
\n
"
);
pthread_cond_wait
(
&
phy_stub_ticking
->
cond_ticking
,
&
phy_stub_ticking
->
mutex_ticking
);
}
...
...
@@ -1363,6 +1377,7 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
}
while
(
phy_stub_ticking
->
ticking_var
<
0
)
{
// most of the time, the thread is waiting here
//pthread_cond_wait( &proc->cond_rxtx, &proc->mutex_rxtx )
LOG_D
(
MAC
,
"Waiting for ticking_var
\n
"
);
pthread_cond_wait
(
&
phy_stub_ticking
->
cond_ticking
,
&
phy_stub_ticking
->
mutex_ticking
);
}
...
...
@@ -1554,12 +1569,6 @@ void *UE_thread(void *arg) {
}
while
(
!
oai_exit
)
{
#if BASIC_SIMULATOR
while
(
!
(
UE
->
proc
.
instance_cnt_synch
<
0
))
{
printf
(
"ue sync not ready
\n
"
);
usleep
(
500
*
1000
);
}
#endif
AssertFatal
(
0
==
pthread_mutex_lock
(
&
UE
->
proc
.
mutex_synch
),
""
);
int
instance_cnt_synch
=
UE
->
proc
.
instance_cnt_synch
;
...
...
@@ -1689,7 +1698,7 @@ void *UE_thread(void *arg) {
// update thread index for received subframe
UE
->
current_thread_id
[
sub_frame
]
=
thread_idx
;
#if BASIC_SIMULATOR
#if
1 //
BASIC_SIMULATOR
{
int
t
;
for
(
t
=
0
;
t
<
2
;
t
++
)
{
...
...
@@ -1727,10 +1736,10 @@ void *UE_thread(void *arg) {
// compute TO compensation that should be applied for this frame
if
(
UE
->
no_timing_correction
==
0
)
{
if
(
getenv
(
"RFSIMULATOR"
)
!=
NULL
&&
UE
->
rx_offset
)
{
//LOG_E(HW,"in simu, rx_offset is not null (impossible)
: %d\n", UE->rx_offset);
UE
->
rx_offset
=
0
;
}
if
(
UE
->
rx_offset
)
{
//LOG_E(HW,"in simu, rx_offset is not null
: %d\n", UE->rx_offset);
UE
->
rx_offset
=
0
;
}
if
(
UE
->
rx_offset
<
5
*
UE
->
frame_parms
.
samples_per_tti
&&
UE
->
rx_offset
>
0
)
UE
->
rx_offset_diff
=
-
1
;
...
...
@@ -1802,6 +1811,7 @@ void *UE_thread(void *arg) {
proc
->
instance_cnt_rxtx
++
;
LOG_D
(
PHY
,
"[SCHED][UE %d] UE RX instance_cnt_rxtx %d subframe %d !!
\n
"
,
UE
->
Mod_id
,
proc
->
instance_cnt_rxtx
,
proc
->
subframe_rx
);
if
(
proc
->
instance_cnt_rxtx
!=
0
)
{
/*
if ( getenv("RFSIMULATOR") != NULL ) {
do {
AssertFatal (pthread_mutex_unlock(&proc->mutex_rxtx) == 0, "");
...
...
@@ -1809,7 +1819,7 @@ void *UE_thread(void *arg) {
AssertFatal (pthread_mutex_lock(&proc->mutex_rxtx) == 0, "");
} while ( proc->instance_cnt_rxtx >= 0);
}
else
} else
*/
LOG_E
(
PHY
,
"[SCHED][UE %d] UE RX thread busy (IC %d)!!
\n
"
,
UE
->
Mod_id
,
proc
->
instance_cnt_rxtx
);
if
(
proc
->
instance_cnt_rxtx
>
2
)
exit_fun
(
"instance_cnt_rxtx > 2"
);
...
...
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