diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sysctl.h | 1 | ||||
-rw-r--r-- | include/net/sock.h | 12 |
2 files changed, 6 insertions, 7 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index c9ccb550206f..df2d9ed20a4e 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -290,6 +290,7 @@ enum | |||
290 | NET_CORE_BUDGET=19, | 290 | NET_CORE_BUDGET=19, |
291 | NET_CORE_AEVENT_ETIME=20, | 291 | NET_CORE_AEVENT_ETIME=20, |
292 | NET_CORE_AEVENT_RSEQTH=21, | 292 | NET_CORE_AEVENT_RSEQTH=21, |
293 | NET_CORE_WARNINGS=22, | ||
293 | }; | 294 | }; |
294 | 295 | ||
295 | /* /proc/sys/net/ethernet */ | 296 | /* /proc/sys/net/ethernet */ |
diff --git a/include/net/sock.h b/include/net/sock.h index d093e49fdc85..51246579592e 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1334,14 +1334,12 @@ extern int sock_get_timestampns(struct sock *, struct timespec __user *); | |||
1334 | /* | 1334 | /* |
1335 | * Enable debug/info messages | 1335 | * Enable debug/info messages |
1336 | */ | 1336 | */ |
1337 | extern int net_msg_warn; | ||
1338 | #define NETDEBUG(fmt, args...) \ | ||
1339 | do { if (net_msg_warn) printk(fmt,##args); } while (0) | ||
1337 | 1340 | ||
1338 | #ifdef CONFIG_NETDEBUG | 1341 | #define LIMIT_NETDEBUG(fmt, args...) \ |
1339 | #define NETDEBUG(fmt, args...) printk(fmt,##args) | 1342 | do { if (net_msg_warn && net_ratelimit()) printk(fmt,##args); } while(0) |
1340 | #define LIMIT_NETDEBUG(fmt, args...) do { if (net_ratelimit()) printk(fmt,##args); } while(0) | ||
1341 | #else | ||
1342 | #define NETDEBUG(fmt, args...) do { } while (0) | ||
1343 | #define LIMIT_NETDEBUG(fmt, args...) do { } while(0) | ||
1344 | #endif | ||
1345 | 1343 | ||
1346 | /* | 1344 | /* |
1347 | * Macros for sleeping on a socket. Use them like this: | 1345 | * Macros for sleeping on a socket. Use them like this: |