diff options
Diffstat (limited to 'net/tipc/core.h')
| -rw-r--r-- | net/tipc/core.h | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/net/tipc/core.h b/net/tipc/core.h index 762aac2572be..4638947c2326 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h | |||
| @@ -65,7 +65,7 @@ | |||
| 65 | #define assert(i) BUG_ON(!(i)) | 65 | #define assert(i) BUG_ON(!(i)) |
| 66 | 66 | ||
| 67 | struct tipc_msg; | 67 | struct tipc_msg; |
| 68 | extern struct print_buf *TIPC_CONS, *TIPC_LOG; | 68 | extern struct print_buf *TIPC_NULL, *TIPC_CONS, *TIPC_LOG; |
| 69 | extern struct print_buf *TIPC_TEE(struct print_buf *, struct print_buf *); | 69 | extern struct print_buf *TIPC_TEE(struct print_buf *, struct print_buf *); |
| 70 | void tipc_msg_print(struct print_buf*,struct tipc_msg *,const char*); | 70 | void tipc_msg_print(struct print_buf*,struct tipc_msg *,const char*); |
| 71 | void tipc_printf(struct print_buf *, const char *fmt, ...); | 71 | void tipc_printf(struct print_buf *, const char *fmt, ...); |
| @@ -83,9 +83,9 @@ void tipc_dump(struct print_buf*,const char *fmt, ...); | |||
| 83 | #define warn(fmt, arg...) tipc_printf(TIPC_OUTPUT, KERN_WARNING "TIPC: " fmt, ## arg) | 83 | #define warn(fmt, arg...) tipc_printf(TIPC_OUTPUT, KERN_WARNING "TIPC: " fmt, ## arg) |
| 84 | #define info(fmt, arg...) tipc_printf(TIPC_OUTPUT, KERN_NOTICE "TIPC: " fmt, ## arg) | 84 | #define info(fmt, arg...) tipc_printf(TIPC_OUTPUT, KERN_NOTICE "TIPC: " fmt, ## arg) |
| 85 | 85 | ||
| 86 | #define dbg(fmt, arg...) do {if (DBG_OUTPUT) tipc_printf(DBG_OUTPUT, fmt, ## arg);} while(0) | 86 | #define dbg(fmt, arg...) do {if (DBG_OUTPUT != TIPC_NULL) tipc_printf(DBG_OUTPUT, fmt, ## arg);} while(0) |
| 87 | #define msg_dbg(msg, txt) do {if (DBG_OUTPUT) tipc_msg_print(DBG_OUTPUT, msg, txt);} while(0) | 87 | #define msg_dbg(msg, txt) do {if (DBG_OUTPUT != TIPC_NULL) tipc_msg_print(DBG_OUTPUT, msg, txt);} while(0) |
| 88 | #define dump(fmt, arg...) do {if (DBG_OUTPUT) tipc_dump(DBG_OUTPUT, fmt, ##arg);} while(0) | 88 | #define dump(fmt, arg...) do {if (DBG_OUTPUT != TIPC_NULL) tipc_dump(DBG_OUTPUT, fmt, ##arg);} while(0) |
| 89 | 89 | ||
| 90 | 90 | ||
| 91 | /* | 91 | /* |
| @@ -94,11 +94,11 @@ void tipc_dump(struct print_buf*,const char *fmt, ...); | |||
| 94 | * here, or on a per .c file basis, by redefining these symbols. The following | 94 | * here, or on a per .c file basis, by redefining these symbols. The following |
| 95 | * print buffer options are available: | 95 | * print buffer options are available: |
| 96 | * | 96 | * |
| 97 | * NULL : Output to null print buffer (i.e. print nowhere) | 97 | * TIPC_NULL : null buffer (i.e. print nowhere) |
| 98 | * TIPC_CONS : Output to system console | 98 | * TIPC_CONS : system console |
| 99 | * TIPC_LOG : Output to TIPC log buffer | 99 | * TIPC_LOG : TIPC log buffer |
| 100 | * &buf : Output to user-defined buffer (struct print_buf *) | 100 | * &buf : user-defined buffer (struct print_buf *) |
| 101 | * TIPC_TEE(&buf_a,&buf_b) : Output to two print buffers (eg. TIPC_TEE(TIPC_CONS,TIPC_LOG) ) | 101 | * TIPC_TEE(&buf_a,&buf_b) : list of buffers (eg. TIPC_TEE(TIPC_CONS,TIPC_LOG)) |
| 102 | */ | 102 | */ |
| 103 | 103 | ||
| 104 | #ifndef TIPC_OUTPUT | 104 | #ifndef TIPC_OUTPUT |
| @@ -106,7 +106,7 @@ void tipc_dump(struct print_buf*,const char *fmt, ...); | |||
| 106 | #endif | 106 | #endif |
| 107 | 107 | ||
| 108 | #ifndef DBG_OUTPUT | 108 | #ifndef DBG_OUTPUT |
| 109 | #define DBG_OUTPUT NULL | 109 | #define DBG_OUTPUT TIPC_NULL |
| 110 | #endif | 110 | #endif |
| 111 | 111 | ||
| 112 | #else | 112 | #else |
| @@ -136,7 +136,7 @@ void tipc_dump(struct print_buf*,const char *fmt, ...); | |||
| 136 | #define TIPC_OUTPUT TIPC_CONS | 136 | #define TIPC_OUTPUT TIPC_CONS |
| 137 | 137 | ||
| 138 | #undef DBG_OUTPUT | 138 | #undef DBG_OUTPUT |
| 139 | #define DBG_OUTPUT NULL | 139 | #define DBG_OUTPUT TIPC_NULL |
| 140 | 140 | ||
| 141 | #endif | 141 | #endif |
| 142 | 142 | ||
| @@ -275,11 +275,15 @@ static inline void k_term_timer(struct timer_list *timer) | |||
| 275 | /* | 275 | /* |
| 276 | * TIPC message buffer code | 276 | * TIPC message buffer code |
| 277 | * | 277 | * |
| 278 | * TIPC message buffer headroom leaves room for 14 byte Ethernet header, | 278 | * TIPC message buffer headroom reserves space for a link-level header |
| 279 | * (in case the message is sent off-node), | ||
| 279 | * while ensuring TIPC header is word aligned for quicker access | 280 | * while ensuring TIPC header is word aligned for quicker access |
| 281 | * | ||
| 282 | * The largest header currently supported is 18 bytes, which is used when | ||
| 283 | * the standard 14 byte Ethernet header has 4 added bytes for VLAN info | ||
| 280 | */ | 284 | */ |
| 281 | 285 | ||
| 282 | #define BUF_HEADROOM 16u | 286 | #define BUF_HEADROOM 20u |
| 283 | 287 | ||
| 284 | struct tipc_skb_cb { | 288 | struct tipc_skb_cb { |
| 285 | void *handle; | 289 | void *handle; |
