From cb4583fcefe906aee9488851d3ba2bc0dd3a129b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 27 Sep 2010 08:24:49 +0000 Subject: [PATCH] --- yaml --- r: 214779 b: refs/heads/master c: 3171d026291d08c2a4cfe06302ce308b09605c4b h: refs/heads/master i: 214777: 6b7cafcd3d9ae0d995965887cf0797cae8eb2ac6 214775: f5481b7871ef3a8a02358b9beef4ff0d86c32206 v: v3 --- [refs] | 2 +- trunk/include/linux/netdevice.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index dceb4f8ba875..e689532666ea 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 62fe0b40abb3484413800edaef9b087a20059acf +refs/heads/master: 3171d026291d08c2a4cfe06302ce308b09605c4b diff --git a/trunk/include/linux/netdevice.h b/trunk/include/linux/netdevice.h index b15732e22eee..c2bec990bd17 100644 --- a/trunk/include/linux/netdevice.h +++ b/trunk/include/linux/netdevice.h @@ -1699,6 +1699,18 @@ static inline int netif_set_real_num_rx_queues(struct net_device *dev, } #endif +static inline int netif_copy_real_num_queues(struct net_device *to_dev, + const struct net_device *from_dev) +{ + netif_set_real_num_tx_queues(to_dev, from_dev->real_num_tx_queues); +#ifdef CONFIG_RPS + return netif_set_real_num_rx_queues(to_dev, + from_dev->real_num_rx_queues); +#else + return 0; +#endif +} + /* Use this variant when it is known for sure that it * is executing from hardware interrupt context or with hardware interrupts * disabled.