]> git.proxmox.com Git - mirror_iproute2.git/blame - man/man8/devlink-trap.8
bridge: mdb: add support for source address
[mirror_iproute2.git] / man / man8 / devlink-trap.8
CommitLineData
a7a56f6f
IS
1.TH DEVLINK\-TRAP 8 "2 August 2019" "iproute2" "Linux"
2.SH NAME
3devlink-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.
61If this argument is omitted all packet traps of all devices are listed.
62
63.PP
64.BI "trap " TRAP
65- specifies the packet trap.
66Only 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
80packet 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.
96If 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.
101Only 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
115packet trap action. The action is set for all the packet traps member in the
116trap group. The actions of non-drop traps cannot be changed and are thus
117skipped.
118
02a2a668
IS
119.TP
120.BI policer " POLICER"
2d4c3f65
IS
121packet 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
126Unbind 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
148devlink trap show
149.RS 4
150List available packet traps.
151.RE
152.PP
153devlink trap group show
154.RS 4
155List available packet trap groups.
156.RE
157.PP
158devlink -vs trap show pci/0000:01:00.0 trap source_mac_is_multicast
159.RS 4
160Show attributes and statistics of a specific packet trap.
161.RE
162.PP
163devlink -s trap group show pci/0000:01:00.0 group l2_drops
164.RS 4
165Show attributes and statistics of a specific packet trap group.
166.RE
167.PP
168devlink trap set pci/0000:01:00.0 trap source_mac_is_multicast action trap
169.RS 4
170Set the action of a specific packet trap to 'trap'.
9ab56784 171.RE
a66af556
IS
172.PP
173devlink trap policer show
174.RS 4
175List available packet trap policers.
176.RE
177.PP
178devlink -s trap policer show pci/0000:01:00.0 policer 1
179.RS 4
180Show attributes and statistics of a specific packet trap policer.
181.RE
182.PP
183devlink trap policer set pci/0000:01:00.0 policer 1 rate 1000 burst 128
184.RS 4
185Set 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
195Ido Schimmel <idosch@mellanox.com>