]> git.proxmox.com Git - mirror_iproute2.git/blob - man/man8/tc-actions.8
tc/m_gact: Drop dead code
[mirror_iproute2.git] / man / man8 / tc-actions.8
1 .TH "actions in tc" 8 "4 Jul 2017" "iproute2" "Linux"
2
3 .SH NAME
4 actions \- independently defined actions in tc
5 .SH SYNOPSIS
6 .B tc
7 [
8 .I TC_OPTIONS
9 ]
10 .B actions
11 .BR add " | " change " | " replace
12 .I ACTSPEC
13
14 .B tc
15 [
16 .I TC_OPTIONS
17 ]
18 .B actions
19 .BR get " | " delete
20 .I ACTISPEC
21
22 .B tc
23 [
24 .I TC_OPTIONS
25 ]
26 .B actions flush
27 .I ACTNAMESPEC
28
29 .B tc
30 [
31 .I TC_OPTIONS
32 ]
33 .B actions
34 .BR ls " | " list
35 .I ACTNAMESPEC
36
37 .in +8
38 .I ACTSPEC
39 :=
40 .B action
41 .I ACTDETAIL
42 [
43 .I INDEXSPEC
44 ] [
45 .I COOKIESPEC
46 ] [
47 .I CONTROL
48 ]
49
50 .I ACTISPEC
51 :=
52 .I ACTNAMESPEC INDEXSPEC
53
54 .I ACTNAMESPEC
55 :=
56 .B action
57 ACTNAME
58
59 .I INDEXSPEC
60 :=
61 .BI index " INDEX"
62
63 .I COOKIESPEC
64 :=
65 .BI cookie " COOKIE"
66
67 .I ACTDETAIL
68 :=
69 .I ACTNAME ACTPARAMS
70
71 .I ACTNAME
72 may be any valid action type: gact, mirred, bpf, connmark, csum, police, etc.
73
74 .I ACTPARAMS
75 are the action-specific parameters; see the man page for the specific action
76 type to be used for details.
77
78 .I CONTROL
79 := {
80 .IR reclassify " | " pipe " | " drop " | " continue " | " ok
81 }
82
83 .I TC_OPTIONS
84 These are the options that are specific to
85 .B tc
86 and not only the options. Refer to
87 .BR tc(8)
88 for more information.
89 .in
90
91 .SH DESCRIPTION
92
93 The
94 .B actions
95 object in
96 .B tc
97 allows a user to define actions independently of a classifier (filter). These
98 actions can then be assigned to one or more filters, with any
99 packets matching the classifier's criteria having that action performed
100 on them.
101
102 Each action type (mirred, police, etc.) will have its own table to store
103 all created actions.
104
105 .SH OPERATIONS
106 .TP
107 .B add
108 Create a new action in that action's table.
109
110 .TP
111 .B change
112 .TQ
113 .B replace
114 Make modifications to an existing action.
115 .TP
116 .B get
117 Display the action with the specified index value. When combined with the
118 .B -s
119 option for
120 .BR tc ","
121 display the statistics for that action.
122 .TP
123 .B delete
124 Delete the action with the specified index value. If the action is already
125 associated with a classifier, it does not delete the classifier.
126 .TP
127 .B ls
128 .TQ
129 .B list
130 List all the actions in the specified table. When combined with the
131 .B -s
132 option for
133 .BR tc ","
134 display the statistics for all actions in the specified table.
135 .TP
136 .B flush
137 Delete all actions stored in the specified table.
138
139 .SH ACTION OPTIONS
140 Note that these options are available to all action types.
141 .TP
142 .BI index " INDEX"
143 Specify the table index value of an action.
144 .I INDEX
145 is a 32-bit value that is unique to the specific type of action referenced.
146
147 .RS
148 For
149 .BR add ", " change ", and"
150 .B replace
151 operations, the index is
152 .BR optional.
153 When adding a new action,
154 specifying an index value will assign the action to that index unless that
155 index value has already been assigned. Omitting the index value for an add
156 operation will cause the kernel to assign a value to the new action.
157 .RE
158
159 .RS
160 For
161 .BR get " and " delete
162 operations, the index is
163 .B required
164 to identify the specific action to be displayed or deleted.
165 .RE
166
167 .TP
168 .BI cookie " COOKIE"
169 In addition to the specific action, mark the matching packet with the value
170 specified by
171 .IR COOKIE "."
172 The
173 .I COOKIE
174 is a 128-bit value that will not be interpreted by the kernel whatsoever.
175 As such, it can be used as a correlating value for maintaining user state.
176 The value to be stored is completely arbitrary and does not require a specific
177 format. It is stored inside the action structure itself.
178
179 .TP
180 .I CONTROL
181 The
182 .I CONTROL
183 indicates how
184 .B tc
185 should proceed after executing the action. Any of the following are valid:
186 .RS
187 .TP
188 .B reclassify
189 Restart the classifiction by jumping back to the first filter attached to
190 the action's parent.
191 .TP
192 .B pipe
193 Continue with the next action. This is the default control.
194 .TP
195 .B drop
196 Drop the packed without running any further actions.
197 .TP
198 .B continue
199 Continue the classification with the next filter.
200 .TP
201 .B pass
202 Return to the calling qdisc for packet processing, and end classification of
203 this packet.
204 .RE
205
206 .SH SEE ALSO
207 .BR tc (8),
208 .BR tc-bpf (8),
209 .BR tc-connmark (8),
210 .BR tc-csum (8),
211 .BR tc-ife (8),
212 .BR tc-mirred (8),
213 .BR tc-nat (8),
214 .BR tc-pedit (8),
215 .BR tc-police (8),
216 .BR tc-simple (8),
217 .BR tc-skbedit (8),
218 .BR tc-skbmod (8),
219 .BR tc-tunnel_key (8),
220 .BR tc-vlan (8),
221 .BR tc-xt (8)