diff options
author | 2016-07-06 09:22:35 +0200 | |
---|---|---|
committer | 2016-07-06 16:15:13 +0200 | |
commit | 809f08006d56e7ba4ce190b0a63d44acf62d8044 (patch) | |
tree | d93fbe3244ee0cff16a6af830c7efb15c26e5ef4 /examples/packet_ordering | |
parent | b8ce7c38b99df118002fb460e680fabf16944f6c (diff) |
Imported Upstream version 16.07-rc1
Change-Id: If3f757dc95532706b04053286c6b54492169f1a3
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'examples/packet_ordering')
-rw-r--r-- | examples/packet_ordering/main.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c index 15bb900c..3c88b86e 100644 --- a/examples/packet_ordering/main.c +++ b/examples/packet_ordering/main.c @@ -55,17 +55,6 @@ #define RING_SIZE 16384 -/* uncomment below line to enable debug logs */ -/* #define DEBUG */ - -#ifdef DEBUG -#define LOG_LEVEL RTE_LOG_DEBUG -#define LOG_DEBUG(log_type, fmt, args...) RTE_LOG(DEBUG, log_type, fmt, ##args) -#else -#define LOG_LEVEL RTE_LOG_INFO -#define LOG_DEBUG(log_type, fmt, args...) do {} while (0) -#endif - /* Macros for printing using RTE_LOG */ #define RTE_LOGTYPE_REORDERAPP RTE_LOGTYPE_USER1 @@ -240,7 +229,7 @@ flush_tx_error_callback(struct rte_mbuf **unsent, uint16_t count, /* free the mbufs which failed from transmit */ app_stats.tx.ro_tx_failed_pkts += count; - LOG_DEBUG(REORDERAPP, "%s:Packet loss with tx_burst\n", __func__); + RTE_LOG(DEBUG, REORDERAPP, "%s:Packet loss with tx_burst\n", __func__); pktmbuf_free_bulk(unsent, count); } @@ -421,7 +410,7 @@ rx_thread(struct rte_ring *ring_out) nb_rx_pkts = rte_eth_rx_burst(port_id, 0, pkts, MAX_PKTS_BURST); if (nb_rx_pkts == 0) { - LOG_DEBUG(REORDERAPP, + RTE_LOG(DEBUG, REORDERAPP, "%s():Received zero packets\n", __func__); continue; } @@ -533,7 +522,8 @@ send_thread(struct send_thread_args *args) if (ret == -1 && rte_errno == ERANGE) { /* Too early pkts should be transmitted out directly */ - LOG_DEBUG(REORDERAPP, "%s():Cannot reorder early packet " + RTE_LOG(DEBUG, REORDERAPP, + "%s():Cannot reorder early packet " "direct enqueuing to TX\n", __func__); outp = mbufs[i]->port; if ((portmask & (1 << outp)) == 0) { |