X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=kernel%2Finclude%2Flinux%2Fnet.h;h=c00b8d182226e4148c3d2f0a63d353963868d506;hb=52f993b8e89487ec9ee15a7fb4979e0f09a45b27;hp=0b4ac7da583a8b2dff7983b4602cb9a81887ea86;hpb=e09b41010ba33a20a87472ee821fa407a5b8da36;p=kvmfornfv.git diff --git a/kernel/include/linux/net.h b/kernel/include/linux/net.h index 0b4ac7da5..c00b8d182 100644 --- a/kernel/include/linux/net.h +++ b/kernel/include/linux/net.h @@ -245,7 +245,16 @@ 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, pr_fmt(fmt), \ + ##__VA_ARGS__); \ +} while (0) +#elif defined(DEBUG) #define net_dbg_ratelimited(fmt, ...) \ net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) #else