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

docs: networking: convert tc-actions-env-rules.txt to ReST

- add SPDX header;
- add a document title;
- use the right numbered list markup;
- adjust identation, whitespaces and blank lines where needed;
- 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
d2461edd 32c0f0be

+30 -24
+1
Documentation/networking/index.rst
··· 106 106 skfp 107 107 strparser 108 108 switchdev 109 + tc-actions-env-rules 109 110 110 111 .. only:: subproject and html 111 112
+29
Documentation/networking/tc-actions-env-rules.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + ================================ 4 + TC Actions - Environmental Rules 5 + ================================ 6 + 7 + 8 + The "environmental" rules for authors of any new tc actions are: 9 + 10 + 1) If you stealeth or borroweth any packet thou shalt be branching 11 + from the righteous path and thou shalt cloneth. 12 + 13 + For example if your action queues a packet to be processed later, 14 + or intentionally branches by redirecting a packet, then you need to 15 + clone the packet. 16 + 17 + 2) If you munge any packet thou shalt call pskb_expand_head in the case 18 + someone else is referencing the skb. After that you "own" the skb. 19 + 20 + 3) Dropping packets you don't own is a no-no. You simply return 21 + TC_ACT_SHOT to the caller and they will drop it. 22 + 23 + The "environmental" rules for callers of actions (qdiscs etc) are: 24 + 25 + #) Thou art responsible for freeing anything returned as being 26 + TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is 27 + returned, then all is great and you don't need to do anything. 28 + 29 + Post on netdev if something is unclear.
-24
Documentation/networking/tc-actions-env-rules.txt
··· 1 - 2 - The "environmental" rules for authors of any new tc actions are: 3 - 4 - 1) If you stealeth or borroweth any packet thou shalt be branching 5 - from the righteous path and thou shalt cloneth. 6 - 7 - For example if your action queues a packet to be processed later, 8 - or intentionally branches by redirecting a packet, then you need to 9 - clone the packet. 10 - 11 - 2) If you munge any packet thou shalt call pskb_expand_head in the case 12 - someone else is referencing the skb. After that you "own" the skb. 13 - 14 - 3) Dropping packets you don't own is a no-no. You simply return 15 - TC_ACT_SHOT to the caller and they will drop it. 16 - 17 - The "environmental" rules for callers of actions (qdiscs etc) are: 18 - 19 - *) Thou art responsible for freeing anything returned as being 20 - TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is 21 - returned, then all is great and you don't need to do anything. 22 - 23 - Post on netdev if something is unclear. 24 -