X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=inline;f=app%2Ftest-pmd%2Ftestpmd.c;h=96d2e0fcec8b4c6ff8f8efec753396c4ef67488a;hb=52f2c6f2598d19624a5f40d13be37c0701c26075;hp=1aa5f654eb2e7c5275c4b996c1a9a99fc56e939e;hpb=26cbb4191e91c07e8f498949b15ad33659797996;p=dpdk.git diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 1aa5f654eb..96d2e0fcec 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -46,18 +46,18 @@ #include #include #include -#ifdef RTE_LIBRTE_IXGBE_PMD +#ifdef RTE_NET_IXGBE #include #endif -#ifdef RTE_LIBRTE_PDUMP +#ifdef RTE_LIB_PDUMP #include #endif #include #include -#ifdef RTE_LIBRTE_BITRATESTATS +#ifdef RTE_LIB_BITRATESTATS #include #endif -#ifdef RTE_LIBRTE_LATENCY_STATS +#ifdef RTE_LIB_LATENCYSTATS #include #endif @@ -83,7 +83,7 @@ uint16_t verbose_level = 0; /**< Silent by default. */ int testpmd_logtype; /**< Log type for testpmd logs */ -/* use master core for command line ? */ +/* use main core for command line ? */ uint8_t interactive = 0; uint8_t auto_start = 0; uint8_t tx_first; @@ -209,6 +209,15 @@ uint16_t stats_period; /**< Period to show statistics (disabled by default) */ */ uint8_t f_quit; +/* + * Configuration of packet segments used to scatter received packets + * if some of split features is configured. + */ +uint16_t rx_pkt_seg_lengths[MAX_SEGS_BUFFER_SPLIT]; +uint8_t rx_pkt_nb_segs; /**< Number of segments to split */ +uint16_t rx_pkt_seg_offsets[MAX_SEGS_BUFFER_SPLIT]; +uint8_t rx_pkt_nb_offs; /**< Number of specified offsets */ + /* * Configuration of packet segments used by the "txonly" processing engine. */ @@ -231,6 +240,7 @@ uint32_t tx_pkt_times_intra; /**< Timings for send scheduling in TXONLY mode, time between packets. */ uint16_t nb_pkt_per_burst = DEF_PKT_BURST; /**< Number of packets per burst. */ +uint16_t nb_pkt_flowgen_clones; /**< Number of Tx packet clones to send in flowgen mode. */ uint16_t mb_mempool_cache = DEF_MBUF_CACHE; /**< Size of mbuf mempool cache. */ /* current configuration is in DCB or not,0 means it is not in DCB mode */ @@ -410,13 +420,13 @@ int do_mlockall = 0; * NIC bypass mode configuration options. */ -#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS +#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS /* The NIC bypass watchdog timeout. */ uint32_t bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF; #endif -#ifdef RTE_LIBRTE_LATENCY_STATS +#ifdef RTE_LIB_LATENCYSTATS /* * Set when latency stats is enabled in the commandline @@ -434,8 +444,11 @@ lcoreid_t latencystats_lcore_id = -1; * Ethernet device configuration. */ struct rte_eth_rxmode rx_mode = { - .max_rx_pkt_len = RTE_ETHER_MAX_LEN, - /**< Default maximum frame length. */ + /* Default maximum frame length. + * Zero is converted to "RTE_ETHER_MTU + PMD Ethernet overhead" + * in init_config(). + */ + .max_rx_pkt_len = 0, }; struct rte_eth_txmode tx_mode = { @@ -467,15 +480,6 @@ struct rte_fdir_conf fdir_conf = { volatile int test_done = 1; /* stop packet forwarding when set to 1. */ -struct queue_stats_mappings tx_queue_stats_mappings_array[MAX_TX_QUEUE_STATS_MAPPINGS]; -struct queue_stats_mappings rx_queue_stats_mappings_array[MAX_RX_QUEUE_STATS_MAPPINGS]; - -struct queue_stats_mappings *tx_queue_stats_mappings = tx_queue_stats_mappings_array; -struct queue_stats_mappings *rx_queue_stats_mappings = rx_queue_stats_mappings_array; - -uint16_t nb_tx_queue_stats_mappings = 0; -uint16_t nb_rx_queue_stats_mappings = 0; - /* * Display zero values by default for xstats */ @@ -494,7 +498,7 @@ uint8_t record_burst_stats; unsigned int num_sockets = 0; unsigned int socket_ids[RTE_MAX_NUMA_NODES]; -#ifdef RTE_LIBRTE_BITRATESTATS +#ifdef RTE_LIB_BITRATESTATS /* Bitrate statistics */ struct rte_stats_bitrates *bitrate_data; lcoreid_t bitrate_lcore_id; @@ -509,10 +513,13 @@ uint8_t gro_flush_cycles = GRO_DEFAULT_FLUSH_CYCLES; */ enum rte_eth_rx_mq_mode rx_mq_mode = ETH_MQ_RX_VMDQ_DCB_RSS; +/* + * Used to set forced link speed + */ +uint32_t eth_link_speed; + /* Forward function declarations */ static void setup_attached_port(portid_t pi); -static void map_port_queue_stats_mapping_registers(portid_t pi, - struct rte_port *port); static void check_all_ports_link_status(uint32_t port_mask); static int eth_event_callback(portid_t port_id, enum rte_eth_event_type type, @@ -572,7 +579,7 @@ set_default_fwd_lcores_config(void) } socket_ids[num_sockets++] = sock_num; } - if (i == rte_get_master_lcore()) + if (i == rte_get_main_lcore()) continue; fwd_lcores_cpuids[nb_lc++] = i; } @@ -1448,6 +1455,11 @@ init_config(void) rte_exit(EXIT_FAILURE, "rte_eth_dev_info_get() failed\n"); + ret = update_jumbo_frame_offload(pid); + if (ret != 0) + printf("Updating jumbo frame offload failed for port %u\n", + pid); + if (!(port->dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)) port->dev_conf.txmode.offloads &= @@ -1477,6 +1489,9 @@ init_config(void) port->tx_conf[k].offloads = port->dev_conf.txmode.offloads; + if (eth_link_speed) + port->dev_conf.link_speeds = eth_link_speed; + /* set flag to initialize port/queue */ port->need_reconfig = 1; port->need_reconfig_queues = 1; @@ -1789,6 +1804,8 @@ fwd_stream_stats_display(streamid_t stream_id) " Rx- bad outer L4 checksum: %-14"PRIu64"\n", fs->rx_bad_ip_csum, fs->rx_bad_l4_csum, fs->rx_bad_outer_l4_csum); + printf(" RX- bad outer IP checksum: %-14"PRIu64"\n", + fs->rx_bad_outer_ip_csum); } else { printf("\n"); } @@ -1811,6 +1828,7 @@ fwd_stats_display(void) uint64_t rx_bad_ip_csum; uint64_t rx_bad_l4_csum; uint64_t rx_bad_outer_l4_csum; + uint64_t rx_bad_outer_ip_csum; } ports_stats[RTE_MAX_ETHPORTS]; uint64_t total_rx_dropped = 0; uint64_t total_tx_dropped = 0; @@ -1843,13 +1861,13 @@ fwd_stats_display(void) ports_stats[fs->rx_port].rx_bad_l4_csum += fs->rx_bad_l4_csum; ports_stats[fs->rx_port].rx_bad_outer_l4_csum += fs->rx_bad_outer_l4_csum; + ports_stats[fs->rx_port].rx_bad_outer_ip_csum += + fs->rx_bad_outer_ip_csum; if (record_core_cycles) fwd_cycles += fs->core_cycles; } for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) { - uint8_t j; - pt_id = fwd_ports_ids[i]; port = &ports[pt_id]; @@ -1872,88 +1890,37 @@ fwd_stats_display(void) printf("\n %s Forward statistics for port %-2d %s\n", fwd_stats_border, pt_id, fwd_stats_border); - if (!port->rx_queue_stats_mapping_enabled && - !port->tx_queue_stats_mapping_enabled) { - printf(" RX-packets: %-14"PRIu64 - " RX-dropped: %-14"PRIu64 - "RX-total: %-"PRIu64"\n", - stats.ipackets, stats.imissed, - stats.ipackets + stats.imissed); - - if (cur_fwd_eng == &csum_fwd_engine) - printf(" Bad-ipcsum: %-14"PRIu64 - " Bad-l4csum: %-14"PRIu64 - "Bad-outer-l4csum: %-14"PRIu64"\n", - ports_stats[pt_id].rx_bad_ip_csum, - ports_stats[pt_id].rx_bad_l4_csum, - ports_stats[pt_id].rx_bad_outer_l4_csum); - if (stats.ierrors + stats.rx_nombuf > 0) { - printf(" RX-error: %-"PRIu64"\n", - stats.ierrors); - printf(" RX-nombufs: %-14"PRIu64"\n", - stats.rx_nombuf); - } - - printf(" TX-packets: %-14"PRIu64 - " TX-dropped: %-14"PRIu64 - "TX-total: %-"PRIu64"\n", - stats.opackets, ports_stats[pt_id].tx_dropped, - stats.opackets + ports_stats[pt_id].tx_dropped); - } else { - printf(" RX-packets: %14"PRIu64 - " RX-dropped:%14"PRIu64 - " RX-total:%14"PRIu64"\n", - stats.ipackets, stats.imissed, - stats.ipackets + stats.imissed); - - if (cur_fwd_eng == &csum_fwd_engine) - printf(" Bad-ipcsum:%14"PRIu64 - " Bad-l4csum:%14"PRIu64 - " Bad-outer-l4csum: %-14"PRIu64"\n", - ports_stats[pt_id].rx_bad_ip_csum, - ports_stats[pt_id].rx_bad_l4_csum, - ports_stats[pt_id].rx_bad_outer_l4_csum); - if ((stats.ierrors + stats.rx_nombuf) > 0) { - printf(" RX-error:%"PRIu64"\n", stats.ierrors); - printf(" RX-nombufs: %14"PRIu64"\n", - stats.rx_nombuf); - } + printf(" RX-packets: %-14"PRIu64" RX-dropped: %-14"PRIu64 + "RX-total: %-"PRIu64"\n", stats.ipackets, stats.imissed, + stats.ipackets + stats.imissed); - printf(" TX-packets: %14"PRIu64 - " TX-dropped:%14"PRIu64 - " TX-total:%14"PRIu64"\n", - stats.opackets, ports_stats[pt_id].tx_dropped, - stats.opackets + ports_stats[pt_id].tx_dropped); + if (cur_fwd_eng == &csum_fwd_engine) { + printf(" Bad-ipcsum: %-14"PRIu64 + " Bad-l4csum: %-14"PRIu64 + "Bad-outer-l4csum: %-14"PRIu64"\n", + ports_stats[pt_id].rx_bad_ip_csum, + ports_stats[pt_id].rx_bad_l4_csum, + ports_stats[pt_id].rx_bad_outer_l4_csum); + printf(" Bad-outer-ipcsum: %-14"PRIu64"\n", + ports_stats[pt_id].rx_bad_outer_ip_csum); + } + if (stats.ierrors + stats.rx_nombuf > 0) { + printf(" RX-error: %-"PRIu64"\n", stats.ierrors); + printf(" RX-nombufs: %-14"PRIu64"\n", stats.rx_nombuf); } + printf(" TX-packets: %-14"PRIu64" TX-dropped: %-14"PRIu64 + "TX-total: %-"PRIu64"\n", + stats.opackets, ports_stats[pt_id].tx_dropped, + stats.opackets + ports_stats[pt_id].tx_dropped); + if (record_burst_stats) { if (ports_stats[pt_id].rx_stream) pkt_burst_stats_display("RX", &ports_stats[pt_id].rx_stream->rx_burst_stats); if (ports_stats[pt_id].tx_stream) pkt_burst_stats_display("TX", - &ports_stats[pt_id].tx_stream->tx_burst_stats); - } - - if (port->rx_queue_stats_mapping_enabled) { - printf("\n"); - for (j = 0; j < RTE_ETHDEV_QUEUE_STAT_CNTRS; j++) { - printf(" Stats reg %2d RX-packets:%14"PRIu64 - " RX-errors:%14"PRIu64 - " RX-bytes:%14"PRIu64"\n", - j, stats.q_ipackets[j], - stats.q_errors[j], stats.q_ibytes[j]); - } - printf("\n"); - } - if (port->tx_queue_stats_mapping_enabled) { - for (j = 0; j < RTE_ETHDEV_QUEUE_STAT_CNTRS; j++) { - printf(" Stats reg %2d TX-packets:%14"PRIu64 - " TX-bytes:%14" - PRIu64"\n", - j, stats.q_opackets[j], - stats.q_obytes[j]); - } + &ports_stats[pt_id].tx_stream->tx_burst_stats); } printf(" %s--------------------------------%s\n", @@ -2014,6 +1981,7 @@ fwd_stats_reset(void) fs->rx_bad_ip_csum = 0; fs->rx_bad_l4_csum = 0; fs->rx_bad_outer_l4_csum = 0; + fs->rx_bad_outer_ip_csum = 0; memset(&fs->rx_burst_stats, 0, sizeof(fs->rx_burst_stats)); memset(&fs->tx_burst_stats, 0, sizeof(fs->tx_burst_stats)); @@ -2072,7 +2040,7 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd) struct fwd_stream **fsm; streamid_t nb_fs; streamid_t sm_id; -#ifdef RTE_LIBRTE_BITRATESTATS +#ifdef RTE_LIB_BITRATESTATS uint64_t tics_per_1sec; uint64_t tics_datum; uint64_t tics_current; @@ -2087,7 +2055,7 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd) do { for (sm_id = 0; sm_id < nb_fs; sm_id++) (*pkt_fwd)(fsm[sm_id]); -#ifdef RTE_LIBRTE_BITRATESTATS +#ifdef RTE_LIB_BITRATESTATS if (bitrate_enabled != 0 && bitrate_lcore_id == rte_lcore_id()) { tics_current = rte_rdtsc(); @@ -2100,7 +2068,7 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd) } } #endif -#ifdef RTE_LIBRTE_LATENCY_STATS +#ifdef RTE_LIB_LATENCYSTATS if (latencystats_enabled != 0 && latencystats_lcore_id == rte_lcore_id()) rte_latencystats_update(); @@ -2227,11 +2195,6 @@ start_packet_forwarding(int with_tx_first) rxtx_config_display(); fwd_stats_reset(); - for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) { - pt_id = fwd_ports_ids[i]; - port = &ports[pt_id]; - map_port_queue_stats_mapping_registers(pt_id, port); - } if (with_tx_first) { port_fwd_begin = tx_only_engine.port_fwd_begin; if (port_fwd_begin != NULL) { @@ -2449,6 +2412,51 @@ setup_hairpin_queues(portid_t pi, portid_t p_pi, uint16_t cnt_pi) return 0; } +/* Configure the Rx with optional split. */ +int +rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, + uint16_t nb_rx_desc, unsigned int socket_id, + struct rte_eth_rxconf *rx_conf, struct rte_mempool *mp) +{ + union rte_eth_rxseg rx_useg[MAX_SEGS_BUFFER_SPLIT] = {}; + unsigned int i, mp_n; + int ret; + + if (rx_pkt_nb_segs <= 1 || + (rx_conf->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) == 0) { + rx_conf->rx_seg = NULL; + rx_conf->rx_nseg = 0; + ret = rte_eth_rx_queue_setup(port_id, rx_queue_id, + nb_rx_desc, socket_id, + rx_conf, mp); + return ret; + } + for (i = 0; i < rx_pkt_nb_segs; i++) { + struct rte_eth_rxseg_split *rx_seg = &rx_useg[i].split; + struct rte_mempool *mpx; + /* + * Use last valid pool for the segments with number + * exceeding the pool index. + */ + mp_n = (i > mbuf_data_size_n) ? mbuf_data_size_n - 1 : i; + mpx = mbuf_pool_find(socket_id, mp_n); + /* Handle zero as mbuf data buffer size. */ + rx_seg->length = rx_pkt_seg_lengths[i] ? + rx_pkt_seg_lengths[i] : + mbuf_data_size[mp_n]; + rx_seg->offset = i < rx_pkt_nb_offs ? + rx_pkt_seg_offsets[i] : 0; + rx_seg->mp = mpx ? mpx : mp; + } + rx_conf->rx_nseg = rx_pkt_nb_segs; + rx_conf->rx_seg = rx_useg; + ret = rte_eth_rx_queue_setup(port_id, rx_queue_id, nb_rx_desc, + socket_id, rx_conf, NULL); + rx_conf->rx_seg = NULL; + rx_conf->rx_nseg = 0; + return ret; +} + int start_port(portid_t pid) { @@ -2563,7 +2571,7 @@ start_port(portid_t pid) return -1; } - diag = rte_eth_rx_queue_setup(pi, qi, + diag = rx_queue_setup(pi, qi, port->nb_rx_desc[qi], rxring_numa[pi], &(port->rx_conf[qi]), @@ -2579,7 +2587,7 @@ start_port(portid_t pid) port->socket_id); return -1; } - diag = rte_eth_rx_queue_setup(pi, qi, + diag = rx_queue_setup(pi, qi, port->nb_rx_desc[qi], port->socket_id, &(port->rx_conf[qi]), @@ -2618,8 +2626,10 @@ start_port(portid_t pid) cnt_pi++; /* start port */ - if (rte_eth_dev_start(pi) < 0) { - printf("Fail to start port %d\n", pi); + diag = rte_eth_dev_start(pi); + if (diag < 0) { + printf("Fail to start port %d: %s\n", pi, + rte_strerror(-diag)); /* Fail to setup rx queue, return */ if (rte_atomic16_cmpset(&(port->port_status), @@ -2752,7 +2762,12 @@ stop_port(portid_t pid) } } - rte_eth_dev_stop(pi); + if (port->flow_list) + port_flow_flush(pi); + + if (rte_eth_dev_stop(pi) != 0) + RTE_LOG(ERR, EAL, "rte_eth_dev_stop failed for port %u\n", + pi); if (rte_atomic16_cmpset(&(port->port_status), RTE_PORT_HANDLING, RTE_PORT_STOPPED) == 0) @@ -3296,84 +3311,6 @@ dev_event_callback(const char *device_name, enum rte_dev_event_type type, } } -static int -set_tx_queue_stats_mapping_registers(portid_t port_id, struct rte_port *port) -{ - uint16_t i; - int diag; - uint8_t mapping_found = 0; - - for (i = 0; i < nb_tx_queue_stats_mappings; i++) { - if ((tx_queue_stats_mappings[i].port_id == port_id) && - (tx_queue_stats_mappings[i].queue_id < nb_txq )) { - diag = rte_eth_dev_set_tx_queue_stats_mapping(port_id, - tx_queue_stats_mappings[i].queue_id, - tx_queue_stats_mappings[i].stats_counter_id); - if (diag != 0) - return diag; - mapping_found = 1; - } - } - if (mapping_found) - port->tx_queue_stats_mapping_enabled = 1; - return 0; -} - -static int -set_rx_queue_stats_mapping_registers(portid_t port_id, struct rte_port *port) -{ - uint16_t i; - int diag; - uint8_t mapping_found = 0; - - for (i = 0; i < nb_rx_queue_stats_mappings; i++) { - if ((rx_queue_stats_mappings[i].port_id == port_id) && - (rx_queue_stats_mappings[i].queue_id < nb_rxq )) { - diag = rte_eth_dev_set_rx_queue_stats_mapping(port_id, - rx_queue_stats_mappings[i].queue_id, - rx_queue_stats_mappings[i].stats_counter_id); - if (diag != 0) - return diag; - mapping_found = 1; - } - } - if (mapping_found) - port->rx_queue_stats_mapping_enabled = 1; - return 0; -} - -static void -map_port_queue_stats_mapping_registers(portid_t pi, struct rte_port *port) -{ - int diag = 0; - - diag = set_tx_queue_stats_mapping_registers(pi, port); - if (diag != 0) { - if (diag == -ENOTSUP) { - port->tx_queue_stats_mapping_enabled = 0; - printf("TX queue stats mapping not supported port id=%d\n", pi); - } - else - rte_exit(EXIT_FAILURE, - "set_tx_queue_stats_mapping_registers " - "failed for port id=%d diag=%d\n", - pi, diag); - } - - diag = set_rx_queue_stats_mapping_registers(pi, port); - if (diag != 0) { - if (diag == -ENOTSUP) { - port->rx_queue_stats_mapping_enabled = 0; - printf("RX queue stats mapping not supported port id=%d\n", pi); - } - else - rte_exit(EXIT_FAILURE, - "set_rx_queue_stats_mapping_registers " - "failed for port id=%d diag=%d\n", - pi, diag); - } -} - static void rxtx_port_config(struct rte_port *port) { @@ -3431,6 +3368,80 @@ rxtx_port_config(struct rte_port *port) } } +/* + * Helper function to arrange max_rx_pktlen value and JUMBO_FRAME offload, + * MTU is also aligned if JUMBO_FRAME offload is not set. + * + * port->dev_info should be set before calling this function. + * + * return 0 on success, negative on error + */ +int +update_jumbo_frame_offload(portid_t portid) +{ + struct rte_port *port = &ports[portid]; + uint32_t eth_overhead; + uint64_t rx_offloads; + int ret; + bool on; + + /* Update the max_rx_pkt_len to have MTU as RTE_ETHER_MTU */ + if (port->dev_info.max_mtu != UINT16_MAX && + port->dev_info.max_rx_pktlen > port->dev_info.max_mtu) + eth_overhead = port->dev_info.max_rx_pktlen - + port->dev_info.max_mtu; + else + eth_overhead = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN; + + rx_offloads = port->dev_conf.rxmode.offloads; + + /* Default config value is 0 to use PMD specific overhead */ + if (port->dev_conf.rxmode.max_rx_pkt_len == 0) + port->dev_conf.rxmode.max_rx_pkt_len = RTE_ETHER_MTU + eth_overhead; + + if (port->dev_conf.rxmode.max_rx_pkt_len <= RTE_ETHER_MTU + eth_overhead) { + rx_offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME; + on = false; + } else { + if ((port->dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) == 0) { + printf("Frame size (%u) is not supported by port %u\n", + port->dev_conf.rxmode.max_rx_pkt_len, + portid); + return -1; + } + rx_offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; + on = true; + } + + if (rx_offloads != port->dev_conf.rxmode.offloads) { + uint16_t qid; + + port->dev_conf.rxmode.offloads = rx_offloads; + + /* Apply JUMBO_FRAME offload configuration to Rx queue(s) */ + for (qid = 0; qid < port->dev_info.nb_rx_queues; qid++) { + if (on) + port->rx_conf[qid].offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; + else + port->rx_conf[qid].offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME; + } + } + + /* If JUMBO_FRAME is set MTU conversion done by ethdev layer, + * if unset do it here + */ + if ((rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) == 0) { + ret = rte_eth_dev_set_mtu(portid, + port->dev_conf.rxmode.max_rx_pkt_len - eth_overhead); + if (ret) + printf("Failed to set MTU to %u for port %u\n", + port->dev_conf.rxmode.max_rx_pkt_len - eth_overhead, + portid); + } + + return 0; +} + void init_port_config(void) { @@ -3470,8 +3481,7 @@ init_port_config(void) if (ret != 0) return; - map_port_queue_stats_mapping_registers(pid, port); -#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS +#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS rte_pmd_ixgbe_bypass_init(pid); #endif @@ -3681,8 +3691,6 @@ init_port_dcb_config(portid_t pid, if (retval != 0) return retval; - map_port_queue_stats_mapping_registers(pid, rte_port); - rte_port->dcb_flag = 1; return 0; @@ -3740,11 +3748,11 @@ signal_handler(int signum) if (signum == SIGINT || signum == SIGTERM) { printf("\nSignal %d received, preparing to exit...\n", signum); -#ifdef RTE_LIBRTE_PDUMP +#ifdef RTE_LIB_PDUMP /* uninitialize packet capture framework */ rte_pdump_uninit(); #endif -#ifdef RTE_LIBRTE_LATENCY_STATS +#ifdef RTE_LIB_LATENCYSTATS if (latencystats_enabled != 0) rte_latencystats_uninit(); #endif @@ -3786,7 +3794,7 @@ main(int argc, char** argv) if (ret != 0) rte_exit(EXIT_FAILURE, "Cannot register for ethdev events"); -#ifdef RTE_LIBRTE_PDUMP +#ifdef RTE_LIB_PDUMP /* initialize packet capture framework */ rte_pdump_init(); #endif @@ -3809,10 +3817,10 @@ main(int argc, char** argv) "Check the core mask argument\n"); /* Bitrate/latency stats disabled by default */ -#ifdef RTE_LIBRTE_BITRATESTATS +#ifdef RTE_LIB_BITRATESTATS bitrate_enabled = 0; #endif -#ifdef RTE_LIBRTE_LATENCY_STATS +#ifdef RTE_LIB_LATENCYSTATS latencystats_enabled = 0; #endif @@ -3891,7 +3899,7 @@ main(int argc, char** argv) /* Init metrics library */ rte_metrics_init(rte_socket_id()); -#ifdef RTE_LIBRTE_LATENCY_STATS +#ifdef RTE_LIB_LATENCYSTATS if (latencystats_enabled != 0) { int ret = rte_latencystats_init(1, NULL); if (ret) @@ -3903,7 +3911,7 @@ main(int argc, char** argv) #endif /* Setup bitrate stats */ -#ifdef RTE_LIBRTE_BITRATESTATS +#ifdef RTE_LIB_BITRATESTATS if (bitrate_enabled != 0) { bitrate_data = rte_stats_bitrate_create(); if (bitrate_data == NULL) @@ -3913,7 +3921,7 @@ main(int argc, char** argv) } #endif -#ifdef RTE_LIBRTE_CMDLINE +#ifdef RTE_LIB_CMDLINE if (strlen(cmdline_filename) != 0) cmdline_read_from_file(cmdline_filename);