Skip to content

Commit 410bdd7

Browse files
committed
Change: STATIC_PAD to be disabled by default
Signed-off-by: Kasiewicz, Marek <[email protected]>
1 parent 88b9a85 commit 410bdd7

File tree

8 files changed

+18
-14
lines changed

8 files changed

+18
-14
lines changed

include/st20_api.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ extern "C" {
6262
#define ST20_TX_FLAG_ENABLE_VSYNC (MTL_BIT32(5))
6363
/**
6464
* Flag bit in flags of struct st20_tx_ops.
65-
* If disable the static RL pad interval profiling.
65+
* If enable the static RL pad interval profiling.
66+
* Static padding is trained only for e810, it is not recommended to use this flag
67+
* for other NICs.
6668
*/
67-
#define ST20_TX_FLAG_DISABLE_STATIC_PAD_P (MTL_BIT32(6))
69+
#define ST20_TX_FLAG_ENABLE_STATIC_PAD_P (MTL_BIT32(6))
6870
/**
6971
* Flag bit in flags of struct st20_tx_ops.
7072
* If enable the rtcp.

include/st_pipeline_api.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,11 @@ enum st20p_tx_flag {
442442
*/
443443
ST20P_TX_FLAG_ENABLE_VSYNC = (MTL_BIT32(5)),
444444
/**
445-
* If disable the static RL pad interval profiling.
445+
* If enable the static RL pad interval profiling.
446+
* Static padding is trained only for e810, it is not recommended to use this flag
447+
* for other NICs.
446448
*/
447-
ST20P_TX_FLAG_DISABLE_STATIC_PAD_P = (MTL_BIT32(6)),
449+
ST20P_TX_FLAG_ENABLE_STATIC_PAD_P = (MTL_BIT32(6)),
448450
/**
449451
* If enable the rtcp.
450452
*/

lib/src/st2110/pipeline/st20_pipeline_tx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ static int tx_st20p_create_transport(struct mtl_main_impl* impl, struct st20p_tx
292292
if (ops->flags & ST20P_TX_FLAG_USER_TIMESTAMP)
293293
ops_tx.flags |= ST20_TX_FLAG_USER_TIMESTAMP;
294294
if (ops->flags & ST20P_TX_FLAG_ENABLE_VSYNC) ops_tx.flags |= ST20_TX_FLAG_ENABLE_VSYNC;
295-
if (ops->flags & ST20P_TX_FLAG_DISABLE_STATIC_PAD_P)
296-
ops_tx.flags |= ST20_TX_FLAG_DISABLE_STATIC_PAD_P;
295+
if (ops->flags & ST20P_TX_FLAG_ENABLE_STATIC_PAD_P)
296+
ops_tx.flags |= ST20_TX_FLAG_ENABLE_STATIC_PAD_P;
297297
if (ops->flags & ST20P_TX_FLAG_ENABLE_RTCP) {
298298
ops_tx.flags |= ST20_TX_FLAG_ENABLE_RTCP;
299299
ops_tx.rtcp = ops->rtcp;

lib/src/st2110/st_tx_video_session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ static int tv_train_pacing(struct mtl_main_impl* impl, struct st_tx_video_sessio
331331
info("%s(%d), user customized pad_interval %u\n", __func__, idx, resolved);
332332
return 0;
333333
}
334-
if (!(s->ops.flags & ST20_TX_FLAG_DISABLE_STATIC_PAD_P)) {
334+
if ((s->ops.flags & ST20_TX_FLAG_ENABLE_STATIC_PAD_P)) {
335335
resolved = st20_pacing_static_profiling(impl, s, s_port);
336336
if (resolved) {
337337
s->pacing.pad_interval = resolved;

tests/tools/RxTxApp/src/app_base.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ struct st_app_context {
654654
int tx_video_rtp_ring_size; /* the ring size for tx video rtp type */
655655
uint16_t tx_start_vrx;
656656
uint16_t tx_pad_interval;
657-
bool tx_no_static_pad;
657+
bool tx_static_pad;
658658
bool tx_ts_first_pkt;
659659
bool tx_ts_epoch;
660660
int32_t tx_ts_delta_us;

tests/tools/RxTxApp/src/args.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ enum st_args_cmd {
5757
ST_ARG_PACING_WAY,
5858
ST_ARG_START_VRX,
5959
ST_ARG_PAD_INTERVAL,
60-
ST_ARG_NO_PAD_STATIC,
60+
ST_ARG_PAD_STATIC,
6161
ST_ARG_SHAPING,
6262
ST_ARG_TIMESTAMP_FIRST_PKT,
6363
ST_ARG_TIMESTAMP_EPOCH,
@@ -209,7 +209,7 @@ static struct option st_app_args_options[] = {
209209
{"pacing_way", required_argument, 0, ST_ARG_PACING_WAY},
210210
{"start_vrx", required_argument, 0, ST_ARG_START_VRX},
211211
{"pad_interval", required_argument, 0, ST_ARG_PAD_INTERVAL},
212-
{"no_static_pad", no_argument, 0, ST_ARG_NO_PAD_STATIC},
212+
{"static_pad", no_argument, 0, ST_ARG_PAD_STATIC},
213213
{"shaping", required_argument, 0, ST_ARG_SHAPING},
214214
{"ts_first_pkt", no_argument, 0, ST_ARG_TIMESTAMP_FIRST_PKT},
215215
{"ts_delta_us", required_argument, 0, ST_ARG_TIMESTAMP_DELTA_US},
@@ -600,8 +600,8 @@ int st_app_parse_args(struct st_app_context* ctx, struct mtl_init_params* p, int
600600
case ST_ARG_PAD_INTERVAL:
601601
ctx->tx_pad_interval = atoi(optarg);
602602
break;
603-
case ST_ARG_NO_PAD_STATIC:
604-
ctx->tx_no_static_pad = true;
603+
case ST_ARG_PAD_STATIC:
604+
ctx->tx_static_pad = true;
605605
break;
606606
case ST_ARG_TIMESTAMP_FIRST_PKT:
607607
ctx->tx_ts_first_pkt = true;

tests/tools/RxTxApp/src/legacy/tx_video_app.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ static int app_tx_video_init(struct st_app_context* ctx, st_json_video_session_t
790790
ops.pad_interval = ctx->tx_pad_interval;
791791
ops.rtp_timestamp_delta_us = ctx->tx_ts_delta_us;
792792
if (s->enable_vsync) ops.flags |= ST20_TX_FLAG_ENABLE_VSYNC;
793-
if (ctx->tx_no_static_pad) ops.flags |= ST20_TX_FLAG_DISABLE_STATIC_PAD_P;
793+
if (ctx->tx_static_pad) ops.flags |= ST20_TX_FLAG_ENABLE_STATIC_PAD_P;
794794
if (ctx->tx_ts_first_pkt) ops.flags |= ST20_TX_FLAG_RTP_TIMESTAMP_FIRST_PKT;
795795
if (ctx->tx_ts_epoch) ops.flags |= ST20_TX_FLAG_RTP_TIMESTAMP_EPOCH;
796796
if (ctx->tx_no_bulk) ops.flags |= ST20_TX_FLAG_DISABLE_BULK;

tests/tools/RxTxApp/src/tx_st20p_app.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static int app_tx_st20p_init(struct st_app_context* ctx, st_json_st20p_session_t
286286
ops.pad_interval = ctx->tx_pad_interval;
287287
ops.rtp_timestamp_delta_us = ctx->tx_ts_delta_us;
288288
ops.notify_event = app_tx_st20p_notify_event;
289-
if (ctx->tx_no_static_pad) ops.flags |= ST20P_TX_FLAG_DISABLE_STATIC_PAD_P;
289+
if (ctx->tx_static_pad) ops.flags |= ST20P_TX_FLAG_ENABLE_STATIC_PAD_P;
290290
if (st20p && st20p->enable_rtcp) ops.flags |= ST20P_TX_FLAG_ENABLE_RTCP;
291291
if (ctx->tx_ts_first_pkt) ops.flags |= ST20P_TX_FLAG_RTP_TIMESTAMP_FIRST_PKT;
292292
if (ctx->tx_ts_epoch) ops.flags |= ST20P_TX_FLAG_RTP_TIMESTAMP_EPOCH;

0 commit comments

Comments
 (0)