30 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3================================4TC Actions - Environmental Rules5================================6 7 8The "environmental" rules for authors of any new tc actions are:9 101) If you stealeth or borroweth any packet thou shalt be branching11 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 to15 clone the packet.16 172) If you munge any packet thou shalt call pskb_expand_head in the case18 someone else is referencing the skb. After that you "own" the skb.19 203) Dropping packets you don't own is a no-no. You simply return21 TC_ACT_SHOT to the caller and they will drop it.22 23The "environmental" rules for callers of actions (qdiscs etc) are:24 25#) Thou art responsible for freeing anything returned as being26 TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is27 returned, then all is great and you don't need to do anything.28 29Post on netdev if something is unclear.30