]>
Commit | Line | Data |
---|---|---|
a7a56f6f IS |
1 | .TH DEVLINK\-TRAP 8 "2 August 2019" "iproute2" "Linux" |
2 | .SH NAME | |
3 | devlink-trap \- devlink trap configuration | |
4 | .SH SYNOPSIS | |
5 | .sp | |
6 | .ad l | |
7 | .in +8 | |
8 | .ti -8 | |
9 | .B devlink | |
10 | .RI "[ " OPTIONS " ]" | |
11 | .B trap | |
12 | .RI "{ " COMMAND " |" | |
13 | .BR help " }" | |
14 | .sp | |
15 | ||
16 | .ti -8 | |
17 | .IR OPTIONS " := { " | |
18 | \fB\-v\fR[\fIerbose\fR] | | |
19 | \fB\-s\fR[\fItatistics\fR] } | |
20 | ||
21 | .ti -8 | |
22 | .B "devlink trap show" | |
23 | .RI "[ " DEV | |
24 | .B trap | |
25 | .IR TRAP " ]" | |
26 | ||
27 | .ti -8 | |
28 | .BI "devlink trap set " DEV " trap " TRAP | |
abda1e9d | 29 | .RB "[ " action " { " trap " | " drop " | " mirror " } ]" |
a7a56f6f IS |
30 | |
31 | .ti -8 | |
32 | .B "devlink trap group show" | |
33 | .RI "[ " DEV | |
34 | .B group | |
35 | .IR GROUP " ]" | |
36 | ||
37 | .ti -8 | |
38 | .BI "devlink trap group set " DEV " group " GROUP | |
abda1e9d | 39 | .RB "[ " action " { " trap " | " drop " | " mirror " } ]" |
02a2a668 IS |
40 | .br |
41 | .RB "[ " policer | |
42 | .IB "POLICER " ] | |
43 | .RB "[ " nopolicer " ]" | |
a7a56f6f | 44 | |
a66af556 IS |
45 | .ti -8 |
46 | .BI "devlink trap policer set " DEV " policer " POLICER | |
47 | .RB "[ " rate | |
48 | .IR "RATE " ] | |
49 | .RB "[ " burst | |
50 | .IR "BURST " ] | |
51 | ||
a7a56f6f IS |
52 | .ti -8 |
53 | .B devlink trap help | |
54 | ||
55 | .SH "DESCRIPTION" | |
56 | .SS devlink trap show - display available packet traps and their attributes | |
57 | ||
58 | .PP | |
59 | .I "DEV" | |
60 | - specifies the devlink device from which to show packet traps. | |
61 | If this argument is omitted all packet traps of all devices are listed. | |
62 | ||
63 | .PP | |
64 | .BI "trap " TRAP | |
65 | - specifies the packet trap. | |
66 | Only applicable if a devlink device is also specified. | |
67 | ||
68 | .SS devlink trap set - set attributes of a packet trap | |
69 | ||
70 | .PP | |
71 | .I "DEV" | |
72 | - specifies the devlink device the packet trap belongs to. | |
73 | ||
74 | .PP | |
75 | .BI "trap " TRAP | |
76 | - specifies the packet trap. | |
77 | ||
78 | .TP | |
abda1e9d | 79 | .BR action " { " trap " | " drop " | " mirror " } " |
a7a56f6f IS |
80 | packet trap action. |
81 | ||
82 | .I trap | |
83 | - the sole copy of the packet is sent to the CPU. | |
84 | ||
85 | .I drop | |
86 | - the packet is dropped by the underlying device and a copy is not sent to the CPU. | |
87 | ||
abda1e9d IS |
88 | .I mirror |
89 | - the packet is forwarded by the underlying device and a copy is sent to the CPU. | |
90 | ||
a7a56f6f IS |
91 | .SS devlink trap group show - display available packet trap groups and their attributes |
92 | ||
93 | .PP | |
94 | .I "DEV" | |
95 | - specifies the devlink device from which to show packet trap groups. | |
96 | If this argument is omitted all packet trap groups of all devices are listed. | |
97 | ||
98 | .PP | |
99 | .BI "group " GROUP | |
100 | - specifies the packet trap group. | |
101 | Only applicable if a devlink device is also specified. | |
102 | ||
103 | .SS devlink trap group set - set attributes of a packet trap group | |
104 | ||
105 | .PP | |
106 | .I "DEV" | |
107 | - specifies the devlink device the packet trap group belongs to. | |
108 | ||
109 | .PP | |
110 | .BI "group " GROUP | |
111 | - specifies the packet trap group. | |
112 | ||
113 | .TP | |
abda1e9d | 114 | .BR action " { " trap " | " drop " | " mirror " } " |
a7a56f6f IS |
115 | packet trap action. The action is set for all the packet traps member in the |
116 | trap group. The actions of non-drop traps cannot be changed and are thus | |
117 | skipped. | |
118 | ||
02a2a668 IS |
119 | .TP |
120 | .BI policer " POLICER" | |
2d4c3f65 IS |
121 | packet trap policer. The policer to bind to the packet trap group. A value of |
122 | "0" will unbind the currently bound policer. | |
02a2a668 IS |
123 | |
124 | .TP | |
125 | .B nopolicer | |
126 | Unbind packet trap policer from the packet trap group. | |
127 | ||
a66af556 IS |
128 | .SS devlink trap policer set - set attributes of packet trap policer |
129 | ||
130 | .PP | |
131 | .I "DEV" | |
132 | - specifies the devlink device the packet trap policer belongs to. | |
133 | ||
134 | .PP | |
135 | .BI "policer " POLICER | |
136 | - specifies the packet trap policer. | |
137 | ||
138 | .PP | |
139 | .BI rate " RATE " | |
140 | - packet trap policer rate in packets per second. | |
141 | ||
142 | .PP | |
143 | .BI burst " BURST " | |
144 | - packet trap policer burst size in packets. | |
145 | ||
a7a56f6f IS |
146 | .SH "EXAMPLES" |
147 | .PP | |
148 | devlink trap show | |
149 | .RS 4 | |
150 | List available packet traps. | |
151 | .RE | |
152 | .PP | |
153 | devlink trap group show | |
154 | .RS 4 | |
155 | List available packet trap groups. | |
156 | .RE | |
157 | .PP | |
158 | devlink -vs trap show pci/0000:01:00.0 trap source_mac_is_multicast | |
159 | .RS 4 | |
160 | Show attributes and statistics of a specific packet trap. | |
161 | .RE | |
162 | .PP | |
163 | devlink -s trap group show pci/0000:01:00.0 group l2_drops | |
164 | .RS 4 | |
165 | Show attributes and statistics of a specific packet trap group. | |
166 | .RE | |
167 | .PP | |
168 | devlink trap set pci/0000:01:00.0 trap source_mac_is_multicast action trap | |
169 | .RS 4 | |
170 | Set the action of a specific packet trap to 'trap'. | |
9ab56784 | 171 | .RE |
a66af556 IS |
172 | .PP |
173 | devlink trap policer show | |
174 | .RS 4 | |
175 | List available packet trap policers. | |
176 | .RE | |
177 | .PP | |
178 | devlink -s trap policer show pci/0000:01:00.0 policer 1 | |
179 | .RS 4 | |
180 | Show attributes and statistics of a specific packet trap policer. | |
181 | .RE | |
182 | .PP | |
183 | devlink trap policer set pci/0000:01:00.0 policer 1 rate 1000 burst 128 | |
184 | .RS 4 | |
185 | Set the rate and burst size of a specific packet trap policer. | |
186 | .RE | |
a7a56f6f IS |
187 | |
188 | .SH SEE ALSO | |
189 | .BR devlink (8), | |
190 | .BR devlink-dev (8), | |
191 | .BR devlink-monitor (8), | |
192 | .br | |
193 | ||
194 | .SH AUTHOR | |
195 | Ido Schimmel <idosch@mellanox.com> |