]> Pileus Git - ~andy/linux/blobdiff - include/linux/netdevice.h
net: add dev_uc_sync_multiple() and dev_mc_sync_multiple() api
[~andy/linux] / include / linux / netdevice.h
index 9fc1ab0c89140824c845146b3040a21e64c9aa58..623b57b52195906cf7a4394161c98ab8ff459d4b 100644 (file)
@@ -144,8 +144,6 @@ static inline bool dev_xmit_complete(int rc)
 # else
 #  define LL_MAX_HEADER 96
 # endif
-#elif IS_ENABLED(CONFIG_TR)
-# define LL_MAX_HEADER 48
 #else
 # define LL_MAX_HEADER 32
 #endif
@@ -210,9 +208,10 @@ struct netdev_hw_addr {
 #define NETDEV_HW_ADDR_T_SLAVE         3
 #define NETDEV_HW_ADDR_T_UNICAST       4
 #define NETDEV_HW_ADDR_T_MULTICAST     5
-       bool                    synced;
        bool                    global_use;
+       int                     sync_cnt;
        int                     refcount;
+       int                     synced;
        struct rcu_head         rcu_head;
 };
 
@@ -895,7 +894,7 @@ struct netdev_fcoe_hbainfo {
  *
  * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh)
  * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq,
- *                          struct net_device *dev)
+ *                          struct net_device *dev, u32 filter_mask)
  *
  * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier);
  *     Called to change device carrier. Soft-devices (like dummy, team, etc)
@@ -1073,6 +1072,8 @@ struct net_device {
        struct list_head        dev_list;
        struct list_head        napi_list;
        struct list_head        unreg_list;
+       struct list_head        upper_dev_list; /* List of upper devices */
+
 
        /* currently active device features */
        netdev_features_t       features;
@@ -1145,6 +1146,13 @@ 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 */
+       struct netdev_hw_addr_list      dev_addrs; /* list of device
+                                                   * hw addresses
+                                                   */
+#ifdef CONFIG_SYSFS
+       struct kset             *queues_kset;
+#endif
+
        bool                    uc_promisc;
        unsigned int            promiscuity;
        unsigned int            allmulti;
@@ -1177,21 +1185,11 @@ struct net_device {
                                                 * avoid dirtying this cache line.
                                                 */
 
-       struct list_head        upper_dev_list; /* List of upper devices */
-
        /* Interface address info used in eth_type_trans() */
        unsigned char           *dev_addr;      /* hw address, (before bcast
                                                   because most packets are
                                                   unicast) */
 
-       struct netdev_hw_addr_list      dev_addrs; /* list of device
-                                                     hw addresses */
-
-       unsigned char           broadcast[MAX_ADDR_LEN];        /* hw bcast add */
-
-#ifdef CONFIG_SYSFS
-       struct kset             *queues_kset;
-#endif
 
 #ifdef CONFIG_RPS
        struct netdev_rx_queue  *_rx;
@@ -1202,18 +1200,14 @@ struct net_device {
        /* Number of RX queues currently active in device */
        unsigned int            real_num_rx_queues;
 
-#ifdef CONFIG_RFS_ACCEL
-       /* CPU reverse-mapping for RX completion interrupts, indexed
-        * by RX queue number.  Assigned by driver.  This must only be
-        * set if the ndo_rx_flow_steer operation is defined. */
-       struct cpu_rmap         *rx_cpu_rmap;
-#endif
 #endif
 
        rx_handler_func_t __rcu *rx_handler;
        void __rcu              *rx_handler_data;
 
        struct netdev_queue __rcu *ingress_queue;
+       unsigned char           broadcast[MAX_ADDR_LEN];        /* hw bcast add */
+
 
 /*
  * Cache lines mostly used on transmit path
@@ -1235,6 +1229,12 @@ struct net_device {
 #ifdef CONFIG_XPS
        struct xps_dev_maps __rcu *xps_maps;
 #endif
+#ifdef CONFIG_RFS_ACCEL
+       /* CPU reverse-mapping for RX completion interrupts, indexed
+        * by RX queue number.  Assigned by driver.  This must only be
+        * set if the ndo_rx_flow_steer operation is defined. */
+       struct cpu_rmap         *rx_cpu_rmap;
+#endif
 
        /* These may be needed for future network-power-down code. */
 
@@ -1692,7 +1692,6 @@ extern int                netdev_refcnt_read(const struct net_device *dev);
 extern void            free_netdev(struct net_device *dev);
 extern void            synchronize_net(void);
 extern int             init_dummy_netdev(struct net_device *dev);
-extern void            netdev_resync_ops(struct net_device *dev);
 
 extern struct net_device       *dev_get_by_index(struct net *net, int ifindex);
 extern struct net_device       *__dev_get_by_index(struct net *net, int ifindex);
@@ -2629,6 +2628,7 @@ extern int dev_uc_add(struct net_device *dev, const unsigned char *addr);
 extern int dev_uc_add_excl(struct net_device *dev, const unsigned char *addr);
 extern int dev_uc_del(struct net_device *dev, const unsigned char *addr);
 extern int dev_uc_sync(struct net_device *to, struct net_device *from);
+extern int dev_uc_sync_multiple(struct net_device *to, struct net_device *from);
 extern void dev_uc_unsync(struct net_device *to, struct net_device *from);
 extern void dev_uc_flush(struct net_device *dev);
 extern void dev_uc_init(struct net_device *dev);
@@ -2640,6 +2640,7 @@ extern int dev_mc_add_excl(struct net_device *dev, const unsigned char *addr);
 extern int dev_mc_del(struct net_device *dev, const unsigned char *addr);
 extern int dev_mc_del_global(struct net_device *dev, const unsigned char *addr);
 extern int dev_mc_sync(struct net_device *to, struct net_device *from);
+extern int dev_mc_sync_multiple(struct net_device *to, struct net_device *from);
 extern void dev_mc_unsync(struct net_device *to, struct net_device *from);
 extern void dev_mc_flush(struct net_device *dev);
 extern void dev_mc_init(struct net_device *dev);