Commit 14ffbbb8 authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

net_device: Reorder members to fill holes

Some trivial reorders while preserving the RX/TX cache lines
split to fill a couple of holes.
Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e2c65448
...@@ -1313,6 +1313,8 @@ enum netdev_priv_flags { ...@@ -1313,6 +1313,8 @@ enum netdev_priv_flags {
* @base_addr: Device I/O address * @base_addr: Device I/O address
* @irq: Device IRQ number * @irq: Device IRQ number
* *
* @carrier_changes: Stats to monitor carrier on<->off transitions
*
* @state: Generic network queuing layer state, see netdev_state_t * @state: Generic network queuing layer state, see netdev_state_t
* @dev_list: The global list of network devices * @dev_list: The global list of network devices
* @napi_list: List entry, that is used for polling napi devices * @napi_list: List entry, that is used for polling napi devices
...@@ -1346,8 +1348,6 @@ enum netdev_priv_flags { ...@@ -1346,8 +1348,6 @@ enum netdev_priv_flags {
* @tx_dropped: Dropped packets by core network, * @tx_dropped: Dropped packets by core network,
* do not use this in drivers * do not use this in drivers
* *
* @carrier_changes: Stats to monitor carrier on<->off transitions
*
* @wireless_handlers: List of functions to handle Wireless Extensions, * @wireless_handlers: List of functions to handle Wireless Extensions,
* instead of ioctl, * instead of ioctl,
* see <net/iw_handler.h> for details. * see <net/iw_handler.h> for details.
...@@ -1390,14 +1390,14 @@ enum netdev_priv_flags { ...@@ -1390,14 +1390,14 @@ enum netdev_priv_flags {
* @dev_port: Used to differentiate devices that share * @dev_port: Used to differentiate devices that share
* the same function * the same function
* @addr_list_lock: XXX: need comments on this one * @addr_list_lock: XXX: need comments on this one
* @uc: unicast mac addresses
* @mc: multicast mac addresses
* @dev_addrs: list of device hw addresses
* @queues_kset: Group of all Kobjects in the Tx and RX queues
* @uc_promisc: Counter, that indicates, that promiscuous mode * @uc_promisc: Counter, that indicates, that promiscuous mode
* has been enabled due to the need to listen to * has been enabled due to the need to listen to
* additional unicast addresses in a device that * additional unicast addresses in a device that
* does not implement ndo_set_rx_mode() * does not implement ndo_set_rx_mode()
* @uc: unicast mac addresses
* @mc: multicast mac addresses
* @dev_addrs: list of device hw addresses
* @queues_kset: Group of all Kobjects in the Tx and RX queues
* @promiscuity: Number of times, the NIC is told to work in * @promiscuity: Number of times, the NIC is told to work in
* Promiscuous mode, if it becomes 0 the NIC will * Promiscuous mode, if it becomes 0 the NIC will
* exit from working in Promiscuous mode * exit from working in Promiscuous mode
...@@ -1427,6 +1427,12 @@ enum netdev_priv_flags { ...@@ -1427,6 +1427,12 @@ enum netdev_priv_flags {
* @ingress_queue: XXX: need comments on this one * @ingress_queue: XXX: need comments on this one
* @broadcast: hw bcast address * @broadcast: hw bcast address
* *
* @rx_cpu_rmap: CPU reverse-mapping for RX completion interrupts,
* indexed by RX queue number. Assigned by driver.
* This must only be set if the ndo_rx_flow_steer
* operation is defined
* @index_hlist: Device index hash chain
*
* @_tx: Array of TX queues * @_tx: Array of TX queues
* @num_tx_queues: Number of TX queues allocated at alloc_netdev_mq() time * @num_tx_queues: Number of TX queues allocated at alloc_netdev_mq() time
* @real_num_tx_queues: Number of TX queues currently active in device * @real_num_tx_queues: Number of TX queues currently active in device
...@@ -1436,11 +1442,6 @@ enum netdev_priv_flags { ...@@ -1436,11 +1442,6 @@ enum netdev_priv_flags {
* *
* @xps_maps: XXX: need comments on this one * @xps_maps: XXX: need comments on this one
* *
* @rx_cpu_rmap: CPU reverse-mapping for RX completion interrupts,
* indexed by RX queue number. Assigned by driver.
* This must only be set if the ndo_rx_flow_steer
* operation is defined
*
* @trans_start: Time (in jiffies) of last Tx * @trans_start: Time (in jiffies) of last Tx
* @watchdog_timeo: Represents the timeout that is used by * @watchdog_timeo: Represents the timeout that is used by
* the watchdog ( see dev_watchdog() ) * the watchdog ( see dev_watchdog() )
...@@ -1448,7 +1449,6 @@ enum netdev_priv_flags { ...@@ -1448,7 +1449,6 @@ enum netdev_priv_flags {
* *
* @pcpu_refcnt: Number of references to this device * @pcpu_refcnt: Number of references to this device
* @todo_list: Delayed register/unregister * @todo_list: Delayed register/unregister
* @index_hlist: Device index hash chain
* @link_watch_list: XXX: need comments on this one * @link_watch_list: XXX: need comments on this one
* *
* @reg_state: Register/unregister state machine * @reg_state: Register/unregister state machine
...@@ -1515,6 +1515,8 @@ struct net_device { ...@@ -1515,6 +1515,8 @@ struct net_device {
unsigned long base_addr; unsigned long base_addr;
int irq; int irq;
atomic_t carrier_changes;
/* /*
* Some hardware also needs these fields (state,dev_list, * Some hardware also needs these fields (state,dev_list,
* napi_list,unreg_list,close_list) but they are not * napi_list,unreg_list,close_list) but they are not
...@@ -1555,8 +1557,6 @@ struct net_device { ...@@ -1555,8 +1557,6 @@ struct net_device {
atomic_long_t rx_dropped; atomic_long_t rx_dropped;
atomic_long_t tx_dropped; atomic_long_t tx_dropped;
atomic_t carrier_changes;
#ifdef CONFIG_WIRELESS_EXT #ifdef CONFIG_WIRELESS_EXT
const struct iw_handler_def * wireless_handlers; const struct iw_handler_def * wireless_handlers;
struct iw_public_data * wireless_data; struct iw_public_data * wireless_data;
...@@ -1596,6 +1596,8 @@ struct net_device { ...@@ -1596,6 +1596,8 @@ struct net_device {
unsigned short dev_id; unsigned short dev_id;
unsigned short dev_port; unsigned short dev_port;
spinlock_t addr_list_lock; spinlock_t addr_list_lock;
unsigned char name_assign_type;
bool uc_promisc;
struct netdev_hw_addr_list uc; struct netdev_hw_addr_list uc;
struct netdev_hw_addr_list mc; struct netdev_hw_addr_list mc;
struct netdev_hw_addr_list dev_addrs; struct netdev_hw_addr_list dev_addrs;
...@@ -1603,10 +1605,6 @@ struct net_device { ...@@ -1603,10 +1605,6 @@ struct net_device {
#ifdef CONFIG_SYSFS #ifdef CONFIG_SYSFS
struct kset *queues_kset; struct kset *queues_kset;
#endif #endif
unsigned char name_assign_type;
bool uc_promisc;
unsigned int promiscuity; unsigned int promiscuity;
unsigned int allmulti; unsigned int allmulti;
...@@ -1653,7 +1651,10 @@ struct net_device { ...@@ -1653,7 +1651,10 @@ struct net_device {
struct netdev_queue __rcu *ingress_queue; struct netdev_queue __rcu *ingress_queue;
unsigned char broadcast[MAX_ADDR_LEN]; unsigned char broadcast[MAX_ADDR_LEN];
#ifdef CONFIG_RFS_ACCEL
struct cpu_rmap *rx_cpu_rmap;
#endif
struct hlist_node index_hlist;
/* /*
* Cache lines mostly used on transmit path * Cache lines mostly used on transmit path
...@@ -1664,13 +1665,11 @@ struct net_device { ...@@ -1664,13 +1665,11 @@ struct net_device {
struct Qdisc *qdisc; struct Qdisc *qdisc;
unsigned long tx_queue_len; unsigned long tx_queue_len;
spinlock_t tx_global_lock; spinlock_t tx_global_lock;
int watchdog_timeo;
#ifdef CONFIG_XPS #ifdef CONFIG_XPS
struct xps_dev_maps __rcu *xps_maps; struct xps_dev_maps __rcu *xps_maps;
#endif #endif
#ifdef CONFIG_RFS_ACCEL
struct cpu_rmap *rx_cpu_rmap;
#endif
/* These may be needed for future network-power-down code. */ /* These may be needed for future network-power-down code. */
...@@ -1680,13 +1679,11 @@ struct net_device { ...@@ -1680,13 +1679,11 @@ struct net_device {
*/ */
unsigned long trans_start; unsigned long trans_start;
int watchdog_timeo;
struct timer_list watchdog_timer; struct timer_list watchdog_timer;
int __percpu *pcpu_refcnt; int __percpu *pcpu_refcnt;
struct list_head todo_list; struct list_head todo_list;
struct hlist_node index_hlist;
struct list_head link_watch_list; struct list_head link_watch_list;
enum { NETREG_UNINITIALIZED=0, enum { NETREG_UNINITIALIZED=0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment