diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2014-02-16 15:55:21 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-17 00:36:34 -0500 |
commit | b9507bdaf40e91fea2b1c0c1ee7dc627c8ee6fd6 (patch) | |
tree | 277be7b469483258b41497d1e47901cf745a1e62 /net | |
parent | 99932d4fc03a13bb3e94938fe25458fabc8f2fc3 (diff) | |
download | op-kernel-dev-b9507bdaf40e91fea2b1c0c1ee7dc627c8ee6fd6.zip op-kernel-dev-b9507bdaf40e91fea2b1c0c1ee7dc627c8ee6fd6.tar.gz |
netdevice: move netdev_cap_txqueue for shared usage to header
In order to allow users to invoke netdev_cap_txqueue, it needs to
be moved into netdevice.h header file. While at it, also add kernel
doc header to document the API.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/flow_dissector.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index 75fe83f..e29e810 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -323,17 +323,6 @@ u32 __skb_get_poff(const struct sk_buff *skb) return poff; } -static inline u16 dev_cap_txqueue(struct net_device *dev, u16 queue_index) -{ - if (unlikely(queue_index >= dev->real_num_tx_queues)) { - net_warn_ratelimited("%s selects TX queue %d, but real number of TX queues is %d\n", - dev->name, queue_index, - dev->real_num_tx_queues); - return 0; - } - return queue_index; -} - static inline int get_xps_queue(struct net_device *dev, struct sk_buff *skb) { #ifdef CONFIG_XPS @@ -408,7 +397,7 @@ struct netdev_queue *netdev_pick_tx(struct net_device *dev, queue_index = __netdev_pick_tx(dev, skb); if (!accel_priv) - queue_index = dev_cap_txqueue(dev, queue_index); + queue_index = netdev_cap_txqueue(dev, queue_index); } skb_set_queue_mapping(skb, queue_index); |