diff options
author | Tom Herbert <therbert@google.com> | 2011-01-09 14:36:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-10 19:05:30 -0500 |
commit | 36909ea43814cba34f7c921e99cba33d770a54e1 (patch) | |
tree | 294b44411dc7939e152aa1002f9f5fe9868751f6 /include/linux/netdevice.h | |
parent | 91b5c98c2e062f982423686c77b8bf31f37fa196 (diff) |
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 <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index de2bfe6da359..be4957cf6511 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2191,11 +2191,15 @@ static inline void netif_addr_unlock_bh(struct net_device *dev) | |||
2191 | extern void ether_setup(struct net_device *dev); | 2191 | extern void ether_setup(struct net_device *dev); |
2192 | 2192 | ||
2193 | /* Support for loadable net-drivers */ | 2193 | /* Support for loadable net-drivers */ |
2194 | extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, | 2194 | extern struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, |
2195 | void (*setup)(struct net_device *), | 2195 | void (*setup)(struct net_device *), |
2196 | unsigned int queue_count); | 2196 | unsigned int txqs, unsigned int rxqs); |
2197 | #define alloc_netdev(sizeof_priv, name, setup) \ | 2197 | #define alloc_netdev(sizeof_priv, name, setup) \ |
2198 | alloc_netdev_mq(sizeof_priv, name, setup, 1) | 2198 | alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1) |
2199 | |||
2200 | #define alloc_netdev_mq(sizeof_priv, name, setup, count) \ | ||
2201 | alloc_netdev_mqs(sizeof_priv, name, setup, count, count) | ||
2202 | |||
2199 | extern int register_netdev(struct net_device *dev); | 2203 | extern int register_netdev(struct net_device *dev); |
2200 | extern void unregister_netdev(struct net_device *dev); | 2204 | extern void unregister_netdev(struct net_device *dev); |
2201 | 2205 | ||