aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2013-01-10 03:57:02 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-11 01:47:03 -0500
commit537c00de1c9ba9876b91d869e84caceefe2b8bf9 (patch)
treef808a5221aec07b3a0a01513e5de9d5cdc2a6b54 /include
parent416186fbf8c5b4e4465a10c6ac7a45b6c47144b2 (diff)
net: Add functions netif_reset_xps_queue and netif_set_xps_queue
This patch adds two functions, netif_reset_xps_queue and netif_set_xps_queue. The main idea behind these two functions is to provide a mechanism through which drivers can update their defaults in regards to XPS. Currently no such mechanism exists and as a result we cannot use XPS for things such as ATR which would require a basic configuration to start in which the Tx queues are mapped to CPUs via a 1:1 mapping. With this change I am making it possible for drivers such as ixgbe to be able to use the XPS feature by controlling the default configuration. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 608c3ac4d045..59fe9da4e315 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2103,6 +2103,19 @@ static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index)
2103 __netif_schedule(txq->qdisc); 2103 __netif_schedule(txq->qdisc);
2104} 2104}
2105 2105
2106#ifdef CONFIG_XPS
2107extern void netif_reset_xps_queue(struct net_device *dev, u16 index);
2108extern int netif_set_xps_queue(struct net_device *dev, struct cpumask *mask,
2109 u16 index);
2110#else
2111static inline int netif_set_xps_queue(struct net_device *dev,
2112 struct cpumask *mask,
2113 u16 index)
2114{
2115 return 0;
2116}
2117#endif
2118
2106/* 2119/*
2107 * Returns a Tx hash for the given packet when dev->real_num_tx_queues is used 2120 * Returns a Tx hash for the given packet when dev->real_num_tx_queues is used
2108 * as a distribution range limit for the returned value. 2121 * as a distribution range limit for the returned value.