|
@@ -47,24 +47,24 @@ packets is preferred.
|
|
|
|
|
|
struct net_device synchronization rules
|
|
struct net_device synchronization rules
|
|
=======================================
|
|
=======================================
|
|
-dev->open:
|
|
|
|
|
|
+ndo_open:
|
|
Synchronization: rtnl_lock() semaphore.
|
|
Synchronization: rtnl_lock() semaphore.
|
|
Context: process
|
|
Context: process
|
|
|
|
|
|
-dev->stop:
|
|
|
|
|
|
+ndo_stop:
|
|
Synchronization: rtnl_lock() semaphore.
|
|
Synchronization: rtnl_lock() semaphore.
|
|
Context: process
|
|
Context: process
|
|
Note: netif_running() is guaranteed false
|
|
Note: netif_running() is guaranteed false
|
|
|
|
|
|
-dev->do_ioctl:
|
|
|
|
|
|
+ndo_do_ioctl:
|
|
Synchronization: rtnl_lock() semaphore.
|
|
Synchronization: rtnl_lock() semaphore.
|
|
Context: process
|
|
Context: process
|
|
|
|
|
|
-dev->get_stats:
|
|
|
|
|
|
+ndo_get_stats:
|
|
Synchronization: dev_base_lock rwlock.
|
|
Synchronization: dev_base_lock rwlock.
|
|
Context: nominally process, but don't sleep inside an rwlock
|
|
Context: nominally process, but don't sleep inside an rwlock
|
|
|
|
|
|
-dev->hard_start_xmit:
|
|
|
|
|
|
+ndo_start_xmit:
|
|
Synchronization: __netif_tx_lock spinlock.
|
|
Synchronization: __netif_tx_lock spinlock.
|
|
|
|
|
|
When the driver sets NETIF_F_LLTX in dev->features this will be
|
|
When the driver sets NETIF_F_LLTX in dev->features this will be
|
|
@@ -86,12 +86,12 @@ dev->hard_start_xmit:
|
|
o NETDEV_TX_LOCKED Locking failed, please retry quickly.
|
|
o NETDEV_TX_LOCKED Locking failed, please retry quickly.
|
|
Only valid when NETIF_F_LLTX is set.
|
|
Only valid when NETIF_F_LLTX is set.
|
|
|
|
|
|
-dev->tx_timeout:
|
|
|
|
|
|
+ndo_tx_timeout:
|
|
Synchronization: netif_tx_lock spinlock; all TX queues frozen.
|
|
Synchronization: netif_tx_lock spinlock; all TX queues frozen.
|
|
Context: BHs disabled
|
|
Context: BHs disabled
|
|
Notes: netif_queue_stopped() is guaranteed true
|
|
Notes: netif_queue_stopped() is guaranteed true
|
|
|
|
|
|
-dev->set_rx_mode:
|
|
|
|
|
|
+ndo_set_rx_mode:
|
|
Synchronization: netif_addr_lock spinlock.
|
|
Synchronization: netif_addr_lock spinlock.
|
|
Context: BHs disabled
|
|
Context: BHs disabled
|
|
|
|
|
|
@@ -99,7 +99,7 @@ struct napi_struct synchronization rules
|
|
========================================
|
|
========================================
|
|
napi->poll:
|
|
napi->poll:
|
|
Synchronization: NAPI_STATE_SCHED bit in napi->state. Device
|
|
Synchronization: NAPI_STATE_SCHED bit in napi->state. Device
|
|
- driver's dev->close method will invoke napi_disable() on
|
|
|
|
|
|
+ driver's ndo_stop method will invoke napi_disable() on
|
|
all NAPI instances which will do a sleeping poll on the
|
|
all NAPI instances which will do a sleeping poll on the
|
|
NAPI_STATE_SCHED napi->state bit, waiting for all pending
|
|
NAPI_STATE_SCHED napi->state bit, waiting for all pending
|
|
NAPI activity to cease.
|
|
NAPI activity to cease.
|