Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
trx-ecpri
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
nexedi
trx-ecpri
Commits
85e34aac
Commit
85e34aac
authored
Jan 24, 2025
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
051a2768
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
31 deletions
+3
-31
trx_ecpri.c
trx_ecpri.c
+3
-31
No files found.
trx_ecpri.c
View file @
85e34aac
...
...
@@ -125,10 +125,10 @@ typedef struct {
int
statistic_affinity
;
int
flow_id
;
int
frame_frequency
;
int
trx_buf_size
;
int
txrx_buf_size
;
int
rx_burst
;
int
monitor_pps
;
int
monitor_trigger_duration
;
...
...
@@ -162,9 +162,6 @@ static counter_stat_t sent_counter; // frames sent to RRH
static
counter_stat_t
rx_drop_counter
;
// frames sent to RRH
static
counter_stat_t
tx_drop_counter
;
// frames sent to RRH
static
int
recv_pps_threshold_hit
=
0
;
static
int
recv_pps_threshold
;
// Network
static
uint8_t
seq_id
;
static
uint8_t
frame_id
;
...
...
@@ -653,25 +650,6 @@ static void *statistic_thread(void *p) {
update_counter_pps
(
&
write_counter
);
update_counter_pps
(
&
encode_counter
);
update_counter_pps
(
&
sent_counter
);
if
(
s
->
monitor_pps
)
{
if
(
recv_counter
.
pps
>
recv_pps_threshold
)
{
recv_pps_threshold_hit
=
1
;
}
if
(
recv_pps_threshold_hit
&&
recv_counter
.
pps
<
recv_pps_threshold
)
{
struct
timespec
_ts
;
int64_t
ts
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
_ts
);
ts
=
ts_to_int
(
_ts
);
if
((
recv_stop
&&
((
ts
-
recv_stop
)
>
(
s
->
monitor_trigger_duration
)
*
INT64_C
(
1000000000
))))
{
if
(
s
->
monitor_pps
==
1
)
log_exit
(
"MONITOR"
,
"Stopped recieving packets, restarting..."
);
log_info
(
"MONITOR"
,
"Stopped recieving packets, sending again..."
);
recv_stop
=
0
;
}
if
(
!
recv_stop
)
recv_stop
=
ts
;
}
}
clock_nanosleep
(
CLOCK_TAI
,
TIMER_ABSTIME
,
&
next
,
NULL
);
}
...
...
@@ -1235,16 +1213,12 @@ int trx_driver_init(TRXState *s1)
s
->
statistic_affinity
=
(
int
)
val
;
trx_get_param_double
(
s1
,
&
val
,
"flow_id"
);
s
->
flow_id
=
(
int
)
val
;
trx_get_param_double
(
s1
,
&
val
,
"frame_frequency"
);
s
->
frame_frequency
=
(
int
)
val
;
trx_get_param_double
(
s1
,
&
val
,
"trx_buf_size"
);
s
->
trx_buf_size
=
(
int
)
val
;
trx_get_param_double
(
s1
,
&
val
,
"txrx_buf_size"
);
s
->
txrx_buf_size
=
(
int
)
val
;
trx_get_param_double
(
s1
,
&
val
,
"monitor_pps"
);
s
->
monitor_pps
=
(
int
)
val
;
trx_get_param_double
(
s1
,
&
val
,
"monitor_trigger_duration"
);
s
->
monitor_trigger_duration
=
(
int
)
val
;
trx_get_param_double
(
s1
,
&
val
,
"rx_burst"
);
s
->
rx_burst
=
(
int
)
val
;
trx_get_param_double
(
s1
,
&
val
,
"rx_n_channel"
);
s
->
rx_n_channel
=
(
int
)
val
;
trx_get_param_double
(
s1
,
&
val
,
"tx_n_channel"
);
...
...
@@ -1262,8 +1236,6 @@ int trx_driver_init(TRXState *s1)
s
->
bbu_if
=
trx_get_param_string
(
s1
,
"bbu_if"
);
s
->
log_directory
=
trx_get_param_string
(
s1
,
"log_directory"
);
recv_pps_threshold
=
(
s
->
frame_frequency
*
9
/
10
);
s1
->
opaque
=
s
;
s1
->
trx_end_func
=
trx_ecpri_end
;
s1
->
trx_write_func2
=
trx_ecpri_write
;
...
...
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