1/* 2 * Copyright (c) 2017 ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. 6 * If you do not find this file, copies can be found by writing to: 7 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10#ifndef __DEBUG_E10K_H__ 11#define __DEBUG_E10K_H__ 12 13//#define DEBUG_E10K_PF 1 14//#define DEBUG_E10K_VF 1 15//#define DEBUG_E10K_QUEUE 1 16 17/***************************************************************** 18 * Debug printer: 19 *****************************************************************/ 20 21 22#if defined(DEBUG_E10K_PF) 23#define DEBUG(x...) do { printf("e10k_pf:%s.%d:%s:%d: ", \ 24 disp_name(), disp_get_core_id(), __func__, __LINE__); \ 25 printf(x);\ 26 } while (0) 27#else 28#define DEBUG(x...) ((void)0) 29#endif 30 31#if defined(DEBUG_E10K_VF) 32#define DEBUG_VF(x...) do { printf("e10k_vf:%s.%d:%s:%d: ", \ 33 disp_name(), disp_get_core_id(), __func__, __LINE__); \ 34 printf(x);\ 35 } while (0) 36 37#else 38#define DEBUG_VF(x...) ((void)0) 39#endif 40 41#if defined(DEBUG_E10K_QUEUE) 42#define DEBUG_QUEUE(x...) do { printf("e10k_queue:%s.%d:%s:%d: ", \ 43 disp_name(), disp_get_core_id(), __func__, __LINE__); \ 44 printf(x);\ 45 } while (0) 46#else 47#define DEBUG_QUEUE(x...) ((void)0) 48#endif 49 50#endif 51