Merge remote-tracking branch 'net-next/master'
[linux] / include / linux / netdevice.h
index 86dbb3e..1fb733f 100644 (file)
@@ -630,6 +630,7 @@ struct netdev_queue {
 } ____cacheline_aligned_in_smp;
 
 extern int sysctl_fb_tunnels_only_for_init_net;
+extern int sysctl_devconf_inherit_init_net;
 
 static inline bool net_has_fallback_tunnels(const struct net *net)
 {
@@ -1152,7 +1153,8 @@ struct dev_ifalias {
  *
  * int (*ndo_fdb_add)(struct ndmsg *ndm, struct nlattr *tb[],
  *                   struct net_device *dev,
- *                   const unsigned char *addr, u16 vid, u16 flags)
+ *                   const unsigned char *addr, u16 vid, u16 flags,
+ *                   struct netlink_ext_ack *extack);
  *     Adds an FDB entry to dev for addr.
  * int (*ndo_fdb_del)(struct ndmsg *ndm, struct nlattr *tb[],
  *                   struct net_device *dev,
@@ -1186,6 +1188,10 @@ struct dev_ifalias {
  *     not implement this, it is assumed that the hw is not able to have
  *     multiple net devices on single physical port.
  *
+ * int (*ndo_get_port_parent_id)(struct net_device *dev,
+ *                              struct netdev_phys_item_id *ppid)
+ *     Called to get the parent ID of the physical port of this device.
+ *
  * void (*ndo_udp_tunnel_add)(struct net_device *dev,
  *                           struct udp_tunnel_info *ti);
  *     Called by UDP tunnel to notify a driver about the UDP port and socket
@@ -1376,7 +1382,8 @@ struct net_device_ops {
                                               struct net_device *dev,
                                               const unsigned char *addr,
                                               u16 vid,
-                                              u16 flags);
+                                              u16 flags,
+                                              struct netlink_ext_ack *extack);
        int                     (*ndo_fdb_del)(struct ndmsg *ndm,
                                               struct nlattr *tb[],
                                               struct net_device *dev,
@@ -1409,6 +1416,8 @@ struct net_device_ops {
                                                      bool new_carrier);
        int                     (*ndo_get_phys_port_id)(struct net_device *dev,
                                                        struct netdev_phys_item_id *ppid);
+       int                     (*ndo_get_port_parent_id)(struct net_device *dev,
+                                                         struct netdev_phys_item_id *ppid);
        int                     (*ndo_get_phys_port_name)(struct net_device *dev,
                                                          char *name, size_t len);
        void                    (*ndo_udp_tunnel_add)(struct net_device *dev,
@@ -3651,6 +3660,9 @@ int dev_get_phys_port_id(struct net_device *dev,
                         struct netdev_phys_item_id *ppid);
 int dev_get_phys_port_name(struct net_device *dev,
                           char *name, size_t len);
+int dev_get_port_parent_id(struct net_device *dev,
+                          struct netdev_phys_item_id *ppid, bool recurse);
+bool netdev_port_same_parent_id(struct net_device *a, struct net_device *b);
 int dev_change_proto_down(struct net_device *dev, bool proto_down);
 struct sk_buff *validate_xmit_skb_list(struct sk_buff *skb, struct net_device *dev, bool *again);
 struct sk_buff *dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
@@ -4668,22 +4680,22 @@ static inline const char *netdev_reg_state(const struct net_device *dev)
        return " (unknown)";
 }
 
-__printf(3, 4)
+__printf(3, 4) __cold
 void netdev_printk(const char *level, const struct net_device *dev,
                   const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_emerg(const struct net_device *dev, const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_alert(const struct net_device *dev, const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_crit(const struct net_device *dev, const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_err(const struct net_device *dev, const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_warn(const struct net_device *dev, const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_notice(const struct net_device *dev, const char *format, ...);
-__printf(2, 3)
+__printf(2, 3) __cold
 void netdev_info(const struct net_device *dev, const char *format, ...);
 
 #define netdev_level_once(level, dev, fmt, ...)                        \