diff options
author | Thomas Graf <tgraf@suug.ch> | 2015-04-10 09:52:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-13 13:15:14 -0400 |
commit | 14ffbbb8dab670393a8718adb7b0a385b23fa7bc (patch) | |
tree | 1913ecc6850e00015fbc5f511bb617d58fd44c3b /include/linux/netdevice.h | |
parent | e2c6544829f8df396a0a233c86d5ee78f405ffef (diff) |
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: Thomas Graf <tgraf@suug.ch>
Acked-by: Eric Dumazet <edumazet@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 | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 733d24f16cf8..b5679aed660b 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1313,6 +1313,8 @@ enum netdev_priv_flags { | |||
1313 | * @base_addr: Device I/O address | 1313 | * @base_addr: Device I/O address |
1314 | * @irq: Device IRQ number | 1314 | * @irq: Device IRQ number |
1315 | * | 1315 | * |
1316 | * @carrier_changes: Stats to monitor carrier on<->off transitions | ||
1317 | * | ||
1316 | * @state: Generic network queuing layer state, see netdev_state_t | 1318 | * @state: Generic network queuing layer state, see netdev_state_t |
1317 | * @dev_list: The global list of network devices | 1319 | * @dev_list: The global list of network devices |
1318 | * @napi_list: List entry, that is used for polling napi devices | 1320 | * @napi_list: List entry, that is used for polling napi devices |
@@ -1346,8 +1348,6 @@ enum netdev_priv_flags { | |||
1346 | * @tx_dropped: Dropped packets by core network, | 1348 | * @tx_dropped: Dropped packets by core network, |
1347 | * do not use this in drivers | 1349 | * do not use this in drivers |
1348 | * | 1350 | * |
1349 | * @carrier_changes: Stats to monitor carrier on<->off transitions | ||
1350 | * | ||
1351 | * @wireless_handlers: List of functions to handle Wireless Extensions, | 1351 | * @wireless_handlers: List of functions to handle Wireless Extensions, |
1352 | * instead of ioctl, | 1352 | * instead of ioctl, |
1353 | * see <net/iw_handler.h> for details. | 1353 | * see <net/iw_handler.h> for details. |
@@ -1390,14 +1390,14 @@ enum netdev_priv_flags { | |||
1390 | * @dev_port: Used to differentiate devices that share | 1390 | * @dev_port: Used to differentiate devices that share |
1391 | * the same function | 1391 | * the same function |
1392 | * @addr_list_lock: XXX: need comments on this one | 1392 | * @addr_list_lock: XXX: need comments on this one |
1393 | * @uc: unicast mac addresses | ||
1394 | * @mc: multicast mac addresses | ||
1395 | * @dev_addrs: list of device hw addresses | ||
1396 | * @queues_kset: Group of all Kobjects in the Tx and RX queues | ||
1397 | * @uc_promisc: Counter, that indicates, that promiscuous mode | 1393 | * @uc_promisc: Counter, that indicates, that promiscuous mode |
1398 | * has been enabled due to the need to listen to | 1394 | * has been enabled due to the need to listen to |
1399 | * additional unicast addresses in a device that | 1395 | * additional unicast addresses in a device that |
1400 | * does not implement ndo_set_rx_mode() | 1396 | * does not implement ndo_set_rx_mode() |
1397 | * @uc: unicast mac addresses | ||
1398 | * @mc: multicast mac addresses | ||
1399 | * @dev_addrs: list of device hw addresses | ||
1400 | * @queues_kset: Group of all Kobjects in the Tx and RX queues | ||
1401 | * @promiscuity: Number of times, the NIC is told to work in | 1401 | * @promiscuity: Number of times, the NIC is told to work in |
1402 | * Promiscuous mode, if it becomes 0 the NIC will | 1402 | * Promiscuous mode, if it becomes 0 the NIC will |
1403 | * exit from working in Promiscuous mode | 1403 | * exit from working in Promiscuous mode |
@@ -1427,6 +1427,12 @@ enum netdev_priv_flags { | |||
1427 | * @ingress_queue: XXX: need comments on this one | 1427 | * @ingress_queue: XXX: need comments on this one |
1428 | * @broadcast: hw bcast address | 1428 | * @broadcast: hw bcast address |
1429 | * | 1429 | * |
1430 | * @rx_cpu_rmap: CPU reverse-mapping for RX completion interrupts, | ||
1431 | * indexed by RX queue number. Assigned by driver. | ||
1432 | * This must only be set if the ndo_rx_flow_steer | ||
1433 | * operation is defined | ||
1434 | * @index_hlist: Device index hash chain | ||
1435 | * | ||
1430 | * @_tx: Array of TX queues | 1436 | * @_tx: Array of TX queues |
1431 | * @num_tx_queues: Number of TX queues allocated at alloc_netdev_mq() time | 1437 | * @num_tx_queues: Number of TX queues allocated at alloc_netdev_mq() time |
1432 | * @real_num_tx_queues: Number of TX queues currently active in device | 1438 | * @real_num_tx_queues: Number of TX queues currently active in device |
@@ -1436,11 +1442,6 @@ enum netdev_priv_flags { | |||
1436 | * | 1442 | * |
1437 | * @xps_maps: XXX: need comments on this one | 1443 | * @xps_maps: XXX: need comments on this one |
1438 | * | 1444 | * |
1439 | * @rx_cpu_rmap: CPU reverse-mapping for RX completion interrupts, | ||
1440 | * indexed by RX queue number. Assigned by driver. | ||
1441 | * This must only be set if the ndo_rx_flow_steer | ||
1442 | * operation is defined | ||
1443 | * | ||
1444 | * @trans_start: Time (in jiffies) of last Tx | 1445 | * @trans_start: Time (in jiffies) of last Tx |
1445 | * @watchdog_timeo: Represents the timeout that is used by | 1446 | * @watchdog_timeo: Represents the timeout that is used by |
1446 | * the watchdog ( see dev_watchdog() ) | 1447 | * the watchdog ( see dev_watchdog() ) |
@@ -1448,7 +1449,6 @@ enum netdev_priv_flags { | |||
1448 | * | 1449 | * |
1449 | * @pcpu_refcnt: Number of references to this device | 1450 | * @pcpu_refcnt: Number of references to this device |
1450 | * @todo_list: Delayed register/unregister | 1451 | * @todo_list: Delayed register/unregister |
1451 | * @index_hlist: Device index hash chain | ||
1452 | * @link_watch_list: XXX: need comments on this one | 1452 | * @link_watch_list: XXX: need comments on this one |
1453 | * | 1453 | * |
1454 | * @reg_state: Register/unregister state machine | 1454 | * @reg_state: Register/unregister state machine |
@@ -1515,6 +1515,8 @@ struct net_device { | |||
1515 | unsigned long base_addr; | 1515 | unsigned long base_addr; |
1516 | int irq; | 1516 | int irq; |
1517 | 1517 | ||
1518 | atomic_t carrier_changes; | ||
1519 | |||
1518 | /* | 1520 | /* |
1519 | * Some hardware also needs these fields (state,dev_list, | 1521 | * Some hardware also needs these fields (state,dev_list, |
1520 | * napi_list,unreg_list,close_list) but they are not | 1522 | * napi_list,unreg_list,close_list) but they are not |
@@ -1555,8 +1557,6 @@ struct net_device { | |||
1555 | atomic_long_t rx_dropped; | 1557 | atomic_long_t rx_dropped; |
1556 | atomic_long_t tx_dropped; | 1558 | atomic_long_t tx_dropped; |
1557 | 1559 | ||
1558 | atomic_t carrier_changes; | ||
1559 | |||
1560 | #ifdef CONFIG_WIRELESS_EXT | 1560 | #ifdef CONFIG_WIRELESS_EXT |
1561 | const struct iw_handler_def * wireless_handlers; | 1561 | const struct iw_handler_def * wireless_handlers; |
1562 | struct iw_public_data * wireless_data; | 1562 | struct iw_public_data * wireless_data; |
@@ -1596,6 +1596,8 @@ struct net_device { | |||
1596 | unsigned short dev_id; | 1596 | unsigned short dev_id; |
1597 | unsigned short dev_port; | 1597 | unsigned short dev_port; |
1598 | spinlock_t addr_list_lock; | 1598 | spinlock_t addr_list_lock; |
1599 | unsigned char name_assign_type; | ||
1600 | bool uc_promisc; | ||
1599 | struct netdev_hw_addr_list uc; | 1601 | struct netdev_hw_addr_list uc; |
1600 | struct netdev_hw_addr_list mc; | 1602 | struct netdev_hw_addr_list mc; |
1601 | struct netdev_hw_addr_list dev_addrs; | 1603 | struct netdev_hw_addr_list dev_addrs; |
@@ -1603,10 +1605,6 @@ struct net_device { | |||
1603 | #ifdef CONFIG_SYSFS | 1605 | #ifdef CONFIG_SYSFS |
1604 | struct kset *queues_kset; | 1606 | struct kset *queues_kset; |
1605 | #endif | 1607 | #endif |
1606 | |||
1607 | unsigned char name_assign_type; | ||
1608 | |||
1609 | bool uc_promisc; | ||
1610 | unsigned int promiscuity; | 1608 | unsigned int promiscuity; |
1611 | unsigned int allmulti; | 1609 | unsigned int allmulti; |
1612 | 1610 | ||
@@ -1653,7 +1651,10 @@ struct net_device { | |||
1653 | 1651 | ||
1654 | struct netdev_queue __rcu *ingress_queue; | 1652 | struct netdev_queue __rcu *ingress_queue; |
1655 | unsigned char broadcast[MAX_ADDR_LEN]; | 1653 | unsigned char broadcast[MAX_ADDR_LEN]; |
1656 | 1654 | #ifdef CONFIG_RFS_ACCEL | |
1655 | struct cpu_rmap *rx_cpu_rmap; | ||
1656 | #endif | ||
1657 | struct hlist_node index_hlist; | ||
1657 | 1658 | ||
1658 | /* | 1659 | /* |
1659 | * Cache lines mostly used on transmit path | 1660 | * Cache lines mostly used on transmit path |
@@ -1664,13 +1665,11 @@ struct net_device { | |||
1664 | struct Qdisc *qdisc; | 1665 | struct Qdisc *qdisc; |
1665 | unsigned long tx_queue_len; | 1666 | unsigned long tx_queue_len; |
1666 | spinlock_t tx_global_lock; | 1667 | spinlock_t tx_global_lock; |
1668 | int watchdog_timeo; | ||
1667 | 1669 | ||
1668 | #ifdef CONFIG_XPS | 1670 | #ifdef CONFIG_XPS |
1669 | struct xps_dev_maps __rcu *xps_maps; | 1671 | struct xps_dev_maps __rcu *xps_maps; |
1670 | #endif | 1672 | #endif |
1671 | #ifdef CONFIG_RFS_ACCEL | ||
1672 | struct cpu_rmap *rx_cpu_rmap; | ||
1673 | #endif | ||
1674 | 1673 | ||
1675 | /* These may be needed for future network-power-down code. */ | 1674 | /* These may be needed for future network-power-down code. */ |
1676 | 1675 | ||
@@ -1680,13 +1679,11 @@ struct net_device { | |||
1680 | */ | 1679 | */ |
1681 | unsigned long trans_start; | 1680 | unsigned long trans_start; |
1682 | 1681 | ||
1683 | int watchdog_timeo; | ||
1684 | struct timer_list watchdog_timer; | 1682 | struct timer_list watchdog_timer; |
1685 | 1683 | ||
1686 | int __percpu *pcpu_refcnt; | 1684 | int __percpu *pcpu_refcnt; |
1687 | struct list_head todo_list; | 1685 | struct list_head todo_list; |
1688 | 1686 | ||
1689 | struct hlist_node index_hlist; | ||
1690 | struct list_head link_watch_list; | 1687 | struct list_head link_watch_list; |
1691 | 1688 | ||
1692 | enum { NETREG_UNINITIALIZED=0, | 1689 | enum { NETREG_UNINITIALIZED=0, |