1DEVLINK-TRAP(8)                      Linux                     DEVLINK-TRAP(8)
2
3
4

NAME

6       devlink-trap - devlink trap configuration
7

SYNOPSIS

9       devlink [ OPTIONS ] trap { COMMAND | help }
10
11
12       OPTIONS := { -v[erbose] | -s[tatistics] }
13
14       devlink trap show [ DEV trap TRAP ]
15
16       devlink trap set DEV trap TRAP [ action { trap | drop | mirror } ]
17
18       devlink trap group show [ DEV group GROUP ]
19
20       devlink trap group set DEV group GROUP [ action { trap | drop | mirror
21               } ]
22               [ policer POLICER ] [ nopolicer ]
23
24       devlink trap policer set DEV policer POLICER [ rate RATE ] [ burst
25               BURST ]
26
27       devlink trap help
28
29

DESCRIPTION

31   devlink trap show - display available packet traps and their attributes
32       DEV - specifies the devlink device from which to show packet traps.  If
33       this argument is omitted all packet traps of all devices are listed.
34
35
36       trap TRAP - specifies the packet trap.  Only applicable if a devlink
37       device is also specified.
38
39
40   devlink trap set - set attributes of a packet trap
41       DEV - specifies the devlink device the packet trap belongs to.
42
43
44       trap TRAP - specifies the packet trap.
45
46
47       action { trap | drop | mirror }
48              packet trap action.
49
50              trap - the sole copy of the packet is sent to the CPU.
51
52              drop - the packet is dropped by the underlying device and a copy
53              is not sent to the CPU.
54
55              mirror - the packet is forwarded by the underlying device and a
56              copy is sent to the CPU.
57
58
59   devlink trap group show - display available packet trap groups and their
60       attributes
61       DEV - specifies the devlink device from which to show packet trap
62       groups.  If this argument is omitted all packet trap groups of all
63       devices are listed.
64
65
66       group GROUP - specifies the packet trap group.  Only applicable if a
67       devlink device is also specified.
68
69
70   devlink trap group set - set attributes of a packet trap group
71       DEV - specifies the devlink device the packet trap group belongs to.
72
73
74       group GROUP - specifies the packet trap group.
75
76
77       action { trap | drop | mirror }
78              packet trap action. The action is set for all the packet traps
79              member in the trap group. The actions of non-drop traps cannot
80              be changed and are thus skipped.
81
82
83       policer POLICER
84              packet trap policer. The policer to bind to the packet trap
85              group. A value of "0" will unbind the currently bound policer.
86
87
88       nopolicer
89              Unbind packet trap policer from the packet trap group.
90
91
92   devlink trap policer set - set attributes of packet trap policer
93       DEV - specifies the devlink device the packet trap policer belongs to.
94
95
96       policer POLICER - specifies the packet trap policer.
97
98
99       rate RATE - packet trap policer rate in packets per second.
100
101
102       burst BURST - packet trap policer burst size in packets.
103
104

EXAMPLES

106       devlink trap show
107           List available packet traps.
108
109       devlink trap group show
110           List available packet trap groups.
111
112       devlink -vs trap show pci/0000:01:00.0 trap source_mac_is_multicast
113           Show attributes and statistics of a specific packet trap.
114
115       devlink -s trap group show pci/0000:01:00.0 group l2_drops
116           Show attributes and statistics of a specific packet trap group.
117
118       devlink trap set pci/0000:01:00.0 trap source_mac_is_multicast action
119       trap
120           Set the action of a specific packet trap to 'trap'.
121
122       devlink trap policer show
123           List available packet trap policers.
124
125       devlink -s trap policer show pci/0000:01:00.0 policer 1
126           Show attributes and statistics of a specific packet trap policer.
127
128       devlink trap policer set pci/0000:01:00.0 policer 1 rate 1000 burst 128
129           Set the rate and burst size of a specific packet trap policer.
130
131

SEE ALSO

133       devlink(8), devlink-dev(8), devlink-monitor(8),
134
135

AUTHOR

137       Ido Schimmel <idosch@mellanox.com>
138
139
140
141iproute2                         2 August 2019                 DEVLINK-TRAP(8)
Impressum