mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 15:01:44 +00:00
[NET]: Hide the queue_mapping field inside netif_subqueue_stopped
Many places get the queue_mapping field from skb to pass it to the netif_subqueue_stopped() which will be 0 in any case. Make the helper that works with sk_buff Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4e3ab47a54
commit
668f895a85
5 changed files with 15 additions and 10 deletions
|
@ -996,7 +996,7 @@ static inline void netif_stop_subqueue(struct net_device *dev, u16 queue_index)
|
|||
*
|
||||
* Check individual transmit queue of a device with multiple transmit queues.
|
||||
*/
|
||||
static inline int netif_subqueue_stopped(const struct net_device *dev,
|
||||
static inline int __netif_subqueue_stopped(const struct net_device *dev,
|
||||
u16 queue_index)
|
||||
{
|
||||
#ifdef CONFIG_NETDEVICES_MULTIQUEUE
|
||||
|
@ -1007,6 +1007,11 @@ static inline int netif_subqueue_stopped(const struct net_device *dev,
|
|||
#endif
|
||||
}
|
||||
|
||||
static inline int netif_subqueue_stopped(const struct net_device *dev,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
return __netif_subqueue_stopped(dev, skb_get_queue_mapping(skb));
|
||||
}
|
||||
|
||||
/**
|
||||
* netif_wake_subqueue - allow sending packets on subqueue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue