summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2010-11-26 08:36:09 +0000
committerDavid S. Miller <davem@davemloft.net>2010-11-28 18:24:14 -0800
commitbf26414510103448ad3dc069c7422462f03ea3d7 (patch)
treeb8930bb2850dbc65f1e1f4e8bc6574f3c956b772 /net/core/dev.c
parent8fa9208e305e24978b897d6ea057604444ce77e1 (diff)
xps: Add CONFIG_XPS
This patch adds XPS_CONFIG option to enable and disable XPS. This is done in the same manner as RPS_CONFIG. This is also fixes build failure in XPS code when SMP is not enabled. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index c852f0038a0..3259d2c323a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1567,6 +1567,9 @@ int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq)
rc = netdev_queue_update_kobjects(dev, dev->real_num_tx_queues,
txq);
+ if (rc)
+ return rc;
+
if (txq < dev->real_num_tx_queues)
qdisc_reset_all_tx_gt(dev, txq);
}
@@ -2148,7 +2151,7 @@ static inline u16 dev_cap_txqueue(struct net_device *dev, u16 queue_index)
static inline int get_xps_queue(struct net_device *dev, struct sk_buff *skb)
{
-#ifdef CONFIG_RPS
+#ifdef CONFIG_XPS
struct xps_dev_maps *dev_maps;
struct xps_map *map;
int queue_index = -1;
@@ -5085,9 +5088,9 @@ void netif_stacked_transfer_operstate(const struct net_device *rootdev,
}
EXPORT_SYMBOL(netif_stacked_transfer_operstate);
+#ifdef CONFIG_RPS
static int netif_alloc_rx_queues(struct net_device *dev)
{
-#ifdef CONFIG_RPS
unsigned int i, count = dev->num_rx_queues;
struct netdev_rx_queue *rx;
@@ -5102,9 +5105,9 @@ static int netif_alloc_rx_queues(struct net_device *dev)
for (i = 0; i < count; i++)
rx[i].dev = dev;
-#endif
return 0;
}
+#endif
static int netif_alloc_netdev_queues(struct net_device *dev)
{