X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Fconfig.c;h=83bebfecb67c8fb88b3425f8a567e4be307ce320;hb=1eb4050817d4e57523bff836baf572ee7e982ca9;hp=10f0a36604d9a7ba840f5c2b11c64d0d7a40c080;hpb=e2aae1c1ced9c10bdbffdb341258a4a55b43ec82;p=dpdk.git diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 10f0a36604..83bebfecb6 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -84,7 +84,6 @@ #include #include #include -#include #include #include #include @@ -138,6 +137,11 @@ static const struct rss_type_info rss_type_table[] = { { "ipv6-ex", ETH_RSS_IPV6_EX }, { "ipv6-tcp-ex", ETH_RSS_IPV6_TCP_EX }, { "ipv6-udp-ex", ETH_RSS_IPV6_UDP_EX }, + { "port", ETH_RSS_PORT }, + { "vxlan", ETH_RSS_VXLAN }, + { "geneve", ETH_RSS_GENEVE }, + { "nvgre", ETH_RSS_NVGRE }, + }; static void @@ -256,7 +260,7 @@ void nic_xstats_display(portid_t port_id) { struct rte_eth_xstat *xstats; - int cnt_xstats, idx_xstat, idx_name; + int cnt_xstats, idx_xstat; struct rte_eth_xstat_name *xstats_names; printf("###### NIC extended statistics for port %-2d\n", port_id); @@ -281,6 +285,7 @@ nic_xstats_display(portid_t port_id) if (cnt_xstats != rte_eth_xstats_get_names( port_id, xstats_names, cnt_xstats)) { printf("Error: Cannot get xstats lookup\n"); + free(xstats_names); return; } @@ -293,18 +298,16 @@ nic_xstats_display(portid_t port_id) } if (cnt_xstats != rte_eth_xstats_get(port_id, xstats, cnt_xstats)) { printf("Error: Unable to get xstats\n"); + free(xstats_names); + free(xstats); return; } /* Display xstats */ for (idx_xstat = 0; idx_xstat < cnt_xstats; idx_xstat++) - for (idx_name = 0; idx_name < cnt_xstats; idx_name++) - if (xstats_names[idx_name].id == xstats[idx_xstat].id) { - printf("%s: %"PRIu64"\n", - xstats_names[idx_name].name, - xstats[idx_xstat].value); - break; - } + printf("%s: %"PRIu64"\n", + xstats_names[idx_xstat].name, + xstats[idx_xstat].value); free(xstats_names); free(xstats); } @@ -1197,14 +1200,9 @@ simple_fwd_config_setup(void) } /** - * For the RSS forwarding test, each core is assigned on every port a transmit - * queue whose index is the index of the core itself. This approach limits the - * maximumm number of processing cores of the RSS test to the maximum number of - * TX queues supported by the devices. - * - * Each core is assigned a single stream, each stream being composed of - * a RX queue to poll on a RX port for input messages, associated with - * a TX queue of a TX port where to send forwarded packets. + * For the RSS forwarding test all streams distributed over lcores. Each stream + * being composed of a RX queue to poll on a RX port for input messages, + * associated with a TX queue of a TX port where to send forwarded packets. * All packets received on the RX queue of index "RxQj" of the RX port "RxPi" * are sent on the TX queue "TxQl" of the TX port "TxPk" according to the two * following rules: @@ -1218,7 +1216,7 @@ rss_fwd_config_setup(void) portid_t txp; queueid_t rxq; queueid_t nb_q; - lcoreid_t lc_id; + streamid_t sm_id; nb_q = nb_rxq; if (nb_q > nb_txq) @@ -1228,15 +1226,19 @@ rss_fwd_config_setup(void) cur_fwd_config.nb_fwd_streams = (streamid_t) (nb_q * cur_fwd_config.nb_fwd_ports); + if (cur_fwd_config.nb_fwd_streams < cur_fwd_config.nb_fwd_lcores) + cur_fwd_config.nb_fwd_lcores = + (lcoreid_t)cur_fwd_config.nb_fwd_streams; + /* reinitialize forwarding streams */ init_fwd_streams(); setup_fwd_config_of_each_lcore(&cur_fwd_config); rxp = 0; rxq = 0; - for (lc_id = 0; lc_id < cur_fwd_config.nb_fwd_streams; lc_id++) { + for (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) { struct fwd_stream *fs; - fs = fwd_streams[lc_id]; + fs = fwd_streams[sm_id]; if ((rxp & 0x1) == 0) txp = (portid_t) (rxp + 1); @@ -2116,6 +2118,10 @@ flowtype_to_str(uint16_t flow_type) {"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP}, {"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER}, {"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD}, + {"port", RTE_ETH_FLOW_PORT}, + {"vxlan", RTE_ETH_FLOW_VXLAN}, + {"geneve", RTE_ETH_FLOW_GENEVE}, + {"nvgre", RTE_ETH_FLOW_NVGRE}, }; for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {