mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
[CORE] Stack changes to add multiqueue hardware support API
Add the multiqueue hardware device support API to the core network stack. Allow drivers to allocate multiple queues and manage them at the netdev level if they choose to do so. Added a new field to sk_buff, namely queue_mapping, for drivers to know which tx_ring to select based on OS classification of the flow. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
a093bf006e
commit
f25f4e4480
+5
-3
@@ -66,8 +66,9 @@ static void queue_process(struct work_struct *work)
|
||||
|
||||
local_irq_save(flags);
|
||||
netif_tx_lock(dev);
|
||||
if (netif_queue_stopped(dev) ||
|
||||
dev->hard_start_xmit(skb, dev) != NETDEV_TX_OK) {
|
||||
if ((netif_queue_stopped(dev) ||
|
||||
netif_subqueue_stopped(dev, skb->queue_mapping)) ||
|
||||
dev->hard_start_xmit(skb, dev) != NETDEV_TX_OK) {
|
||||
skb_queue_head(&npinfo->txq, skb);
|
||||
netif_tx_unlock(dev);
|
||||
local_irq_restore(flags);
|
||||
@@ -254,7 +255,8 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
|
||||
for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
|
||||
tries > 0; --tries) {
|
||||
if (netif_tx_trylock(dev)) {
|
||||
if (!netif_queue_stopped(dev))
|
||||
if (!netif_queue_stopped(dev) &&
|
||||
!netif_subqueue_stopped(dev, skb->queue_mapping))
|
||||
status = dev->hard_start_xmit(skb, dev);
|
||||
netif_tx_unlock(dev);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user