diff options
Diffstat (limited to 'include/linux/netdevice.h')
| -rw-r--r-- | include/linux/netdevice.h | 61 | 
1 files changed, 27 insertions, 34 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9eda1c31d1f7..c20f190b4c18 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -925,6 +925,7 @@ struct dev_ifalias {  struct devlink;  struct tlsdev_ops; +  /*   * This structure defines the management hooks for network devices.   * The following hooks can be defined; unless noted otherwise, they are @@ -1421,7 +1422,6 @@ struct net_device_ops {  	void			(*ndo_dfwd_del_station)(struct net_device *pdev,  							void *priv); -	int			(*ndo_get_lock_subclass)(struct net_device *dev);  	int			(*ndo_set_tx_maxrate)(struct net_device *dev,  						      int queue_index,  						      u32 maxrate); @@ -1649,6 +1649,8 @@ enum netdev_priv_flags {   * 	@perm_addr:		Permanent hw address   * 	@addr_assign_type:	Hw address assignment type   * 	@addr_len:		Hardware address length + *	@upper_level:		Maximum depth level of upper devices. + *	@lower_level:		Maximum depth level of lower devices.   *	@neigh_priv_len:	Used in neigh_alloc()   * 	@dev_id:		Used to differentiate devices that share   * 				the same link layer address @@ -1758,9 +1760,13 @@ enum netdev_priv_flags {   *	@phydev:	Physical device may attach itself   *			for hardware timestamping   *	@sfp_bus:	attached &struct sfp_bus structure. - * - *	@qdisc_tx_busylock: lockdep class annotating Qdisc->busylock spinlock - *	@qdisc_running_key: lockdep class annotating Qdisc->running seqcount + *	@qdisc_tx_busylock_key: lockdep class annotating Qdisc->busylock +				spinlock + *	@qdisc_running_key:	lockdep class annotating Qdisc->running seqcount + *	@qdisc_xmit_lock_key:	lockdep class annotating + *				netdev_queue->_xmit_lock spinlock + *	@addr_list_lock_key:	lockdep class annotating + *				net_device->addr_list_lock spinlock   *   *	@proto_down:	protocol port state information can be sent to the   *			switch driver and used to set the phys state of the @@ -1875,6 +1881,8 @@ struct net_device {  	unsigned char		perm_addr[MAX_ADDR_LEN];  	unsigned char		addr_assign_type;  	unsigned char		addr_len; +	unsigned char		upper_level; +	unsigned char		lower_level;  	unsigned short		neigh_priv_len;  	unsigned short          dev_id;  	unsigned short          dev_port; @@ -2045,8 +2053,10 @@ struct net_device {  #endif  	struct phy_device	*phydev;  	struct sfp_bus		*sfp_bus; -	struct lock_class_key	*qdisc_tx_busylock; -	struct lock_class_key	*qdisc_running_key; +	struct lock_class_key	qdisc_tx_busylock_key; +	struct lock_class_key	qdisc_running_key; +	struct lock_class_key	qdisc_xmit_lock_key; +	struct lock_class_key	addr_list_lock_key;  	bool			proto_down;  	unsigned		wol_enabled:1;  }; @@ -2124,23 +2134,6 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev,  		f(dev, &dev->_tx[i], arg);  } -#define netdev_lockdep_set_classes(dev)				\ -{								\ -	static struct lock_class_key qdisc_tx_busylock_key;	\ -	static struct lock_class_key qdisc_running_key;		\ -	static struct lock_class_key qdisc_xmit_lock_key;	\ -	static struct lock_class_key dev_addr_list_lock_key;	\ -	unsigned int i;						\ -								\ -	(dev)->qdisc_tx_busylock = &qdisc_tx_busylock_key;	\ -	(dev)->qdisc_running_key = &qdisc_running_key;		\ -	lockdep_set_class(&(dev)->addr_list_lock,		\ -			  &dev_addr_list_lock_key); 		\ -	for (i = 0; i < (dev)->num_tx_queues; i++)		\ -		lockdep_set_class(&(dev)->_tx[i]._xmit_lock,	\ -				  &qdisc_xmit_lock_key);	\ -} -  u16 netdev_pick_tx(struct net_device *dev, struct sk_buff *skb,  		     struct net_device *sb_dev);  struct netdev_queue *netdev_core_pick_tx(struct net_device *dev, @@ -3139,6 +3132,7 @@ static inline void netif_stop_queue(struct net_device *dev)  }  void netif_tx_stop_all_queues(struct net_device *dev); +void netdev_update_lockdep_key(struct net_device *dev);  static inline bool netif_tx_queue_stopped(const struct netdev_queue *dev_queue)  { @@ -4056,16 +4050,6 @@ static inline void netif_addr_lock(struct net_device *dev)  	spin_lock(&dev->addr_list_lock);  } -static inline void netif_addr_lock_nested(struct net_device *dev) -{ -	int subclass = SINGLE_DEPTH_NESTING; - -	if (dev->netdev_ops->ndo_get_lock_subclass) -		subclass = dev->netdev_ops->ndo_get_lock_subclass(dev); - -	spin_lock_nested(&dev->addr_list_lock, subclass); -} -  static inline void netif_addr_lock_bh(struct net_device *dev)  {  	spin_lock_bh(&dev->addr_list_lock); @@ -4329,6 +4313,16 @@ int netdev_master_upper_dev_link(struct net_device *dev,  				 struct netlink_ext_ack *extack);  void netdev_upper_dev_unlink(struct net_device *dev,  			     struct net_device *upper_dev); +int netdev_adjacent_change_prepare(struct net_device *old_dev, +				   struct net_device *new_dev, +				   struct net_device *dev, +				   struct netlink_ext_ack *extack); +void netdev_adjacent_change_commit(struct net_device *old_dev, +				   struct net_device *new_dev, +				   struct net_device *dev); +void netdev_adjacent_change_abort(struct net_device *old_dev, +				  struct net_device *new_dev, +				  struct net_device *dev);  void netdev_adjacent_rename_links(struct net_device *dev, char *oldname);  void *netdev_lower_dev_get_private(struct net_device *dev,  				   struct net_device *lower_dev); @@ -4340,7 +4334,6 @@ void netdev_lower_state_changed(struct net_device *lower_dev,  extern u8 netdev_rss_key[NETDEV_RSS_KEY_LEN] __read_mostly;  void netdev_rss_key_fill(void *buffer, size_t len); -int dev_get_nest_level(struct net_device *dev);  int skb_checksum_help(struct sk_buff *skb);  int skb_crc32c_csum_help(struct sk_buff *skb);  int skb_csum_hwoffload_help(struct sk_buff *skb,  | 
