diff options
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index b683971e500d..b1ff77276bc4 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -575,6 +575,9 @@ struct netdev_queue { | |||
575 | * (/sys/class/net/DEV/Q/trans_timeout) | 575 | * (/sys/class/net/DEV/Q/trans_timeout) |
576 | */ | 576 | */ |
577 | unsigned long trans_timeout; | 577 | unsigned long trans_timeout; |
578 | |||
579 | /* Subordinate device that the queue has been assigned to */ | ||
580 | struct net_device *sb_dev; | ||
578 | /* | 581 | /* |
579 | * write-mostly part | 582 | * write-mostly part |
580 | */ | 583 | */ |
@@ -1991,7 +1994,7 @@ struct net_device { | |||
1991 | #ifdef CONFIG_DCB | 1994 | #ifdef CONFIG_DCB |
1992 | const struct dcbnl_rtnl_ops *dcbnl_ops; | 1995 | const struct dcbnl_rtnl_ops *dcbnl_ops; |
1993 | #endif | 1996 | #endif |
1994 | u8 num_tc; | 1997 | s16 num_tc; |
1995 | struct netdev_tc_txq tc_to_txq[TC_MAX_QUEUE]; | 1998 | struct netdev_tc_txq tc_to_txq[TC_MAX_QUEUE]; |
1996 | u8 prio_tc_map[TC_BITMASK + 1]; | 1999 | u8 prio_tc_map[TC_BITMASK + 1]; |
1997 | 2000 | ||
@@ -2045,6 +2048,17 @@ int netdev_get_num_tc(struct net_device *dev) | |||
2045 | return dev->num_tc; | 2048 | return dev->num_tc; |
2046 | } | 2049 | } |
2047 | 2050 | ||
2051 | void netdev_unbind_sb_channel(struct net_device *dev, | ||
2052 | struct net_device *sb_dev); | ||
2053 | int netdev_bind_sb_channel_queue(struct net_device *dev, | ||
2054 | struct net_device *sb_dev, | ||
2055 | u8 tc, u16 count, u16 offset); | ||
2056 | int netdev_set_sb_channel(struct net_device *dev, u16 channel); | ||
2057 | static inline int netdev_get_sb_channel(struct net_device *dev) | ||
2058 | { | ||
2059 | return max_t(int, -dev->num_tc, 0); | ||
2060 | } | ||
2061 | |||
2048 | static inline | 2062 | static inline |
2049 | struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev, | 2063 | struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev, |
2050 | unsigned int index) | 2064 | unsigned int index) |