X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fqos_sched%2Fmain.c;h=ed3cbea3e7d6cf9c86908cd70b6a2d52943ff10d;hb=98a1648109b8dbaa4e6b821c17d1f6bd86d33a9a;hp=ed4879c834d99dbdf5dfe19ca171ca0203bc85f7;hpb=e9d48c0072d36eb6423b45fba4ec49d0def6c36f;p=dpdk.git diff --git a/examples/qos_sched/main.c b/examples/qos_sched/main.c old mode 100755 new mode 100644 index ed4879c834..ed3cbea3e7 --- a/examples/qos_sched/main.c +++ b/examples/qos_sched/main.c @@ -1,13 +1,13 @@ /*- * BSD LICENSE - * + * * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright @@ -17,7 +17,7 @@ * * Neither the name of Intel Corporation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -125,8 +125,9 @@ 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 %hu\n", - i, lcore_id, rx_confs[i]->rx_port); + RTE_LOG(INFO, APP, "flow %u lcoreid %u " + "reading port %"PRIu8"\n", + i, lcore_id, rx_confs[i]->rx_port); } app_rx_thread(rx_confs); @@ -139,8 +140,9 @@ app_main_loop(__attribute__((unused))void *dummy) 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 %hu\n", - i, lcore_id, wt_confs[i]->tx_port); + RTE_LOG(INFO, APP, "flow %u lcoreid %u sched+write " + "port %"PRIu8"\n", + i, lcore_id, wt_confs[i]->tx_port); } app_mixed_thread(wt_confs); @@ -153,8 +155,9 @@ app_main_loop(__attribute__((unused))void *dummy) 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 %hu\n", - i, lcore_id, tx_confs[i]->tx_port); + RTE_LOG(INFO, APP, "flow %u lcoreid %u " + "writing port %"PRIu8"\n", + i, lcore_id, tx_confs[i]->tx_port); } app_tx_thread(tx_confs); @@ -183,18 +186,19 @@ app_stat(void) struct flow_conf *flow = &qos_conf[i]; rte_eth_stats_get(flow->rx_port, &stats); - printf("\nRX port %hu: rx: %"PRIu64 " err: %"PRIu64 " no_mbuf: %"PRIu64 "\n", - flow->rx_port, - stats.ipackets - rx_stats[i].ipackets, - stats.ierrors - rx_stats[i].ierrors, - stats.rx_nombuf - rx_stats[i].rx_nombuf); + printf("\nRX port %"PRIu8": rx: %"PRIu64 " err: %"PRIu64 + " no_mbuf: %"PRIu64 "\n", + flow->rx_port, + stats.ipackets - rx_stats[i].ipackets, + stats.ierrors - rx_stats[i].ierrors, + stats.rx_nombuf - rx_stats[i].rx_nombuf); memcpy(&rx_stats[i], &stats, sizeof(stats)); rte_eth_stats_get(flow->tx_port, &stats); - printf("TX port %hu: tx: %" PRIu64 " err: %" PRIu64 "\n", - flow->tx_port, - stats.opackets - tx_stats[i].opackets, - stats.oerrors - tx_stats[i].oerrors); + printf("TX port %"PRIu8": 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)); @@ -219,7 +223,7 @@ app_stat(void) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { int ret;