app: no more bare metal environment
[dpdk.git] / app / test-pmd / testpmd.c
index b426dfc..79620c6 100644 (file)
@@ -225,7 +225,9 @@ struct rte_eth_thresh tx_thresh = {
 /*
  * Configurable value of RX free threshold.
  */
-uint16_t rx_free_thresh = 0; /* Immediately free RX descriptors by default. */
+uint16_t rx_free_thresh = 32; /* Refill RX descriptors once every 32 packets,
+               This setting is needed for ixgbe to enable bulk alloc or vector
+               receive functionality. */
 
 /*
  * Configurable value of RX drop enable.
@@ -404,9 +406,9 @@ testpmd_mbuf_ctor(struct rte_mempool *mp,
                        mb_ctor_arg->seg_buf_offset);
        mb->buf_len      = mb_ctor_arg->seg_buf_size;
        mb->ol_flags     = 0;
-       mb->data         = (char *) mb->buf_addr + RTE_PKTMBUF_HEADROOM;
+       mb->data_off     = RTE_PKTMBUF_HEADROOM;
        mb->nb_segs      = 1;
-       mb->l2_l3_len       = 0;
+       mb->tx_offload   = 0;
        mb->vlan_tci     = 0;
        mb->hash.rss     = 0;
 }
@@ -628,7 +630,7 @@ init_config(void)
 
 
 void
-reconfig(portid_t new_port_id)
+reconfig(portid_t new_port_id, unsigned socket_id)
 {
        struct rte_port *port;
 
@@ -647,6 +649,7 @@ reconfig(portid_t new_port_id)
        /* set flag to initialize port/queue */
        port->need_reconfig = 1;
        port->need_reconfig_queues = 1;
+       port->socket_id = socket_id;
 
        init_port_config();
 }
@@ -1852,10 +1855,6 @@ init_port_dcb_config(portid_t pid,struct dcb_config *dcb_conf)
        return 0;
 }
 
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define main _main
-#endif
-
 int
 main(int argc, char** argv)
 {
@@ -1868,12 +1867,7 @@ main(int argc, char** argv)
 
        nb_ports = (portid_t) rte_eth_dev_count();
        if (nb_ports == 0)
-               rte_exit(EXIT_FAILURE, "No probed ethernet devices - "
-                                                       "check that "
-                         "CONFIG_RTE_LIBRTE_IGB_PMD=y and that "
-                         "CONFIG_RTE_LIBRTE_EM_PMD=y and that "
-                         "CONFIG_RTE_LIBRTE_IXGBE_PMD=y in your "
-                         "configuration file\n");
+               rte_exit(EXIT_FAILURE, "No probed ethernet device\n");
 
        set_def_fwd_config();
        if (nb_lcores == 0)