{"id":3460,"date":"2022-12-20T17:08:43","date_gmt":"2022-12-20T20:08:43","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/devlinktrap-man8\/"},"modified":"2022-12-20T17:08:43","modified_gmt":"2022-12-20T20:08:43","slug":"devlinktrap-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/devlinktrap-man8\/","title":{"rendered":"DEVLINK&minus;TRAP (man8)"},"content":{"rendered":"<h1 align=\"center\">DEVLINK\u2212TRAP<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink-trap \u2212 devlink trap configuration<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink<\/b> [ <i>OPTIONS<\/i> ] <b>trap<\/b> { <i>COMMAND<\/i> | <b>help<\/b> }<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><i>OPTIONS<\/i> := { <b>\u2212v<\/b>[<i>erbose<\/i>] | <b>\u2212s<\/b>[<i>tatistics<\/i>] }<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink trap show<\/b> [ <i>DEV<\/i> <b>trap<\/b> <i>TRAP<\/i> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink trap set<\/b> <i>DEV<\/i> <b>trap<\/b> <i>TRAP<\/i> [ <b>action<\/b> { <b>trap<\/b> | <b>drop<\/b> | <b>mirror<\/b> } ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink trap group show<\/b> [ <i>DEV<\/i> <b>group<\/b> <i>GROUP<\/i> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink trap group set<\/b> <i>DEV<\/i> <b>group<\/b> <i>GROUP<\/i> [ <b>action<\/b> { <b>trap<\/b> | <b>drop<\/b> | <b>mirror<\/b> } ] <br \/> [ <b>policer<\/b> <i>POLICER<\/i> <b>]<\/b> [ <b>nopolicer<\/b> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink trap policer set<\/b> <i>DEV<\/i> <b>policer<\/b> <i>POLICER<\/i> [ <b>rate<\/b> <i>RATE<\/i> ] [ <b>burst<\/b> <i>BURST<\/i> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink trap help<\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink trap show &#8211; display available packet traps and their attributes<\/b> <i><br \/> DEV<\/i> &#8211; specifies the devlink device from which to show packet traps. If this argument is omitted all packet traps of all devices are listed.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>trap<\/b> <i>TRAP<\/i> &#8211; specifies the packet trap. Only applicable if a devlink device is also specified.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink trap set &#8211; set attributes of a packet trap<\/b> <i><br \/> DEV<\/i> &#8211; specifies the devlink device the packet trap belongs to.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>trap<\/b> <i>TRAP<\/i> &#8211; specifies the packet trap. <b><br \/> action<\/b> { <b>trap<\/b> | <b>drop<\/b> | <b>mirror<\/b> }<\/p>\n<p style=\"margin-left:22%;\">packet trap action.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>trap<\/i> &#8211; the sole copy of the packet is sent to the CPU.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>drop<\/i> &#8211; the packet is dropped by the underlying device and a copy is not sent to the CPU.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>mirror<\/i> &#8211; the packet is forwarded by the underlying device and a copy is sent to the CPU.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink trap group show &#8211; display available packet trap groups and their attributes<\/b> <i><br \/> DEV<\/i> &#8211; specifies the devlink device from which to show packet trap groups. If this argument is omitted all packet trap groups of all devices are listed.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>group<\/b> <i>GROUP<\/i> &#8211; specifies the packet trap group. Only applicable if a devlink device is also specified.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink trap group set &#8211; set attributes of a packet trap group<\/b> <i><br \/> DEV<\/i> &#8211; specifies the devlink device the packet trap group belongs to.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>group<\/b> <i>GROUP<\/i> &#8211; specifies the packet trap group. <b><br \/> action<\/b> { <b>trap<\/b> | <b>drop<\/b> | <b>mirror<\/b> }<\/p>\n<p style=\"margin-left:22%;\">packet trap action. The action is set for all the packet traps member in the trap group. The actions of non-drop traps cannot be changed and are thus skipped.<\/p>\n<p style=\"margin-left:11%;\"><b>policer<\/b> <i>POLICER<\/i><\/p>\n<p style=\"margin-left:22%;\">packet trap policer. The policer to bind to the packet trap group. A value of &#8220;0&#8221; will unbind the currently bound policer.<\/p>\n<p style=\"margin-left:11%;\"><b>nopolicer<\/b><\/p>\n<p style=\"margin-left:22%;\">Unbind packet trap policer from the packet trap group.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink trap policer set &#8211; set attributes of packet trap policer<\/b> <i><br \/> DEV<\/i> &#8211; specifies the devlink device the packet trap policer belongs to.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>policer<\/b> <i>POLICER<\/i> &#8211; specifies the packet trap policer.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>rate<\/b> <i>RATE<\/i> &#8211; packet trap policer rate in packets per second.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>burst<\/b> <i>BURST<\/i> &#8211; packet trap policer burst size in packets.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink trap show<\/p>\n<p style=\"margin-left:17%;\">List available packet traps.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink trap group show<\/p>\n<p style=\"margin-left:17%;\">List available packet trap groups.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink -vs trap show pci\/0000:01:00.0 trap source_mac_is_multicast<\/p>\n<p style=\"margin-left:17%;\">Show attributes and statistics of a specific packet trap.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink -s trap group show pci\/0000:01:00.0 group l2_drops<\/p>\n<p style=\"margin-left:17%;\">Show attributes and statistics of a specific packet trap group.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink trap set pci\/0000:01:00.0 trap source_mac_is_multicast action trap<\/p>\n<p style=\"margin-left:17%;\">Set the action of a specific packet trap to \u2019trap\u2019.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink trap policer show<\/p>\n<p style=\"margin-left:17%;\">List available packet trap policers.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink -s trap policer show pci\/0000:01:00.0 policer 1<\/p>\n<p style=\"margin-left:17%;\">Show attributes and statistics of a specific packet trap policer.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink trap policer set pci\/0000:01:00.0 policer 1 rate 1000 burst 128<\/p>\n<p style=\"margin-left:17%;\">Set the rate and burst size of a specific packet trap policer.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink<\/b>(8), <b>devlink-dev<\/b>(8), <b>devlink-monitor<\/b>(8),<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Ido Schimmel <idosch@mellanox.com><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  devlink-trap \u2212 devlink trap configuration <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,586,4],"class_list":["post-3460","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-devlink-trap","tag-man8"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3460"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3460\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}