Commit 28d23311 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by David S. Miller

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: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9dfe1361
Document about softnet driver issues .. SPDX-License-Identifier: GPL-2.0
=====================
Softnet Driver Issues
=====================
Transmit path guidelines: Transmit path guidelines:
...@@ -8,7 +12,7 @@ Transmit path guidelines: ...@@ -8,7 +12,7 @@ Transmit path guidelines:
transmit function will become busy. transmit function will become busy.
Instead it must maintain the queue properly. For example, Instead it must maintain the queue properly. For example,
for a driver implementing scatter-gather this means: for a driver implementing scatter-gather this means::
static netdev_tx_t drv_hard_start_xmit(struct sk_buff *skb, static netdev_tx_t drv_hard_start_xmit(struct sk_buff *skb,
struct net_device *dev) struct net_device *dev)
...@@ -38,22 +42,22 @@ Transmit path guidelines: ...@@ -38,22 +42,22 @@ Transmit path guidelines:
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
And then at the end of your TX reclamation event handling: And then at the end of your TX reclamation event handling::
if (netif_queue_stopped(dp->dev) && if (netif_queue_stopped(dp->dev) &&
TX_BUFFS_AVAIL(dp) > (MAX_SKB_FRAGS + 1)) TX_BUFFS_AVAIL(dp) > (MAX_SKB_FRAGS + 1))
netif_wake_queue(dp->dev); netif_wake_queue(dp->dev);
For a non-scatter-gather supporting card, the three tests simply become: For a non-scatter-gather supporting card, the three tests simply become::
/* This is a hard error log it. */ /* This is a hard error log it. */
if (TX_BUFFS_AVAIL(dp) <= 0) if (TX_BUFFS_AVAIL(dp) <= 0)
and: and::
if (TX_BUFFS_AVAIL(dp) == 0) if (TX_BUFFS_AVAIL(dp) == 0)
and: and::
if (netif_queue_stopped(dp->dev) && if (netif_queue_stopped(dp->dev) &&
TX_BUFFS_AVAIL(dp) > 0) TX_BUFFS_AVAIL(dp) > 0)
......
...@@ -53,6 +53,7 @@ Contents: ...@@ -53,6 +53,7 @@ Contents:
decnet decnet
defza defza
dns_resolver dns_resolver
driver
.. only:: subproject and html .. only:: subproject and html
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment