diff options
Diffstat (limited to 'src/compat.h')
-rw-r--r-- | src/compat.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compat.h b/src/compat.h index 28c1aca..42fa7fe 100644 --- a/src/compat.h +++ b/src/compat.h @@ -155,4 +155,14 @@ static inline struct net_device *netdev_pub(void *dev) return (struct net_device *)((char *)dev - ALIGN(sizeof(struct net_device), NETDEV_ALIGN)); } +#if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG) +#define net_dbg_skb_ratelimited(fmt, skb, ...) do { \ + struct endpoint __endpoint; \ + socket_endpoint_from_skb(&__endpoint, skb); \ + net_dbg_ratelimited(fmt, &__endpoint.addr_storage, ##__VA_ARGS__); \ +} while(0) +#else +#define net_dbg_skb_ratelimited(fmt, skb, ...) +#endif + #endif |