aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-03-24 15:13:54 -0400
committerDavid S. Miller <davem@davemloft.net>2010-03-25 15:07:00 -0400
commitdf3345457a7a174dfb5872a070af80d456985038 (patch)
treed8d2d2a86d0b3473783ea2709ff242817e78ed54 /include/linux/netdevice.h
parent2381a55c88453d3f29fe62d235579a05fc20b7b3 (diff)
rps: add CONFIG_RPS
RPS currently depends on SMP and SYSFS Adding a CONFIG_RPS makes sense in case this requirement changes in the future. This patch saves about 1500 bytes of kernel text in case SMP is on but SYSFS is off. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index c96c41e08e37..53c272f2a734 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -531,6 +531,7 @@ struct netdev_queue {
531 unsigned long tx_dropped; 531 unsigned long tx_dropped;
532} ____cacheline_aligned_in_smp; 532} ____cacheline_aligned_in_smp;
533 533
534#ifdef CONFIG_RPS
534/* 535/*
535 * This structure holds an RPS map which can be of variable length. The 536 * This structure holds an RPS map which can be of variable length. The
536 * map is an array of CPUs. 537 * map is an array of CPUs.
@@ -549,6 +550,7 @@ struct netdev_rx_queue {
549 struct netdev_rx_queue *first; 550 struct netdev_rx_queue *first;
550 atomic_t count; 551 atomic_t count;
551} ____cacheline_aligned_in_smp; 552} ____cacheline_aligned_in_smp;
553#endif
552 554
553/* 555/*
554 * This structure defines the management hooks for network devices. 556 * This structure defines the management hooks for network devices.
@@ -897,12 +899,14 @@ struct net_device {
897 899
898 unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ 900 unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */
899 901
902#ifdef CONFIG_RPS
900 struct kset *queues_kset; 903 struct kset *queues_kset;
901 904
902 struct netdev_rx_queue *_rx; 905 struct netdev_rx_queue *_rx;
903 906
904 /* Number of RX queues allocated at alloc_netdev_mq() time */ 907 /* Number of RX queues allocated at alloc_netdev_mq() time */
905 unsigned int num_rx_queues; 908 unsigned int num_rx_queues;
909#endif
906 910
907 struct netdev_queue rx_queue; 911 struct netdev_queue rx_queue;
908 912