examples/qos_sched: add --msz for mempool size
[dpdk.git] / examples / qos_sched / init.c
index 2647033..b2e7b71 100755 (executable)
@@ -81,6 +81,7 @@ struct ring_thresh tx_thresh = {
 
 uint32_t nb_pfc;
 const char *cfg_profile = NULL;
+int mp_size = NB_MBUF;
 struct flow_conf qos_conf[MAX_DATA_STREAMS];
 
 static const struct rte_eth_conf port_conf = {
@@ -181,9 +182,6 @@ static struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
 
                .tc_rate = {1250000000, 1250000000, 1250000000, 1250000000},
                .tc_period = 10,
-#ifdef RTE_SCHED_SUBPORT_TC_OV
-               .tc_ov_period = 10,
-#endif
        },
 };
 
@@ -195,7 +193,7 @@ static struct rte_sched_pipe_params pipe_profiles[RTE_SCHED_PIPE_PROFILES_PER_PO
                .tc_rate = {305175, 305175, 305175, 305175}, 
                .tc_period = 40,
 #ifdef RTE_SCHED_SUBPORT_TC_OV
-               .tc_ov_weight = {1, 1, 1, 1},
+               .tc_ov_weight = 1,
 #endif
                
                .wrr_weights = {1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 1},
@@ -346,7 +344,7 @@ int app_init(void)
 
                /* create the mbuf pools for each RX Port */
                rte_snprintf(pool_name, MAX_NAME_LEN, "mbuf_pool%u", i);
-               qos_conf[i].mbuf_pool = rte_mempool_create(pool_name, NB_MBUF, MBUF_SIZE,
+               qos_conf[i].mbuf_pool = rte_mempool_create(pool_name, mp_size, MBUF_SIZE,
                                                burst_conf.rx_burst * 4,
                                                sizeof(struct rte_pktmbuf_pool_private),
                                                rte_pktmbuf_pool_init, NULL,
@@ -368,7 +366,7 @@ int app_init(void)
                         rte_get_timer_hz());
        
        RTE_LOG(INFO, APP, "Ring sizes: NIC RX = %u, Mempool = %d SW queue = %u,"
-                        "NIC TX = %u\n", ring_conf.rx_size, NB_MBUF, ring_conf.ring_size,
+                        "NIC TX = %u\n", ring_conf.rx_size, mp_size, ring_conf.ring_size,
                         ring_conf.tx_size);
 
        RTE_LOG(INFO, APP, "Burst sizes: RX read = %hu, RX write = %hu,\n"