Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: networking: convert driver.txt to ReST

- add SPDX header;
- add a document title;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Mauro Carvalho Chehab and committed by
David S. Miller
28d23311 9dfe1361

+14 -9
+13 -9
Documentation/networking/driver.txt Documentation/networking/driver.rst
··· 1 - Document about softnet driver issues 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + ===================== 4 + Softnet Driver Issues 5 + ===================== 2 6 3 7 Transmit path guidelines: 4 8 ··· 12 8 transmit function will become busy. 13 9 14 10 Instead it must maintain the queue properly. For example, 15 - for a driver implementing scatter-gather this means: 11 + for a driver implementing scatter-gather this means:: 16 12 17 13 static netdev_tx_t drv_hard_start_xmit(struct sk_buff *skb, 18 14 struct net_device *dev) ··· 42 38 return NETDEV_TX_OK; 43 39 } 44 40 45 - And then at the end of your TX reclamation event handling: 41 + And then at the end of your TX reclamation event handling:: 46 42 47 43 if (netif_queue_stopped(dp->dev) && 48 - TX_BUFFS_AVAIL(dp) > (MAX_SKB_FRAGS + 1)) 44 + TX_BUFFS_AVAIL(dp) > (MAX_SKB_FRAGS + 1)) 49 45 netif_wake_queue(dp->dev); 50 46 51 - For a non-scatter-gather supporting card, the three tests simply become: 47 + For a non-scatter-gather supporting card, the three tests simply become:: 52 48 53 49 /* This is a hard error log it. */ 54 50 if (TX_BUFFS_AVAIL(dp) <= 0) 55 51 56 - and: 52 + and:: 57 53 58 54 if (TX_BUFFS_AVAIL(dp) == 0) 59 55 60 - and: 56 + and:: 61 57 62 58 if (netif_queue_stopped(dp->dev) && 63 - TX_BUFFS_AVAIL(dp) > 0) 59 + TX_BUFFS_AVAIL(dp) > 0) 64 60 netif_wake_queue(dp->dev); 65 61 66 62 2) An ndo_start_xmit method must not modify the shared parts of a ··· 90 86 91 87 1) After the ndo_stop routine has been called, the hardware must 92 88 not receive or transmit any data. All in flight packets must 93 - be aborted. If necessary, poll or wait for completion of 89 + be aborted. If necessary, poll or wait for completion of 94 90 any reset commands. 95 91 96 92 2) The ndo_stop routine will be called by unregister_netdevice
+1
Documentation/networking/index.rst
··· 53 53 decnet 54 54 defza 55 55 dns_resolver 56 + driver 56 57 57 58 .. only:: subproject and html 58 59