]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/netdevice.h
dynamic_debug: make netdev_dbg() call __netdev_printk()
[mirror_ubuntu-artful-kernel.git] / include / linux / netdevice.h
index 2ed0b6cf11c56de2aeb568bc6d1bd6201d4b75ce..9333a0300c5e6e20cbf9390b80eaf15e5d6894d6 100644 (file)
@@ -1132,7 +1132,7 @@ struct net_device {
        spinlock_t              addr_list_lock;
        struct netdev_hw_addr_list      uc;     /* Unicast mac addresses */
        struct netdev_hw_addr_list      mc;     /* Multicast mac addresses */
-       int                     uc_promisc;
+       bool                    uc_promisc;
        unsigned int            promiscuity;
        unsigned int            allmulti;
 
@@ -1679,9 +1679,12 @@ static inline int skb_gro_header_hard(struct sk_buff *skb, unsigned int hlen)
 static inline void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen,
                                        unsigned int offset)
 {
+       if (!pskb_may_pull(skb, hlen))
+               return NULL;
+
        NAPI_GRO_CB(skb)->frag0 = NULL;
        NAPI_GRO_CB(skb)->frag0_len = 0;
-       return pskb_may_pull(skb, hlen) ? skb->data + offset : NULL;
+       return skb->data + offset;
 }
 
 static inline void *skb_gro_mac_header(struct sk_buff *skb)
@@ -2614,6 +2617,9 @@ static inline const char *netdev_name(const struct net_device *dev)
        return dev->name;
 }
 
+extern int __netdev_printk(const char *level, const struct net_device *dev,
+                       struct va_format *vaf);
+
 extern int netdev_printk(const char *level, const struct net_device *dev,
                         const char *format, ...)
        __attribute__ ((format (printf, 3, 4)));
@@ -2641,8 +2647,7 @@ extern int netdev_info(const struct net_device *dev, const char *format, ...)
 #elif defined(CONFIG_DYNAMIC_DEBUG)
 #define netdev_dbg(__dev, format, args...)                     \
 do {                                                           \
-       dynamic_dev_dbg((__dev)->dev.parent, "%s: " format,     \
-                       netdev_name(__dev), ##args);            \
+       dynamic_netdev_dbg(__dev, format, ##args);              \
 } while (0)
 #else
 #define netdev_dbg(__dev, format, args...)                     \