diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-11 00:00:29 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-11 00:00:29 -0400 |
| commit | e4d35be584be88a3db3fa5635a97c62a2ec5aafe (patch) | |
| tree | fc22a7fb65697306edd71411959ccee6df60c64d /include/linux/net.h | |
| parent | 99d825822eade8d827a1817357cbf3f889a552d6 (diff) | |
| parent | 38b78a5f18584db6fa7441e0f4531b283b0e6725 (diff) | |
| download | lwn-e4d35be584be88a3db3fa5635a97c62a2ec5aafe.tar.gz lwn-e4d35be584be88a3db3fa5635a97c62a2ec5aafe.zip | |
Merge branch 'ovl-fixes' into for-linus
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 49175e4ced11..f840d77c6c31 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -246,7 +246,15 @@ do { \ net_ratelimited_function(pr_warn, fmt, ##__VA_ARGS__) #define net_info_ratelimited(fmt, ...) \ net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__) -#if defined(DEBUG) +#if defined(CONFIG_DYNAMIC_DEBUG) +#define net_dbg_ratelimited(fmt, ...) \ +do { \ + DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ + if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ + net_ratelimit()) \ + __dynamic_pr_debug(&descriptor, fmt, ##__VA_ARGS__); \ +} while (0) +#elif defined(DEBUG) #define net_dbg_ratelimited(fmt, ...) \ net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) #else |
