X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ftestpmd.c;h=fe2ce19f9962fbd73072d98d56306ee7d2734f95;hb=a2dfcd1ff609f5a4fd3b65774618a35c5c9f73c6;hp=f74ba61be6e762973a660c919eed38a98ce89d2a;hpb=6970401e97c3e012c2fd646a12cd7e716d523d23;p=dpdk.git diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index f74ba61be6..fe2ce19f99 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -54,7 +54,9 @@ #include #endif #include +#ifdef RTE_LIB_METRICS #include +#endif #ifdef RTE_LIB_BITRATESTATS #include #endif @@ -82,7 +84,13 @@ #endif #define EXTMEM_HEAP_NAME "extmem" -#define EXTBUF_ZONE_SIZE RTE_PGSIZE_2M +/* + * Zone size with the malloc overhead (max of debug and release variants) + * must fit into the smallest supported hugepage size (2M), + * so that an IOVA-contiguous zone of this size can always be allocated + * if there are free 2M hugepages. + */ +#define EXTBUF_ZONE_SIZE (RTE_PGSIZE_2M - 4 * RTE_CACHE_LINE_SIZE) uint16_t verbose_level = 0; /**< Silent by default. */ int testpmd_logtype; /**< Log type for testpmd logs */ @@ -447,7 +455,7 @@ uint32_t bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF; uint8_t latencystats_enabled; /* - * Lcore ID to serive latency statistics. + * Lcore ID to service latency statistics. */ lcoreid_t latencystats_lcore_id = -1; @@ -579,25 +587,6 @@ eth_rx_metadata_negotiate_mp(uint16_t port_id) } } -static void -flow_pick_transfer_proxy_mp(uint16_t port_id) -{ - struct rte_port *port = &ports[port_id]; - int ret; - - port->flow_transfer_proxy = port_id; - - if (!is_proc_primary()) - return; - - ret = rte_flow_pick_transfer_proxy(port_id, &port->flow_transfer_proxy, - NULL); - if (ret != 0) { - fprintf(stderr, "Error picking flow transfer proxy for port %u: %s - ignore\n", - port_id, rte_strerror(-ret)); - } -} - static int eth_dev_configure_mp(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, const struct rte_eth_conf *dev_conf) @@ -919,8 +908,7 @@ create_extmem(uint32_t nb_mbufs, uint32_t mbuf_sz, struct extmem_param *param, return 0; fail: - if (iovas) - free(iovas); + free(iovas); if (addr) munmap(addr, mem_sz); @@ -1078,12 +1066,11 @@ setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id, ext_num = 0; break; } - mz = rte_memzone_reserve_aligned(mz_name, EXTBUF_ZONE_SIZE, - socket_id, - RTE_MEMZONE_IOVA_CONTIG | - RTE_MEMZONE_1GB | - RTE_MEMZONE_SIZE_HINT_ONLY, - EXTBUF_ZONE_SIZE); + mz = rte_memzone_reserve(mz_name, EXTBUF_ZONE_SIZE, + socket_id, + RTE_MEMZONE_IOVA_CONTIG | + RTE_MEMZONE_1GB | + RTE_MEMZONE_SIZE_HINT_ONLY); if (mz == NULL) { /* * The caller exits on external buffer creation @@ -1572,7 +1559,6 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id) int i; eth_rx_metadata_negotiate_mp(pid); - flow_pick_transfer_proxy_mp(pid); port->dev_conf.txmode = tx_mode; port->dev_conf.rxmode = rx_mode; @@ -2740,6 +2726,13 @@ start_port(portid_t pid) if (pid != pi && pid != (portid_t)RTE_PORT_ALL) continue; + if (port_is_bonding_slave(pi)) { + fprintf(stderr, + "Please remove port %d from bonded device.\n", + pi); + continue; + } + need_check_link_status = 0; port = &ports[pi]; if (port->port_status == RTE_PORT_STOPPED) @@ -4242,8 +4235,10 @@ main(int argc, char** argv) port_id, rte_strerror(-ret)); } +#ifdef RTE_LIB_METRICS /* Init metrics library */ rte_metrics_init(rte_socket_id()); +#endif #ifdef RTE_LIB_LATENCYSTATS if (latencystats_enabled != 0) {