diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/pdump/main.c | 9 | ||||
-rw-r--r-- | app/test-bbdev/test_bbdev_perf.c | 10 | ||||
-rw-r--r-- | app/test-eventdev/test_perf_common.c | 3 | ||||
-rw-r--r-- | app/test-pmd/cmdline.c | 16 | ||||
-rw-r--r-- | app/test-pmd/cmdline_flow.c | 2 | ||||
-rw-r--r-- | app/test-pmd/cmdline_tm.c | 24 | ||||
-rw-r--r-- | app/test-pmd/testpmd.c | 6 |
7 files changed, 45 insertions, 25 deletions
diff --git a/app/pdump/main.c b/app/pdump/main.c index 9e86bf62..5e183ea9 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -494,6 +494,7 @@ cleanup_pdump_resources(void) { int i; struct pdump_tuples *pt; + char name[RTE_ETH_NAME_MAX_LEN]; /* disable pdump and free the pdump_tuple resources */ for (i = 0; i < num_tuples; i++) { @@ -510,6 +511,14 @@ cleanup_pdump_resources(void) free_ring_data(pt->rx_ring, pt->rx_vdev_id, &pt->stats); if (pt->dir & RTE_PDUMP_FLAG_TX) free_ring_data(pt->tx_ring, pt->tx_vdev_id, &pt->stats); + + /* Remove the vdev created */ + rte_eth_dev_get_name_by_port(pt->rx_vdev_id, name); + rte_eal_hotplug_remove("vdev", name); + + rte_eth_dev_get_name_by_port(pt->tx_vdev_id, name); + rte_eal_hotplug_remove("vdev", name); + } cleanup_rings(); } diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index fbe6cc91..fa26deb1 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -1953,7 +1953,10 @@ offload_latency_test_dec(struct rte_mempool *mempool, struct test_buffers *bufs, if (unlikely(num_to_process - dequeued < burst_sz)) burst_sz = num_to_process - dequeued; - rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz); + ret = rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz); + TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", + burst_sz); + if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_dec_op(ops_enq, burst_sz, dequeued, bufs->inputs, @@ -2035,7 +2038,10 @@ offload_latency_test_enc(struct rte_mempool *mempool, struct test_buffers *bufs, if (unlikely(num_to_process - dequeued < burst_sz)) burst_sz = num_to_process - dequeued; - rte_bbdev_enc_op_alloc_bulk(mempool, ops_enq, burst_sz); + ret = rte_bbdev_enc_op_alloc_bulk(mempool, ops_enq, burst_sz); + TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", + burst_sz); + if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_enc_op(ops_enq, burst_sz, dequeued, bufs->inputs, diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index 86187753..f99a6a60 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -327,7 +327,8 @@ perf_launch_lcores(struct evt_test *test, struct evt_options *opt, } if (new_cycles - dead_lock_cycles > dead_lock_sample && - opt->prod_type == EVT_PROD_TYPE_SYNT) { + (opt->prod_type == EVT_PROD_TYPE_SYNT || + opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR)) { remaining = t->outstand_pkts - processed_pkts(t); if (dead_lock_remaining == remaining) { rte_event_dev_dump(opt->dev_id, stdout); diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 12750741..51704b50 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -15567,10 +15567,9 @@ static void cmd_set_mplsogre_encap_parsed(void *parsed_result, struct cmd_set_mplsogre_encap_result *res = parsed_result; union { uint32_t mplsogre_label; - uint8_t label[3]; + uint8_t label[4]; } id = { - .mplsogre_label = - rte_cpu_to_be_32(res->label) & RTE_BE32(0x00ffffff), + .mplsogre_label = rte_cpu_to_be_32(res->label<<12), }; if (strcmp(res->mplsogre, "mplsogre_encap") == 0) @@ -15583,7 +15582,7 @@ static void cmd_set_mplsogre_encap_parsed(void *parsed_result, mplsogre_encap_conf.select_ipv4 = 0; else return; - rte_memcpy(mplsogre_encap_conf.label, &id.label[1], 3); + rte_memcpy(mplsogre_encap_conf.label, &id.label, 3); if (mplsogre_encap_conf.select_ipv4) { IPV4_ADDR_TO_UINT(res->ip_src, mplsogre_encap_conf.ipv4_src); IPV4_ADDR_TO_UINT(res->ip_dst, mplsogre_encap_conf.ipv4_dst); @@ -15804,10 +15803,9 @@ static void cmd_set_mplsoudp_encap_parsed(void *parsed_result, struct cmd_set_mplsoudp_encap_result *res = parsed_result; union { uint32_t mplsoudp_label; - uint8_t label[3]; + uint8_t label[4]; } id = { - .mplsoudp_label = - rte_cpu_to_be_32(res->label) & RTE_BE32(0x00ffffff), + .mplsoudp_label = rte_cpu_to_be_32(res->label<<12), }; if (strcmp(res->mplsoudp, "mplsoudp_encap") == 0) @@ -15820,7 +15818,7 @@ static void cmd_set_mplsoudp_encap_parsed(void *parsed_result, mplsoudp_encap_conf.select_ipv4 = 0; else return; - rte_memcpy(mplsoudp_encap_conf.label, &id.label[1], 3); + rte_memcpy(mplsoudp_encap_conf.label, &id.label, 3); mplsoudp_encap_conf.udp_src = rte_cpu_to_be_16(res->udp_src); mplsoudp_encap_conf.udp_dst = rte_cpu_to_be_16(res->udp_dst); if (mplsoudp_encap_conf.select_ipv4) { @@ -18457,7 +18455,7 @@ cmd_show_tx_metadata_parsed(void *parsed_result, } if (!strcmp(res->cmd_keyword, "tx_metadata")) { printf("Port %u tx_metadata: %u\n", res->cmd_pid, - ports[res->cmd_pid].tx_metadata); + rte_be_to_cpu_32(ports[res->cmd_pid].tx_metadata)); } } diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 23ea7cc8..5c0108fa 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -3808,6 +3808,7 @@ parse_vc_action_mplsogre_encap(struct context *ctx, const struct token *token, header += sizeof(gre); memcpy(mpls.label_tc_s, mplsogre_encap_conf.label, RTE_DIM(mplsogre_encap_conf.label)); + mpls.label_tc_s[2] |= 0x1; memcpy(header, &mpls, sizeof(mpls)); header += sizeof(mpls); action_encap_data->conf.size = header - @@ -3998,6 +3999,7 @@ parse_vc_action_mplsoudp_encap(struct context *ctx, const struct token *token, header += sizeof(udp); memcpy(mpls.label_tc_s, mplsoudp_encap_conf.label, RTE_DIM(mplsoudp_encap_conf.label)); + mpls.label_tc_s[2] |= 0x1; memcpy(header, &mpls, sizeof(mpls)); header += sizeof(mpls); action_encap_data->conf.size = header - diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c index 4c763482..10120847 100644 --- a/app/test-pmd/cmdline_tm.c +++ b/app/test-pmd/cmdline_tm.c @@ -1156,18 +1156,18 @@ struct cmd_add_port_tm_node_wred_profile_result { uint16_t port_id; uint32_t wred_profile_id; cmdline_fixed_string_t color_g; - uint16_t min_th_g; - uint16_t max_th_g; + uint64_t min_th_g; + uint64_t max_th_g; uint16_t maxp_inv_g; uint16_t wq_log2_g; cmdline_fixed_string_t color_y; - uint16_t min_th_y; - uint16_t max_th_y; + uint64_t min_th_y; + uint64_t max_th_y; uint16_t maxp_inv_y; uint16_t wq_log2_y; cmdline_fixed_string_t color_r; - uint16_t min_th_r; - uint16_t max_th_r; + uint64_t min_th_r; + uint64_t max_th_r; uint16_t maxp_inv_r; uint16_t wq_log2_r; }; @@ -1206,11 +1206,11 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_g = cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_min_th_g = TOKEN_NUM_INITIALIZER( struct cmd_add_port_tm_node_wred_profile_result, - min_th_g, UINT16); + min_th_g, UINT64); cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_max_th_g = TOKEN_NUM_INITIALIZER( struct cmd_add_port_tm_node_wred_profile_result, - max_th_g, UINT16); + max_th_g, UINT64); cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_maxp_inv_g = TOKEN_NUM_INITIALIZER( struct cmd_add_port_tm_node_wred_profile_result, @@ -1226,11 +1226,11 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_y = cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_min_th_y = TOKEN_NUM_INITIALIZER( struct cmd_add_port_tm_node_wred_profile_result, - min_th_y, UINT16); + min_th_y, UINT64); cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_max_th_y = TOKEN_NUM_INITIALIZER( struct cmd_add_port_tm_node_wred_profile_result, - max_th_y, UINT16); + max_th_y, UINT64); cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_maxp_inv_y = TOKEN_NUM_INITIALIZER( struct cmd_add_port_tm_node_wred_profile_result, @@ -1246,11 +1246,11 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_r = cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_min_th_r = TOKEN_NUM_INITIALIZER( struct cmd_add_port_tm_node_wred_profile_result, - min_th_r, UINT16); + min_th_r, UINT64); cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_max_th_r = TOKEN_NUM_INITIALIZER( struct cmd_add_port_tm_node_wred_profile_result, - max_th_r, UINT16); + max_th_r, UINT64); cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_maxp_inv_r = TOKEN_NUM_INITIALIZER( struct cmd_add_port_tm_node_wred_profile_result, diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 4c75587d..7b0c8e68 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2406,9 +2406,13 @@ pmd_test_exit(void) if (ports != NULL) { no_link_check = 1; RTE_ETH_FOREACH_DEV(pt_id) { - printf("\nShutting down port %d...\n", pt_id); + printf("\nStopping port %d...\n", pt_id); fflush(stdout); stop_port(pt_id); + } + RTE_ETH_FOREACH_DEV(pt_id) { + printf("\nShutting down port %d...\n", pt_id); + fflush(stdout); close_port(pt_id); /* |