diff options
| author | luwenpeng <[email protected]> | 2023-11-29 09:52:20 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2023-11-29 09:52:20 +0800 |
| commit | 23dbb7720cec0fae010e2a9fc4cced41f6bbd845 (patch) | |
| tree | 6e6b5e6a0b382bf2019e69e8dd4005d42cc9de54 /test | |
| parent | a6476847049e8cb1c988189f827b892d2b3cc84a (diff) | |
修改packet_io API的函数命名
Diffstat (limited to 'test')
| -rw-r--r-- | test/gtest_data_pkt_mirr_forward.cpp | 2 | ||||
| -rw-r--r-- | test/gtest_data_pkt_mirr_rx_drop.cpp | 4 | ||||
| -rw-r--r-- | test/gtest_data_pkt_stee_forward.cpp | 2 | ||||
| -rw-r--r-- | test/gtest_data_pkt_stee_rx_egress.cpp | 4 | ||||
| -rw-r--r-- | test/gtest_mix_pkt_stee_forward.cpp | 4 | ||||
| -rw-r--r-- | test/gtest_utils.h | 6 |
6 files changed, 11 insertions, 11 deletions
diff --git a/test/gtest_data_pkt_mirr_forward.cpp b/test/gtest_data_pkt_mirr_forward.cpp index 48cfea0..f407b39 100644 --- a/test/gtest_data_pkt_mirr_forward.cpp +++ b/test/gtest_data_pkt_mirr_forward.cpp @@ -48,7 +48,7 @@ TEST(PACKET_IO, DATA_PKT_MIRR_FORWARD) mr_instance = packet_io_get_mr_instance(gtest_frame->sce_ctx->io); gtest_frame_run(gtest_frame, tx_mbuf1, dup_mbuf1, 1); marsio_set_recv_mbuff(mr_instance, tx_mbuf2); - EXPECT_TRUE(packet_io_thread_polling_nf(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); + EXPECT_TRUE(packet_io_polling_nf(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); temp_mbuf = marsio_get_send_mbuff(mr_instance); EXPECT_TRUE(mbuff_cmp_payload(dup_mbuf2, temp_mbuf) == 0); EXPECT_TRUE(marsio_mbuff_cmp(dup_mbuf2, marsio_get_send_mbuff(mr_instance)) == 0); diff --git a/test/gtest_data_pkt_mirr_rx_drop.cpp b/test/gtest_data_pkt_mirr_rx_drop.cpp index 3cc4859..ec8f5d0 100644 --- a/test/gtest_data_pkt_mirr_rx_drop.cpp +++ b/test/gtest_data_pkt_mirr_rx_drop.cpp @@ -53,14 +53,14 @@ TEST(PACKET_IO, DATA_PKT_MIRR_RX_DROP) // recv data_pkt from nf // send vxlan_pkt to sf marsio_set_recv_mbuff(mr_instance, tx_mbuf2); - EXPECT_TRUE(packet_io_thread_polling_nf(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); + EXPECT_TRUE(packet_io_polling_nf(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); temp_mbuf = marsio_get_send_mbuff(mr_instance); EXPECT_TRUE(mbuff_cmp_payload(dup_mbuf2, temp_mbuf) == 0); EXPECT_TRUE(marsio_mbuff_cmp(dup_mbuf2, marsio_get_send_mbuff(mr_instance)) == 0); // recv vxlan_pkt from sf // send data_pkt to nf marsio_set_recv_mbuff(mr_instance, temp_mbuf); - EXPECT_TRUE(packet_io_thread_polling_endpoint_l3(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); + EXPECT_TRUE(packet_io_polling_endpoint_l3(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); EXPECT_TRUE(marsio_get_send_mbuff(mr_instance) == NULL); gtest_frame_log(gtest_frame); diff --git a/test/gtest_data_pkt_stee_forward.cpp b/test/gtest_data_pkt_stee_forward.cpp index d0c1004..ac21f6b 100644 --- a/test/gtest_data_pkt_stee_forward.cpp +++ b/test/gtest_data_pkt_stee_forward.cpp @@ -46,7 +46,7 @@ TEST(PACKET_IO, DATA_PKT_STEE_FORWARD) mr_instance = packet_io_get_mr_instance(gtest_frame->sce_ctx->io); gtest_frame_run(gtest_frame, tx_mbuf1, dup_mbuf1, 1); marsio_set_recv_mbuff(mr_instance, tx_mbuf2); - EXPECT_TRUE(packet_io_thread_polling_nf(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); + EXPECT_TRUE(packet_io_polling_nf(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); EXPECT_TRUE(mbuff_cmp_payload(dup_mbuf2, marsio_get_send_mbuff(mr_instance)) == 0); gtest_frame_log(gtest_frame); diff --git a/test/gtest_data_pkt_stee_rx_egress.cpp b/test/gtest_data_pkt_stee_rx_egress.cpp index f917d9b..1d26ab3 100644 --- a/test/gtest_data_pkt_stee_rx_egress.cpp +++ b/test/gtest_data_pkt_stee_rx_egress.cpp @@ -52,13 +52,13 @@ TEST(PACKET_IO, DATA_PKT_STEE_RX_EGRESS) // recv data_pkt from nf // send vxlan_pkt to sf marsio_set_recv_mbuff(mr_instance, tx_mbuf2); - EXPECT_TRUE(packet_io_thread_polling_nf(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); + EXPECT_TRUE(packet_io_polling_nf(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); vxlan_mbuf = marsio_get_send_mbuff(mr_instance); EXPECT_TRUE(mbuff_cmp_payload(dup_mbuf2, vxlan_mbuf) == 0); // recv vxlan_pkt from sf // send data_pkt to nf marsio_set_recv_mbuff(mr_instance, vxlan_mbuf); - EXPECT_TRUE(packet_io_thread_polling_endpoint_l3(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); + EXPECT_TRUE(packet_io_polling_endpoint_l3(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); EXPECT_TRUE(marsio_mbuff_cmp(dup_mbuf2, marsio_get_send_mbuff(mr_instance)) == 0); gtest_frame_log(gtest_frame); diff --git a/test/gtest_mix_pkt_stee_forward.cpp b/test/gtest_mix_pkt_stee_forward.cpp index 17d37d6..13e9c8e 100644 --- a/test/gtest_mix_pkt_stee_forward.cpp +++ b/test/gtest_mix_pkt_stee_forward.cpp @@ -97,12 +97,12 @@ TEST(PACKET_IO, MIX_PKT_STEE_FORWARD) // recv raw packet from nf // send vxlan packet to sf marsio_set_recv_mbuff(mr_instance, tx_mbuf2); - EXPECT_TRUE(packet_io_thread_polling_nf(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); + EXPECT_TRUE(packet_io_polling_nf(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); EXPECT_TRUE(mbuff_cmp_payload(dup_mbuf2, marsio_get_send_mbuff(mr_instance)) == 0); // recv decrypted packet from nf // send vxlan packet to sf marsio_set_recv_mbuff(mr_instance, tx_mbuf4); - EXPECT_TRUE(packet_io_thread_polling_nf(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); + EXPECT_TRUE(packet_io_polling_nf(gtest_frame->sce_ctx->io, >est_frame->sce_ctx->work_threads[0]) == 1); EXPECT_TRUE(mbuff_cmp_payload(dup_mbuf4, marsio_get_send_mbuff(mr_instance)) == 0); gtest_frame_log(gtest_frame); diff --git a/test/gtest_utils.h b/test/gtest_utils.h index b7b3cc4..d70b924 100644 --- a/test/gtest_utils.h +++ b/test/gtest_utils.h @@ -109,7 +109,7 @@ inline struct gtest_frame *gtest_frame_new(const char *json_file, const char *de thread_ctx->ref_sce_ctx = sce_ctx; thread_ctx->session_table_need_reset = 0; - EXPECT_TRUE(packet_io_thread_init(sce_ctx->io, thread_ctx) == 0); + EXPECT_TRUE(packet_io_init(sce_ctx->io, thread_ctx) == 0); instance->sce_ctx = sce_ctx; instance->json_file = strdup(json_file); @@ -159,11 +159,11 @@ inline void gtest_frame_run(struct gtest_frame *instance, marsio_buff_t *tx_mbuf if (is_poll_nf) { - EXPECT_TRUE(packet_io_thread_polling_nf(sce_ctx->io, thread_ctx) == 1); + EXPECT_TRUE(packet_io_polling_nf(sce_ctx->io, thread_ctx) == 1); } else { - EXPECT_TRUE(packet_io_thread_polling_endpoint_l3(sce_ctx->io, thread_ctx) == 1); + EXPECT_TRUE(packet_io_polling_endpoint_l3(sce_ctx->io, thread_ctx) == 1); } rx_mbuf = marsio_get_send_mbuff(mr_instance); |
