maintainers: update for i40e
[dpdk.git] / examples / qos_sched / main.c
index 19a4f85..1e2fb18 100644 (file)
@@ -125,8 +125,7 @@ app_main_loop(__attribute__((unused))void *dummy)
        /* initialize mbuf memory */
        if (mode == APP_RX_MODE) {
                for (i = 0; i < rx_idx; i++) {
-                       RTE_LOG(INFO, APP, "flow %u lcoreid %u "
-                                       "reading port %"PRIu8"\n",
+                       RTE_LOG(INFO, APP, "flow%u lcoreid%u reading port%u\n",
                                        i, lcore_id, rx_confs[i]->rx_port);
                }
 
@@ -135,13 +134,13 @@ app_main_loop(__attribute__((unused))void *dummy)
        else if (mode == (APP_TX_MODE | APP_WT_MODE)) {
                for (i = 0; i < wt_idx; i++) {
                        wt_confs[i]->m_table = rte_malloc("table_wt", sizeof(struct rte_mbuf *)
-                                       * burst_conf.tx_burst, CACHE_LINE_SIZE);
+                                       * burst_conf.tx_burst, RTE_CACHE_LINE_SIZE);
 
                        if (wt_confs[i]->m_table == NULL)
                                rte_panic("flow %u unable to allocate memory buffer\n", i);
 
-                       RTE_LOG(INFO, APP, "flow %u lcoreid %u sched+write "
-                                       "port %"PRIu8"\n",
+                       RTE_LOG(INFO, APP,
+                               "flow %u lcoreid %u sched+write port %u\n",
                                        i, lcore_id, wt_confs[i]->tx_port);
                }
 
@@ -150,13 +149,12 @@ app_main_loop(__attribute__((unused))void *dummy)
        else if (mode == APP_TX_MODE) {
                for (i = 0; i < tx_idx; i++) {
                        tx_confs[i]->m_table = rte_malloc("table_tx", sizeof(struct rte_mbuf *)
-                                       * burst_conf.tx_burst, CACHE_LINE_SIZE);
+                                       * burst_conf.tx_burst, RTE_CACHE_LINE_SIZE);
 
                        if (tx_confs[i]->m_table == NULL)
                                rte_panic("flow %u unable to allocate memory buffer\n", i);
 
-                       RTE_LOG(INFO, APP, "flow %u lcoreid %u "
-                                       "writing port %"PRIu8"\n",
+                       RTE_LOG(INFO, APP, "flow%u lcoreid%u write port%u\n",
                                        i, lcore_id, tx_confs[i]->tx_port);
                }
 
@@ -186,7 +184,7 @@ app_stat(void)
                struct flow_conf *flow = &qos_conf[i];
 
                rte_eth_stats_get(flow->rx_port, &stats);
-               printf("\nRX port %"PRIu8": rx: %"PRIu64 " err: %"PRIu64
+               printf("\nRX port %"PRIu16": rx: %"PRIu64 " err: %"PRIu64
                                " no_mbuf: %"PRIu64 "\n",
                                flow->rx_port,
                                stats.ipackets - rx_stats[i].ipackets,
@@ -195,14 +193,12 @@ app_stat(void)
                memcpy(&rx_stats[i], &stats, sizeof(stats));
 
                rte_eth_stats_get(flow->tx_port, &stats);
-               printf("TX port %"PRIu8": tx: %" PRIu64 " err: %" PRIu64 "\n",
+               printf("TX port %"PRIu16": tx: %" PRIu64 " err: %" PRIu64 "\n",
                                flow->tx_port,
                                stats.opackets - tx_stats[i].opackets,
                                stats.oerrors - tx_stats[i].oerrors);
                memcpy(&tx_stats[i], &stats, sizeof(stats));
 
-               //printf("MP = %d\n", rte_mempool_count(conf->app_pktmbuf_pool));
-
 #if APP_COLLECT_STAT
                printf("-------+------------+------------+\n");
                printf("       |  received  |   dropped  |\n");
@@ -223,7 +219,7 @@ app_stat(void)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
        int ret;
 
@@ -252,4 +248,3 @@ MAIN(int argc, char **argv)
 
        return 0;
 }
-