Debug only shows filenames/line numbers when T4P4S_DEBUG_LINENO is present
#define __SHORTFILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
#define SHORTEN(str, len) ((strlen(str) <= (len)) ? (str) : ((str) + (strlen(str) - len)))
+ #ifdef T4P4S_DEBUG_LINENO
#define lcore_debug(M, ...) fprintf(stderr, "%11.11s@%4d [CORE" T4LIT(%2d,core) "@" T4LIT(%d,socket) "] " M "", SHORTEN(__SHORTFILENAME__, 13), __LINE__, (int)(rte_lcore_id()), rte_lcore_to_socket_id(rte_lcore_id()), ##__VA_ARGS__)
#define no_core_debug(M, ...) fprintf(stderr, "%11.11s@%4d [NO-CORE ] " M "", SHORTEN(__SHORTFILENAME__, 13), __LINE__, ##__VA_ARGS__)
+ #else
+ // no filename/line number printout
+ #define lcore_debug(M, ...) fprintf(stderr, "CORE" T4LIT(%2d,core) "@" T4LIT(%d,socket) " " M "", (int)(rte_lcore_id()), rte_lcore_to_socket_id(rte_lcore_id()), ##__VA_ARGS__)
+ #define no_core_debug(M, ...) fprintf(stderr, "NO-CORE " M "", ##__VA_ARGS__)
+ #endif
+
#include <pthread.h>
pthread_mutex_t dbg_mutex;
