aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index f87bedd51eed..288df6232006 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2083,7 +2083,7 @@ int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq)
2083} 2083}
2084EXPORT_SYMBOL(netif_set_real_num_tx_queues); 2084EXPORT_SYMBOL(netif_set_real_num_tx_queues);
2085 2085
2086#ifdef CONFIG_RPS 2086#ifdef CONFIG_SYSFS
2087/** 2087/**
2088 * netif_set_real_num_rx_queues - set actual number of RX queues used 2088 * netif_set_real_num_rx_queues - set actual number of RX queues used
2089 * @dev: Network device 2089 * @dev: Network device
@@ -5764,7 +5764,7 @@ void netif_stacked_transfer_operstate(const struct net_device *rootdev,
5764} 5764}
5765EXPORT_SYMBOL(netif_stacked_transfer_operstate); 5765EXPORT_SYMBOL(netif_stacked_transfer_operstate);
5766 5766
5767#ifdef CONFIG_RPS 5767#ifdef CONFIG_SYSFS
5768static int netif_alloc_rx_queues(struct net_device *dev) 5768static int netif_alloc_rx_queues(struct net_device *dev)
5769{ 5769{
5770 unsigned int i, count = dev->num_rx_queues; 5770 unsigned int i, count = dev->num_rx_queues;
@@ -6309,7 +6309,7 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
6309 return NULL; 6309 return NULL;
6310 } 6310 }
6311 6311
6312#ifdef CONFIG_RPS 6312#ifdef CONFIG_SYSFS
6313 if (rxqs < 1) { 6313 if (rxqs < 1) {
6314 pr_err("alloc_netdev: Unable to allocate device with zero RX queues\n"); 6314 pr_err("alloc_netdev: Unable to allocate device with zero RX queues\n");
6315 return NULL; 6315 return NULL;
@@ -6365,7 +6365,7 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
6365 if (netif_alloc_netdev_queues(dev)) 6365 if (netif_alloc_netdev_queues(dev))
6366 goto free_all; 6366 goto free_all;
6367 6367
6368#ifdef CONFIG_RPS 6368#ifdef CONFIG_SYSFS
6369 dev->num_rx_queues = rxqs; 6369 dev->num_rx_queues = rxqs;
6370 dev->real_num_rx_queues = rxqs; 6370 dev->real_num_rx_queues = rxqs;
6371 if (netif_alloc_rx_queues(dev)) 6371 if (netif_alloc_rx_queues(dev))
@@ -6385,7 +6385,7 @@ free_all:
6385free_pcpu: 6385free_pcpu:
6386 free_percpu(dev->pcpu_refcnt); 6386 free_percpu(dev->pcpu_refcnt);
6387 netif_free_tx_queues(dev); 6387 netif_free_tx_queues(dev);
6388#ifdef CONFIG_RPS 6388#ifdef CONFIG_SYSFS
6389 kfree(dev->_rx); 6389 kfree(dev->_rx);
6390#endif 6390#endif
6391 6391
@@ -6410,7 +6410,7 @@ void free_netdev(struct net_device *dev)
6410 release_net(dev_net(dev)); 6410 release_net(dev_net(dev));
6411 6411
6412 netif_free_tx_queues(dev); 6412 netif_free_tx_queues(dev);
6413#ifdef CONFIG_RPS 6413#ifdef CONFIG_SYSFS
6414 kfree(dev->_rx); 6414 kfree(dev->_rx);
6415#endif 6415#endif
6416 6416