aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking/tc-actions-env-rules.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/networking/tc-actions-env-rules.txt')
-rw-r--r--Documentation/networking/tc-actions-env-rules.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/Documentation/networking/tc-actions-env-rules.txt b/Documentation/networking/tc-actions-env-rules.txt
index 01e716d185f4..dcadf6f88e34 100644
--- a/Documentation/networking/tc-actions-env-rules.txt
+++ b/Documentation/networking/tc-actions-env-rules.txt
@@ -4,26 +4,27 @@ The "enviromental" rules for authors of any new tc actions are:
41) If you stealeth or borroweth any packet thou shalt be branching 41) If you stealeth or borroweth any packet thou shalt be branching
5from the righteous path and thou shalt cloneth. 5from the righteous path and thou shalt cloneth.
6 6
7For example if your action queues a packet to be processed later 7For example if your action queues a packet to be processed later,
8or intentionaly branches by redirecting a packet then you need to 8or intentionally branches by redirecting a packet, then you need to
9clone the packet. 9clone the packet.
10
10There are certain fields in the skb tc_verd that need to be reset so we 11There are certain fields in the skb tc_verd that need to be reset so we
11avoid loops etc. A few are generic enough so much so that skb_act_clone() 12avoid loops, etc. A few are generic enough that skb_act_clone()
12resets them for you. So invoke skb_act_clone() rather than skb_clone() 13resets them for you, so invoke skb_act_clone() rather than skb_clone().
13 14
142) If you munge any packet thou shalt call pskb_expand_head in the case 152) If you munge any packet thou shalt call pskb_expand_head in the case
15someone else is referencing the skb. After that you "own" the skb. 16someone else is referencing the skb. After that you "own" the skb.
16You must also tell us if it is ok to munge the packet (TC_OK2MUNGE), 17You must also tell us if it is ok to munge the packet (TC_OK2MUNGE),
17this way any action downstream can stomp on the packet. 18this way any action downstream can stomp on the packet.
18 19
193) dropping packets you dont own is a nono. You simply return 203) Dropping packets you don't own is a no-no. You simply return
20TC_ACT_SHOT to the caller and they will drop it. 21TC_ACT_SHOT to the caller and they will drop it.
21 22
22The "enviromental" rules for callers of actions (qdiscs etc) are: 23The "enviromental" rules for callers of actions (qdiscs etc) are:
23 24
24*) thou art responsible for freeing anything returned as being 25*) Thou art responsible for freeing anything returned as being
25TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is 26TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is
26returned then all is great and you dont need to do anything. 27returned, then all is great and you don't need to do anything.
27 28
28Post on netdev if something is unclear. 29Post on netdev if something is unclear.
29 30