2 * QEMU VMWARE VMXNET* paravirtual NICs - debugging facilities
4 * Copyright (c) 2012 Ravello Systems LTD (http://ravellosystems.com)
6 * Developed by Daynix Computing LTD (http://www.daynix.com)
9 * Dmitry Fleytman <dmitry@daynix.com>
10 * Tamir Shomer <tamirs@daynix.com>
11 * Yan Vugenfirer <yan@daynix.com>
13 * This work is licensed under the terms of the GNU GPL, version 2 or later.
14 * See the COPYING file in the top-level directory.
18 #ifndef _QEMU_VMXNET_DEBUG_H
19 #define _QEMU_VMXNET_DEBUG_H
21 #define VMXNET_DEVICE_NAME "vmxnet3"
23 /* #define VMXNET_DEBUG_CB */
24 #define VMXNET_DEBUG_WARNINGS
25 #define VMXNET_DEBUG_ERRORS
26 /* #define VMXNET_DEBUG_INTERRUPTS */
27 /* #define VMXNET_DEBUG_CONFIG */
28 /* #define VMXNET_DEBUG_RINGS */
29 /* #define VMXNET_DEBUG_PACKETS */
30 /* #define VMXNET_DEBUG_SHMEM_ACCESS */
32 #ifdef VMXNET_DEBUG_SHMEM_ACCESS
33 #define VMW_SHPRN(fmt, ...) \
35 printf("[%s][SH][%s]: " fmt "\n", VMXNET_DEVICE_NAME, __func__, \
39 #define VMW_SHPRN(fmt, ...) do {} while (0)
42 #ifdef VMXNET_DEBUG_CB
43 #define VMW_CBPRN(fmt, ...) \
45 printf("[%s][CB][%s]: " fmt "\n", VMXNET_DEVICE_NAME, __func__, \
49 #define VMW_CBPRN(fmt, ...) do {} while (0)
52 #ifdef VMXNET_DEBUG_PACKETS
53 #define VMW_PKPRN(fmt, ...) \
55 printf("[%s][PK][%s]: " fmt "\n", VMXNET_DEVICE_NAME, __func__, \
59 #define VMW_PKPRN(fmt, ...) do {} while (0)
62 #ifdef VMXNET_DEBUG_WARNINGS
63 #define VMW_WRPRN(fmt, ...) \
65 printf("[%s][WR][%s]: " fmt "\n", VMXNET_DEVICE_NAME, __func__, \
69 #define VMW_WRPRN(fmt, ...) do {} while (0)
72 #ifdef VMXNET_DEBUG_ERRORS
73 #define VMW_ERPRN(fmt, ...) \
75 printf("[%s][ER][%s]: " fmt "\n", VMXNET_DEVICE_NAME, __func__, \
79 #define VMW_ERPRN(fmt, ...) do {} while (0)
82 #ifdef VMXNET_DEBUG_INTERRUPTS
83 #define VMW_IRPRN(fmt, ...) \
85 printf("[%s][IR][%s]: " fmt "\n", VMXNET_DEVICE_NAME, __func__, \
89 #define VMW_IRPRN(fmt, ...) do {} while (0)
92 #ifdef VMXNET_DEBUG_CONFIG
93 #define VMW_CFPRN(fmt, ...) \
95 printf("[%s][CF][%s]: " fmt "\n", VMXNET_DEVICE_NAME, __func__, \
99 #define VMW_CFPRN(fmt, ...) do {} while (0)
102 #ifdef VMXNET_DEBUG_RINGS
103 #define VMW_RIPRN(fmt, ...) \
105 printf("[%s][RI][%s]: " fmt "\n", VMXNET_DEVICE_NAME, __func__, \
109 #define VMW_RIPRN(fmt, ...) do {} while (0)
112 #define VMXNET_MF "%02X:%02X:%02X:%02X:%02X:%02X"
113 #define VMXNET_MA(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
115 #endif /* _QEMU_VMXNET3_DEBUG_H */