Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add '--mcast_only' option #710

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 129 additions & 42 deletions tests/src/st20_test.cpp

Large diffs are not rendered by default.

16 changes: 12 additions & 4 deletions tests/src/st20p_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,12 @@ static void st20p_rx_digest_test(enum st_fps fps[], int width[], int height[],
ops_tx.name = "st20p_test";
ops_tx.priv = test_ctx_tx[i];
ops_tx.port.num_port = 1;
memcpy(ops_tx.port.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_tx.port.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_tx.port.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
snprintf(ops_tx.port.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_P]);
ops_tx.port.udp_port[MTL_SESSION_PORT_P] = ST20P_TEST_UDP_PORT + i * 2;
Expand Down Expand Up @@ -960,8 +964,12 @@ static void st20p_rx_digest_test(enum st_fps fps[], int width[], int height[],
ops_rx.name = "st20p_test";
ops_rx.priv = test_ctx_rx[i];
ops_rx.port.num_port = 1;
memcpy(ops_rx.port.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_rx.port.ip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_rx.port.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
snprintf(ops_rx.port.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_R]);
ops_rx.port.udp_port[MTL_SESSION_PORT_P] = ST20P_TEST_UDP_PORT + i * 2;
Expand Down
91 changes: 69 additions & 22 deletions tests/src/st22_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,12 @@ static void st22_rx_fps_test(enum st22_type type[], enum st_fps fps[], int width
ops_tx.name = "st22_test";
ops_tx.priv = test_ctx_tx[i];
ops_tx.num_port = 1;
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
snprintf(ops_tx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_P]);
ops_tx.udp_port[MTL_SESSION_PORT_P] = 15000 + i * 2;
Expand Down Expand Up @@ -454,8 +458,12 @@ static void st22_rx_fps_test(enum st22_type type[], enum st_fps fps[], int width
ops_rx.name = "st22_test";
ops_rx.priv = test_ctx_rx[i];
ops_rx.num_port = 1;
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
snprintf(ops_rx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_R]);
ops_rx.udp_port[MTL_SESSION_PORT_P] = 15000 + i * 2;
Expand Down Expand Up @@ -607,6 +615,9 @@ static void st22_rx_update_src_test(int tx_sessions, enum st_test_level level) {
else if (1 == i)
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else if (ctx->mcast_only)
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_2],
MTL_IP_ADDR_LEN);
else
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
Expand Down Expand Up @@ -656,8 +667,12 @@ static void st22_rx_update_src_test(int tx_sessions, enum st_test_level level) {
ops_rx.name = "st22_test";
ops_rx.priv = test_ctx_rx[i];
ops_rx.num_port = 1;
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_2],
MTL_IP_ADDR_LEN);
else
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
snprintf(ops_rx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_R]);
ops_rx.udp_port[MTL_SESSION_PORT_P] = 15000 + i * 2;
Expand Down Expand Up @@ -832,8 +847,12 @@ static void st22_rx_after_start_test(enum st_fps fps[], int width[], int height[
ops_tx.name = "st22_test";
ops_tx.priv = test_ctx_tx[i];
ops_tx.num_port = 1;
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
snprintf(ops_tx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_P]);
ops_tx.udp_port[MTL_SESSION_PORT_P] = 15000 + i * 2;
Expand Down Expand Up @@ -881,8 +900,12 @@ static void st22_rx_after_start_test(enum st_fps fps[], int width[], int height[
ops_rx.name = "st22_test";
ops_rx.priv = test_ctx_rx[i];
ops_rx.num_port = 1;
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
snprintf(ops_rx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_R]);
ops_rx.udp_port[MTL_SESSION_PORT_P] = 15000 + i * 2;
Expand Down Expand Up @@ -999,8 +1022,12 @@ static void st22_rx_dump_test(enum st_fps fps[], int width[], int height[],
ops_tx.name = "st22_test";
ops_tx.priv = test_ctx_tx[i];
ops_tx.num_port = 1;
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
snprintf(ops_tx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_P]);
ops_tx.udp_port[MTL_SESSION_PORT_P] = 15000 + i * 2;
Expand Down Expand Up @@ -1048,8 +1075,12 @@ static void st22_rx_dump_test(enum st_fps fps[], int width[], int height[],
ops_rx.name = "st22_test";
ops_rx.priv = test_ctx_rx[i];
ops_rx.num_port = 1;
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
snprintf(ops_rx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_R]);
ops_rx.udp_port[MTL_SESSION_PORT_P] = 15000 + i * 2;
Expand Down Expand Up @@ -1226,8 +1257,12 @@ static void st22_rx_digest_test(enum st_fps fps[], int width[], int height[],
ops_tx.name = "st22_test";
ops_tx.priv = test_ctx_tx[i];
ops_tx.num_port = 1;
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
snprintf(ops_tx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_P]);
ops_tx.udp_port[MTL_SESSION_PORT_P] = 15000 + i * 2;
Expand Down Expand Up @@ -1291,8 +1326,12 @@ static void st22_rx_digest_test(enum st_fps fps[], int width[], int height[],
ops_rx.name = "st22_test";
ops_rx.priv = test_ctx_rx[i];
ops_rx.num_port = 1;
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
snprintf(ops_rx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_R]);
ops_rx.udp_port[MTL_SESSION_PORT_P] = 15000 + i * 2;
Expand Down Expand Up @@ -1443,8 +1482,12 @@ static void st22_tx_user_pacing_test(int width[], int height[], int pkt_data_len
ops_tx.name = "st22_test";
ops_tx.priv = test_ctx_tx[i];
ops_tx.num_port = 1;
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
snprintf(ops_tx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_P]);
ops_tx.udp_port[MTL_SESSION_PORT_P] = 15000 + i * 2;
Expand Down Expand Up @@ -1488,8 +1531,12 @@ static void st22_tx_user_pacing_test(int width[], int height[], int pkt_data_len
ops_rx.name = "st22_test";
ops_rx.priv = test_ctx_rx[i];
ops_rx.num_port = 1;
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
snprintf(ops_rx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_R]);
ops_rx.udp_port[MTL_SESSION_PORT_P] = 15000 + i * 2;
Expand Down
16 changes: 12 additions & 4 deletions tests/src/st22p_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,12 @@ static void st22p_rx_digest_test(enum st_fps fps[], int width[], int height[],
ops_tx.name = "st22p_test";
ops_tx.priv = test_ctx_tx[i];
ops_tx.port.num_port = 1;
memcpy(ops_tx.port.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_tx.port.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_tx.port.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
snprintf(ops_tx.port.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_P]);
ops_tx.port.udp_port[MTL_SESSION_PORT_P] = ST22P_TEST_UDP_PORT + i * 2;
Expand Down Expand Up @@ -1006,8 +1010,12 @@ static void st22p_rx_digest_test(enum st_fps fps[], int width[], int height[],
ops_rx.name = "st22p_test";
ops_rx.priv = test_ctx_rx[i];
ops_rx.port.num_port = 1;
memcpy(ops_rx.port.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_rx.port.ip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_rx.port.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
snprintf(ops_rx.port.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_R]);
ops_rx.port.udp_port[MTL_SESSION_PORT_P] = ST22P_TEST_UDP_PORT + i * 2;
Expand Down
59 changes: 45 additions & 14 deletions tests/src/st30_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,12 @@ static void st30_rx_fps_test(enum st30_type type[], enum st30_sampling sample[],
ops_tx.name = "st30_test";
ops_tx.priv = test_ctx_tx[i];
ops_tx.num_port = 1;
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
snprintf(ops_tx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_P]);
ops_tx.udp_port[MTL_SESSION_PORT_P] = 20000 + i * 2;
Expand Down Expand Up @@ -504,8 +508,12 @@ static void st30_rx_fps_test(enum st30_type type[], enum st30_sampling sample[],
ops_rx.name = "st30_test";
ops_rx.priv = test_ctx_rx[i];
ops_rx.num_port = 1;
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
snprintf(ops_rx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_R]);
ops_rx.udp_port[MTL_SESSION_PORT_P] = 20000 + i * 2;
Expand Down Expand Up @@ -841,6 +849,9 @@ static void st30_rx_update_src_test(enum st30_type type, int tx_sessions,
else if (1 == i)
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else if (ctx->mcast_only)
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_2],
MTL_IP_ADDR_LEN);
else
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
Expand Down Expand Up @@ -883,8 +894,12 @@ static void st30_rx_update_src_test(enum st30_type type, int tx_sessions,
ops_rx.name = "st30_test";
ops_rx.priv = test_ctx_rx[i];
ops_rx.num_port = 1;
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_2],
MTL_IP_ADDR_LEN);
else
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
snprintf(ops_rx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_R]);
ops_rx.udp_port[MTL_SESSION_PORT_P] = 20000 + i * 2;
Expand Down Expand Up @@ -1127,8 +1142,12 @@ static void st30_rx_meta_test(enum st30_fmt fmt[], enum st30_sampling sampling[]
ops_tx.name = "st30_meta_test";
ops_tx.priv = test_ctx_tx[i];
ops_tx.num_port = 1;
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
snprintf(ops_tx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_P]);
ops_tx.udp_port[MTL_SESSION_PORT_P] = 20000 + i * 2;
Expand Down Expand Up @@ -1172,8 +1191,12 @@ static void st30_rx_meta_test(enum st30_fmt fmt[], enum st30_sampling sampling[]
ops_rx.name = "st30_meta_test";
ops_rx.priv = test_ctx_rx[i];
ops_rx.num_port = 1;
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
snprintf(ops_rx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_R]);
ops_rx.udp_port[MTL_SESSION_PORT_P] = 20000 + i * 2;
Expand Down Expand Up @@ -1310,8 +1333,12 @@ static void st30_create_after_start_test(enum st30_type type[],
ops_tx.name = "st30_test";
ops_tx.priv = test_ctx_tx[i];
ops_tx.num_port = 1;
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_tx.dip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_R],
MTL_IP_ADDR_LEN);
snprintf(ops_tx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_P]);
ops_tx.udp_port[MTL_SESSION_PORT_P] = 20000 + i * 2;
Expand Down Expand Up @@ -1351,8 +1378,12 @@ static void st30_create_after_start_test(enum st30_type type[],
ops_rx.name = "st30_test";
ops_rx.priv = test_ctx_rx[i];
ops_rx.num_port = 1;
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
if (ctx->mcast_only)
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->mcast_ip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
else
memcpy(ops_rx.ip_addr[MTL_SESSION_PORT_P], ctx->para.sip_addr[MTL_PORT_P],
MTL_IP_ADDR_LEN);
snprintf(ops_rx.port[MTL_SESSION_PORT_P], MTL_PORT_MAX_LEN, "%s",
ctx->para.port[MTL_PORT_R]);
ops_rx.udp_port[MTL_SESSION_PORT_P] = 20000 + i * 2;
Expand Down
Loading