diff options
Diffstat (limited to 'include/linux/net.h')
-rw-r--r-- | include/linux/net.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/net.h b/include/linux/net.h index 72c1e0622ce2..9aa49a05fe38 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -245,7 +245,15 @@ do { \ | |||
245 | net_ratelimited_function(pr_warn, fmt, ##__VA_ARGS__) | 245 | net_ratelimited_function(pr_warn, fmt, ##__VA_ARGS__) |
246 | #define net_info_ratelimited(fmt, ...) \ | 246 | #define net_info_ratelimited(fmt, ...) \ |
247 | net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__) | 247 | net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__) |
248 | #if defined(DEBUG) | 248 | #if defined(CONFIG_DYNAMIC_DEBUG) |
249 | #define net_dbg_ratelimited(fmt, ...) \ | ||
250 | do { \ | ||
251 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | ||
252 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ | ||
253 | net_ratelimit()) \ | ||
254 | __dynamic_pr_debug(&descriptor, fmt, ##__VA_ARGS__); \ | ||
255 | } while (0) | ||
256 | #elif defined(DEBUG) | ||
249 | #define net_dbg_ratelimited(fmt, ...) \ | 257 | #define net_dbg_ratelimited(fmt, ...) \ |
250 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) | 258 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) |
251 | #else | 259 | #else |