Skip to content

Commit 8c53850

Browse files
Fix: Unify stats name fix the ports frame calculation
1 parent a7a57d5 commit 8c53850

18 files changed

+30
-21
lines changed

include/st20_api.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ struct st22_rx_ops {
16811681
/**
16821682
* A structure used to retrieve general statistics(I/O) for a st20 tx session.
16831683
*/
1684-
struct st20_tx_users_stats {
1684+
struct st20_tx_user_stats {
16851685
struct st_tx_port_stats port[MTL_SESSION_PORT_MAX];
16861686
uint64_t stat_pkts_dummy;
16871687
uint64_t stat_epoch_troffset_mismatch;
@@ -1893,7 +1893,7 @@ int st20_tx_get_sch_idx(st20_tx_handle handle);
18931893
* - >=0 succ.
18941894
* - <0: Error code.
18951895
*/
1896-
int st20_tx_get_session_stats(st20_tx_handle handle, struct st20_tx_users_stats* stats);
1896+
int st20_tx_get_session_stats(st20_tx_handle handle, struct st20_tx_user_stats* stats);
18971897

18981898
/**
18991899
* Reset the general statistics(I/O) for one tx st2110-20(video) session.

include/st30_api.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ struct st30_rx_ops {
531531
/**
532532
* A structure used to retrieve general statistics(I/O) for a st30 tx session.
533533
*/
534-
struct st30_tx_users_stats {
534+
struct st30_tx_user_stats {
535535
struct st_tx_port_stats port[MTL_SESSION_PORT_MAX];
536536
uint64_t stat_epoch_mismatch;
537537
uint64_t stat_epoch_drop;
@@ -577,7 +577,7 @@ struct st30_rx_user_stats {
577577
* - >=0 succ.
578578
* - <0: Error code.
579579
*/
580-
int st30_tx_get_session_stats(st30_tx_handle handle, struct st30_tx_users_stats* stats);
580+
int st30_tx_get_session_stats(st30_tx_handle handle, struct st30_tx_user_stats* stats);
581581

582582
/**
583583
* Reset the general statistics(I/O) for one tx st2110-30(audio) session.

include/st30_pipeline_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ struct st30p_tx_ops {
171171
* - >=0 succ.
172172
* - <0: Error code.
173173
*/
174-
int st30p_tx_get_session_stats(st30p_tx_handle handle, struct st30_tx_users_stats* stats);
174+
int st30p_tx_get_session_stats(st30p_tx_handle handle, struct st30_tx_user_stats* stats);
175175

176176
/**
177177
* Reset the general statistics(I/O) for one rx st2110-30(pipeline) session.

include/st_pipeline_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1770,7 +1770,7 @@ int st20p_tx_get_sch_idx(st20p_tx_handle handle);
17701770
* - >=0 succ.
17711771
* - <0: Error code.
17721772
*/
1773-
int st20p_tx_get_session_stats(st20p_tx_handle handle, struct st20_tx_users_stats* stats);
1773+
int st20p_tx_get_session_stats(st20p_tx_handle handle, struct st20_tx_user_stats* stats);
17741774

17751775
/**
17761776
* Reset the general statistics(I/O) for one tx st2110-20(pipeline) session.

lib/src/st2110/pipeline/st20_pipeline_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ int st20p_tx_get_sch_idx(st20p_tx_handle handle) {
985985
}
986986

987987
int st20p_tx_get_session_stats(st20p_tx_handle handle,
988-
struct st20_tx_users_stats* stats) {
988+
struct st20_tx_user_stats* stats) {
989989
struct st20p_tx_ctx* ctx = handle;
990990
int cidx = ctx->idx;
991991

lib/src/st2110/pipeline/st30_pipeline_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ void* st30p_tx_get_fb_addr(st30p_tx_handle handle, uint16_t idx) {
636636
}
637637

638638
int st30p_tx_get_session_stats(st30p_tx_handle handle,
639-
struct st30_tx_users_stats* stats) {
639+
struct st30_tx_user_stats* stats) {
640640
struct st30p_tx_ctx* ctx = handle;
641641
int cidx = ctx->idx;
642642

lib/src/st2110/st_header.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ struct st_tx_video_session_impl {
416416
double stat_cpu_busy_score;
417417
/* for tasklet session time measure */
418418
struct mt_stat_u64 stat_time;
419-
struct st20_tx_users_stats port_user_stats[MTL_SESSION_PORT_MAX];
419+
struct st20_tx_user_stats port_user_stats[MTL_SESSION_PORT_MAX];
420420
};
421421

422422
struct st_tx_video_sessions_mgr {
@@ -834,7 +834,7 @@ struct st_tx_audio_session_impl {
834834
struct mt_txq_entry* queue[MTL_SESSION_PORT_MAX];
835835
bool shared_queue;
836836

837-
struct st30_tx_users_stats port_user_stats[MTL_SESSION_PORT_MAX];
837+
struct st30_tx_user_stats port_user_stats[MTL_SESSION_PORT_MAX];
838838

839839
enum st30_tx_pacing_way tx_pacing_way;
840840
/* for rl based pacing */

lib/src/st2110/st_rx_ancillary_session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static int rx_ancillary_session_handle_pkt(struct mtl_main_impl* impl,
158158

159159
if (tmstamp != s->tmstamp) {
160160
rte_atomic32_inc(&s->stat_frames_received);
161-
s->port_user_stats->port[MTL_PORT_P].frames++;
161+
s->port_user_stats->port[s_port].frames++;
162162
s->tmstamp = tmstamp;
163163
}
164164
ST_SESSION_STAT_INC(s, stat_pkts_received);

lib/src/st2110/st_rx_audio_session.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,6 @@ static int rx_audio_session_handle_rtp_pkt(struct mtl_main_impl* impl,
441441
if (st_rx_seq_drop(seq_id, s->latest_seq_id, 5)) {
442442
dbg("%s(%d,%d), drop as pkt seq %d is old\n", __func__, s->idx, s_port, seq_id);
443443
ST_SESSION_STAT_INC(s, stat_pkts_redundant);
444-
s->port_user_stats->port[MTL_PORT_R].packets++;
445444
return -EIO;
446445
}
447446
if (seq_id != (uint16_t)(s->latest_seq_id + 1)) {

lib/src/st2110/st_rx_fastmetadata_session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static int rx_fastmetadata_session_handle_pkt(struct mtl_main_impl* impl,
145145

146146
if (tmstamp != s->tmstamp) {
147147
rte_atomic32_inc(&s->stat_frames_received);
148-
s->port_user_stats->port[MTL_PORT_P].frames++;
148+
s->port_user_stats->port[s_port].frames++;
149149
s->tmstamp = tmstamp;
150150
}
151151
ST_SESSION_STAT_INC(s, stat_pkts_received);

0 commit comments

Comments
 (0)