From: Luis R. Rodriguez Date: Mon, 3 Dec 2012 19:38:20 +0000 (-0800) Subject: compat: backport alloc_etherdev_mqs() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2786ec9e2ec5d5ee6c6e6ce23feb82228fbc1568;p=openwrt%2Fstaging%2Fblogic.git compat: backport alloc_etherdev_mqs() This backports support for alloc_netdev_mqs(). The routine adds support for specifying different TX queues and RX queues. In older kernels we were only able to request the equal amount of queues for both TX and RX. To backport this simply ignore the RX queue count. The commit that added alloc_netdev_mq() with equal amount of TX and RX queues was added via f25f4e44 onto kernel v2.6.23. mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 36909ea4 v2.6.38-rc1~50^2~46 mcgrof@frijol ~/linux-next (git::master)$ git describe --contains f25f4e44 v2.6.23-rc1~1109^2~115 commit 36909ea43814cba34f7c921e99cba33d770a54e1 Author: Tom Herbert Date: Sun Jan 9 19:36:31 2011 +0000 net: Add alloc_netdev_mqs function Added alloc_netdev_mqs function which allows the number of transmit and receive queues to be specified independenty. alloc_netdev_mq was changed to a macro to call the new function. Also added alloc_etherdev_mqs with same purpose. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller commit f25f4e44808f0f6c9875d94ef1c41ef86c288eb2 Author: Peter P Waskiewicz Jr Date: Fri Jul 6 13:36:20 2007 -0700 [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 Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller Signed-off-by: Luis R. Rodriguez --- diff --git a/include/linux/compat-2.6.38.h b/include/linux/compat-2.6.38.h index 676d55407881..b397c74db4a9 100644 --- a/include/linux/compat-2.6.38.h +++ b/include/linux/compat-2.6.38.h @@ -10,6 +10,8 @@ #include #include +#define alloc_etherdev_mqs(sizeof_priv, tx_q, rx_q) alloc_etherdev_mq(sizeof_priv, tx_q) + /* MSI-X entry's format */ #define PCI_MSIX_ENTRY_SIZE 16 #define PCI_MSIX_ENTRY_LOWER_ADDR 0