@@ -427,18 +427,18 @@ static int tv_train_pacing(struct mtl_main_impl* impl, struct st_tx_video_sessio
427
427
pkts_per_frame = pkts_per_frame * reactive ;
428
428
measured_bps = s -> st20_pkt_size * pkts_per_sec * reactive ;
429
429
430
- /* If the measured speed is lower then expected. Set higher bps and retrain to add
430
+ /* If the measured speed is lower than expected. Set higher bps and retrain to add
431
431
* padding */
432
432
if (measured_bps < rl_bps ) {
433
- info ("%s(%d), measured bps %ld is lower then set bps %ld \n" , __func__ , idx ,
434
- (uint64_t )measured_bps , rl_bps );
433
+ info ("%s(%d), measured bps %" PRIu64 " is lower then set bps %" PRIu64 " \n" ,
434
+ __func__ , idx , (uint64_t )measured_bps , rl_bps );
435
435
if (!mt_pacing_train_bps_result_search (impl , port , rl_bps , & bps_to_set )) {
436
436
err ("%s(%d), measured speed is too low on already trained bps\n" , __func__ , idx );
437
437
return - EINVAL ;
438
438
}
439
439
440
- bps_to_set = rl_bps / measured_bps * rl_bps ;
441
- info ("%s(%d), increase bps to %ld \n" , __func__ , idx , bps_to_set );
440
+ bps_to_set = ( rl_bps * rl_bps ) / measured_bps ;
441
+ info ("%s(%d), increase bps to %" PRIu64 " \n" , __func__ , idx , bps_to_set );
442
442
mt_pacing_train_bps_result_add (impl , port , rl_bps , bps_to_set );
443
443
mt_txq_set_tx_bps (queue , bps_to_set );
444
444
ret = tv_train_pacing (impl , s , s_port );
0 commit comments