diff options
| -rw-r--r-- | Documentation/networking/driver.txt | 12 | ||||
| -rw-r--r-- | Documentation/networking/netdevices.txt | 16 |
2 files changed, 14 insertions, 14 deletions
diff --git a/Documentation/networking/driver.txt b/Documentation/networking/driver.txt index 03283daa64fe..83ce06080ceb 100644 --- a/Documentation/networking/driver.txt +++ b/Documentation/networking/driver.txt | |||
| @@ -2,7 +2,7 @@ Document about softnet driver issues | |||
| 2 | 2 | ||
| 3 | Transmit path guidelines: | 3 | Transmit path guidelines: |
| 4 | 4 | ||
| 5 | 1) The hard_start_xmit method must never return '1' under any | 5 | 1) The ndo_start_xmit method must never return '1' under any |
| 6 | normal circumstances. It is considered a hard error unless | 6 | normal circumstances. It is considered a hard error unless |
| 7 | there is no way your device can tell ahead of time when it's | 7 | there is no way your device can tell ahead of time when it's |
| 8 | transmit function will become busy. | 8 | transmit function will become busy. |
| @@ -61,10 +61,10 @@ Transmit path guidelines: | |||
| 61 | 2) Do not forget to update netdev->trans_start to jiffies after | 61 | 2) Do not forget to update netdev->trans_start to jiffies after |
| 62 | each new tx packet is given to the hardware. | 62 | each new tx packet is given to the hardware. |
| 63 | 63 | ||
| 64 | 3) A hard_start_xmit method must not modify the shared parts of a | 64 | 3) An ndo_start_xmit method must not modify the shared parts of a |
| 65 | cloned SKB. | 65 | cloned SKB. |
| 66 | 66 | ||
| 67 | 4) Do not forget that once you return 0 from your hard_start_xmit | 67 | 4) Do not forget that once you return 0 from your ndo_start_xmit |
| 68 | method, it is your driver's responsibility to free up the SKB | 68 | method, it is your driver's responsibility to free up the SKB |
| 69 | and in some finite amount of time. | 69 | and in some finite amount of time. |
| 70 | 70 | ||
| @@ -74,7 +74,7 @@ Transmit path guidelines: | |||
| 74 | This error can deadlock sockets waiting for send buffer room | 74 | This error can deadlock sockets waiting for send buffer room |
| 75 | to be freed up. | 75 | to be freed up. |
| 76 | 76 | ||
| 77 | If you return 1 from the hard_start_xmit method, you must not keep | 77 | If you return 1 from the ndo_start_xmit method, you must not keep |
| 78 | any reference to that SKB and you must not attempt to free it up. | 78 | any reference to that SKB and you must not attempt to free it up. |
| 79 | 79 | ||
| 80 | Probing guidelines: | 80 | Probing guidelines: |
| @@ -85,10 +85,10 @@ Probing guidelines: | |||
| 85 | 85 | ||
| 86 | Close/stop guidelines: | 86 | Close/stop guidelines: |
| 87 | 87 | ||
| 88 | 1) After the dev->stop routine has been called, the hardware must | 88 | 1) After the ndo_stop routine has been called, the hardware must |
| 89 | not receive or transmit any data. All in flight packets must | 89 | not receive or transmit any data. All in flight packets must |
| 90 | be aborted. If necessary, poll or wait for completion of | 90 | be aborted. If necessary, poll or wait for completion of |
| 91 | any reset commands. | 91 | any reset commands. |
| 92 | 92 | ||
| 93 | 2) The dev->stop routine will be called by unregister_netdevice | 93 | 2) The ndo_stop routine will be called by unregister_netdevice |
| 94 | if device is still UP. | 94 | if device is still UP. |
diff --git a/Documentation/networking/netdevices.txt b/Documentation/networking/netdevices.txt index b107733cfdcd..c7ecc7080494 100644 --- a/Documentation/networking/netdevices.txt +++ b/Documentation/networking/netdevices.txt | |||
| @@ -47,24 +47,24 @@ packets is preferred. | |||
| 47 | 47 | ||
| 48 | struct net_device synchronization rules | 48 | struct net_device synchronization rules |
| 49 | ======================================= | 49 | ======================================= |
| 50 | dev->open: | 50 | ndo_open: |
| 51 | Synchronization: rtnl_lock() semaphore. | 51 | Synchronization: rtnl_lock() semaphore. |
| 52 | Context: process | 52 | Context: process |
| 53 | 53 | ||
| 54 | dev->stop: | 54 | ndo_stop: |
| 55 | Synchronization: rtnl_lock() semaphore. | 55 | Synchronization: rtnl_lock() semaphore. |
| 56 | Context: process | 56 | Context: process |
| 57 | Note: netif_running() is guaranteed false | 57 | Note: netif_running() is guaranteed false |
| 58 | 58 | ||
| 59 | dev->do_ioctl: | 59 | ndo_do_ioctl: |
| 60 | Synchronization: rtnl_lock() semaphore. | 60 | Synchronization: rtnl_lock() semaphore. |
| 61 | Context: process | 61 | Context: process |
| 62 | 62 | ||
| 63 | dev->get_stats: | 63 | ndo_get_stats: |
| 64 | Synchronization: dev_base_lock rwlock. | 64 | Synchronization: dev_base_lock rwlock. |
| 65 | Context: nominally process, but don't sleep inside an rwlock | 65 | Context: nominally process, but don't sleep inside an rwlock |
| 66 | 66 | ||
| 67 | dev->hard_start_xmit: | 67 | ndo_start_xmit: |
| 68 | Synchronization: __netif_tx_lock spinlock. | 68 | Synchronization: __netif_tx_lock spinlock. |
| 69 | 69 | ||
| 70 | When the driver sets NETIF_F_LLTX in dev->features this will be | 70 | When the driver sets NETIF_F_LLTX in dev->features this will be |
| @@ -86,12 +86,12 @@ dev->hard_start_xmit: | |||
| 86 | o NETDEV_TX_LOCKED Locking failed, please retry quickly. | 86 | o NETDEV_TX_LOCKED Locking failed, please retry quickly. |
| 87 | Only valid when NETIF_F_LLTX is set. | 87 | Only valid when NETIF_F_LLTX is set. |
| 88 | 88 | ||
| 89 | dev->tx_timeout: | 89 | ndo_tx_timeout: |
| 90 | Synchronization: netif_tx_lock spinlock; all TX queues frozen. | 90 | Synchronization: netif_tx_lock spinlock; all TX queues frozen. |
| 91 | Context: BHs disabled | 91 | Context: BHs disabled |
| 92 | Notes: netif_queue_stopped() is guaranteed true | 92 | Notes: netif_queue_stopped() is guaranteed true |
| 93 | 93 | ||
| 94 | dev->set_rx_mode: | 94 | ndo_set_rx_mode: |
| 95 | Synchronization: netif_addr_lock spinlock. | 95 | Synchronization: netif_addr_lock spinlock. |
| 96 | Context: BHs disabled | 96 | Context: BHs disabled |
| 97 | 97 | ||
| @@ -99,7 +99,7 @@ struct napi_struct synchronization rules | |||
| 99 | ======================================== | 99 | ======================================== |
| 100 | napi->poll: | 100 | napi->poll: |
| 101 | Synchronization: NAPI_STATE_SCHED bit in napi->state. Device | 101 | Synchronization: NAPI_STATE_SCHED bit in napi->state. Device |
| 102 | driver's dev->close method will invoke napi_disable() on | 102 | driver's ndo_stop method will invoke napi_disable() on |
| 103 | all NAPI instances which will do a sleeping poll on the | 103 | all NAPI instances which will do a sleeping poll on the |
| 104 | NAPI_STATE_SCHED napi->state bit, waiting for all pending | 104 | NAPI_STATE_SCHED napi->state bit, waiting for all pending |
| 105 | NAPI activity to cease. | 105 | NAPI activity to cease. |
