@@ -1313,6 +1313,8 @@ enum netdev_priv_flags {
1313
1313
* @base_addr: Device I/O address
1314
1314
* @irq: Device IRQ number
1315
1315
*
1316
+ * @carrier_changes: Stats to monitor carrier on<->off transitions
1317
+ *
1316
1318
* @state: Generic network queuing layer state, see netdev_state_t
1317
1319
* @dev_list: The global list of network devices
1318
1320
* @napi_list: List entry, that is used for polling napi devices
@@ -1346,8 +1348,6 @@ enum netdev_priv_flags {
1346
1348
* @tx_dropped: Dropped packets by core network,
1347
1349
* do not use this in drivers
1348
1350
*
1349
- * @carrier_changes: Stats to monitor carrier on<->off transitions
1350
- *
1351
1351
* @wireless_handlers: List of functions to handle Wireless Extensions,
1352
1352
* instead of ioctl,
1353
1353
* see <net/iw_handler.h> for details.
@@ -1390,14 +1390,14 @@ enum netdev_priv_flags {
1390
1390
* @dev_port: Used to differentiate devices that share
1391
1391
* the same function
1392
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
1393
* @uc_promisc: Counter, that indicates, that promiscuous mode
1398
1394
* has been enabled due to the need to listen to
1399
1395
* additional unicast addresses in a device that
1400
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
1401
* @promiscuity: Number of times, the NIC is told to work in
1402
1402
* Promiscuous mode, if it becomes 0 the NIC will
1403
1403
* exit from working in Promiscuous mode
@@ -1427,6 +1427,12 @@ enum netdev_priv_flags {
1427
1427
* @ingress_queue: XXX: need comments on this one
1428
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
1436
* @_tx: Array of TX queues
1431
1437
* @num_tx_queues: Number of TX queues allocated at alloc_netdev_mq() time
1432
1438
* @real_num_tx_queues: Number of TX queues currently active in device
@@ -1436,19 +1442,13 @@ enum netdev_priv_flags {
1436
1442
*
1437
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
1445
* @trans_start: Time (in jiffies) of last Tx
1445
1446
* @watchdog_timeo: Represents the timeout that is used by
1446
1447
* the watchdog ( see dev_watchdog() )
1447
1448
* @watchdog_timer: List of timers
1448
1449
*
1449
1450
* @pcpu_refcnt: Number of references to this device
1450
1451
* @todo_list: Delayed register/unregister
1451
- * @index_hlist: Device index hash chain
1452
1452
* @link_watch_list: XXX: need comments on this one
1453
1453
*
1454
1454
* @reg_state: Register/unregister state machine
@@ -1515,6 +1515,8 @@ struct net_device {
1515
1515
unsigned long base_addr ;
1516
1516
int irq ;
1517
1517
1518
+ atomic_t carrier_changes ;
1519
+
1518
1520
/*
1519
1521
* Some hardware also needs these fields (state,dev_list,
1520
1522
* napi_list,unreg_list,close_list) but they are not
@@ -1555,8 +1557,6 @@ struct net_device {
1555
1557
atomic_long_t rx_dropped ;
1556
1558
atomic_long_t tx_dropped ;
1557
1559
1558
- atomic_t carrier_changes ;
1559
-
1560
1560
#ifdef CONFIG_WIRELESS_EXT
1561
1561
const struct iw_handler_def * wireless_handlers ;
1562
1562
struct iw_public_data * wireless_data ;
@@ -1596,17 +1596,15 @@ struct net_device {
1596
1596
unsigned short dev_id ;
1597
1597
unsigned short dev_port ;
1598
1598
spinlock_t addr_list_lock ;
1599
+ unsigned char name_assign_type ;
1600
+ bool uc_promisc ;
1599
1601
struct netdev_hw_addr_list uc ;
1600
1602
struct netdev_hw_addr_list mc ;
1601
1603
struct netdev_hw_addr_list dev_addrs ;
1602
1604
1603
1605
#ifdef CONFIG_SYSFS
1604
1606
struct kset * queues_kset ;
1605
1607
#endif
1606
-
1607
- unsigned char name_assign_type ;
1608
-
1609
- bool uc_promisc ;
1610
1608
unsigned int promiscuity ;
1611
1609
unsigned int allmulti ;
1612
1610
@@ -1653,7 +1651,10 @@ struct net_device {
1653
1651
1654
1652
struct netdev_queue __rcu * ingress_queue ;
1655
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
1660
* Cache lines mostly used on transmit path
@@ -1664,13 +1665,11 @@ struct net_device {
1664
1665
struct Qdisc * qdisc ;
1665
1666
unsigned long tx_queue_len ;
1666
1667
spinlock_t tx_global_lock ;
1668
+ int watchdog_timeo ;
1667
1669
1668
1670
#ifdef CONFIG_XPS
1669
1671
struct xps_dev_maps __rcu * xps_maps ;
1670
1672
#endif
1671
- #ifdef CONFIG_RFS_ACCEL
1672
- struct cpu_rmap * rx_cpu_rmap ;
1673
- #endif
1674
1673
1675
1674
/* These may be needed for future network-power-down code. */
1676
1675
@@ -1680,13 +1679,11 @@ struct net_device {
1680
1679
*/
1681
1680
unsigned long trans_start ;
1682
1681
1683
- int watchdog_timeo ;
1684
1682
struct timer_list watchdog_timer ;
1685
1683
1686
1684
int __percpu * pcpu_refcnt ;
1687
1685
struct list_head todo_list ;
1688
1686
1689
- struct hlist_node index_hlist ;
1690
1687
struct list_head link_watch_list ;
1691
1688
1692
1689
enum { NETREG_UNINITIALIZED = 0 ,
@@ -1751,7 +1748,6 @@ struct net_device {
1751
1748
#endif
1752
1749
struct phy_device * phydev ;
1753
1750
struct lock_class_key * qdisc_tx_busylock ;
1754
- struct pm_qos_request pm_qos_req ;
1755
1751
};
1756
1752
#define to_net_dev (d ) container_of(d, struct net_device, dev)
1757
1753
0 commit comments