{"id":3128,"date":"2022-12-20T16:43:33","date_gmt":"2022-12-20T19:43:33","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/devlinksb-man8\/"},"modified":"2022-12-20T16:43:33","modified_gmt":"2022-12-20T19:43:33","slug":"devlinksb-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/devlinksb-man8\/","title":{"rendered":"DEVLINK&minus;SB (man8)"},"content":{"rendered":"<h1 align=\"center\">DEVLINK\u2212SB<\/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-sb \u2212 devlink shared buffer 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>sb<\/b> { <i>COMMAND<\/i> | <b>help<\/b> }<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><i>OPTIONS<\/i> := { <b>\u2212V<\/b>[<i>ersion<\/i>] | <b>\u2212n<\/b>[<i>no-nice-names<\/i>] }<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink sb show<\/b> [ <i>DEV<\/i> [ <b>sb<\/b> <i>SB_INDEX<\/i> ] ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink sb pool show<\/b> [ <i>DEV<\/i> [ <b>sb<\/b> <i>SB_INDEX<\/i> ] <b><br \/> pool<\/b> <i>POOL_INDEX<\/i> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink sb pool set<\/b> <i>DEV<\/i> [ <b>sb<\/b> <i>SB_INDEX<\/i> ] <b><br \/> pool<\/b> <i>POOL_INDEX<\/i> <b><br \/> size<\/b> <i>POOL_SIZE<\/i> <b><br \/> thtype<\/b> { <b>static<\/b> | <b>dynamic<\/b> }<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink sb port pool show<\/b> [ <i>DEV\/PORT_INDEX<\/i> [ <b>sb<\/b> <i>SB_INDEX<\/i> ] <b><br \/> pool<\/b> <i>POOL_INDEX<\/i> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink sb port pool set<\/b> <i>DEV\/PORT_INDEX<\/i> [ <b>sb<\/b> <i>SB_INDEX<\/i> ] <b><br \/> pool<\/b> <i>POOL_INDEX<\/i> <b><br \/> th<\/b> <i>THRESHOLD<\/i><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink sb tc bind show<\/b> [ <i>DEV\/PORT_INDEX<\/i> [ <b>sb<\/b> <i>SB_INDEX<\/i> ] <b><br \/> tc<\/b> <i>TC_INDEX<\/i> <b><br \/> type<\/b> { <b>ingress<\/b> | <b>egress<\/b> } ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink sb tc bind set<\/b> <i>DEV\/PORT_INDEX<\/i> [ <b>sb<\/b> <i>SB_INDEX<\/i> ] <b><br \/> tc<\/b> <i>TC_INDEX<\/i> <b><br \/> type<\/b> { <b>ingress<\/b> | <b>egress<\/b> } <b><br \/> pool<\/b> <i>POOL_INDEX<\/i> <b><br \/> th<\/b> <i>THRESHOLD<\/i><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink sb occupancy show<\/b> { <i>DEV<\/i> | <i>DEV\/PORT_INDEX<\/i> } [ <b>sb<\/b> <i>SB_INDEX<\/i> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink sb occupancy snapshot<\/b> <i>DEV<\/i> [ <b>sb<\/b> <i>SB_INDEX<\/i> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink sb occupancy clearmax<\/b> <i>DEV<\/i> [ <b>sb<\/b> <i>SB_INDEX<\/i> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>devlink sb help<\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink sb show &#8211; display available shared buffers and their attributes<\/b> <i><br \/> DEV<\/i> &#8211; specifies the devlink device to show shared buffers. If this argument is omitted all shared buffers of all devices are listed.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>SB_INDEX<\/i> &#8211; specifies the shared buffer. If this argument is omitted shared buffer with index 0 is selected. Behaviour of this argument it the same for every command.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink sb pool show &#8211; display available pools and their attributes<\/b> <i><br \/> DEV<\/i> &#8211; specifies the devlink device to show pools. If this argument is omitted all pools of all devices are listed.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Display available pools listing their <b>type, size, thtype<\/b> and <b>cell_size. cell_size<\/b> is the allocation granularity of memory within the shared buffer. Drivers may round up, round down or reject <b>size<\/b> passed to the set command if it is not multiple of <b>cell_size.<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink sb pool set &#8211; set attributes of pool<\/b> <i><br \/> DEV<\/i> &#8211; specifies the devlink device to set pool. <b><br \/> size<\/b> <i>POOL_SIZE<\/i><\/p>\n<p style=\"margin-left:22%;\">size of the pool in Bytes.<\/p>\n<p style=\"margin-left:11%;\"><b>thtype<\/b> { <b>static<\/b> | <b>dynamic<\/b> }<\/p>\n<p style=\"margin-left:22%;\">pool threshold type.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>static<\/i> &#8211; Threshold values for the pool will be passed in Bytes.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>dynamic<\/i> &#8211; Threshold values (&#8220;to_alpha&#8221;) for the pool will be used to compute alpha parameter according to formula:<\/p>\n<p style=\"margin-left:46%;\">alpha = 2 ^ (to_alpha &#8211; 10)<\/p>\n<p style=\"margin-left:37%; margin-top: 1em\">The range of the passed value is between 0 to 20. The computed alpha is used to determine the maximum usage of the flow:<\/p>\n<p style=\"margin-left:46%;\">max_usage = alpha \/ (1 + alpha) bodies manpages.csv script_extrae_body.sh script.sh usr Free_Buffer<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink sb port pool show &#8211; display port-pool combinations and threshold for each<\/b> <i><br \/> DEV\/PORT_INDEX<\/i> &#8211; specifies the devlink port. <b><br \/> pool<\/b> <i>POOL_INDEX<\/i><\/p>\n<p style=\"margin-left:22%;\">pool index.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink sb port pool set &#8211; set port-pool threshold<\/b> <i><br \/> DEV\/PORT_INDEX<\/i> &#8211; specifies the devlink port. <b><br \/> pool<\/b> <i>POOL_INDEX<\/i><\/p>\n<p style=\"margin-left:22%;\">pool index.<\/p>\n<p style=\"margin-left:11%;\"><b>th<\/b> <i>THRESHOLD<\/i><\/p>\n<p style=\"margin-left:22%;\">threshold value. Type of the value is either Bytes or &#8220;to_alpha&#8221;, depends on <b>thtype<\/b> set for the pool.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink sb tc bind show &#8211; display port-TC to pool bindings and threshold for each<\/b> <i><br \/> DEV\/PORT_INDEX<\/i> &#8211; specifies the devlink port. <b><br \/> tc<\/b> <i>TC_INDEX<\/i><\/p>\n<p style=\"margin-left:22%;\">index of either ingress or egress TC, usually in range 0 to 8 (depends on device).<\/p>\n<p style=\"margin-left:11%;\"><b>type<\/b> { <b>ingress<\/b> | <b>egress<\/b> }<\/p>\n<p style=\"margin-left:22%;\">TC type.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink sb tc bind set &#8211; set port-TC to pool binding with specified threshold<\/b> <i><br \/> DEV\/PORT_INDEX<\/i> &#8211; specifies the devlink port. <b><br \/> tc<\/b> <i>TC_INDEX<\/i><\/p>\n<p style=\"margin-left:22%;\">index of either ingress or egress TC, usually in range 0 to 8 (depends on device).<\/p>\n<p style=\"margin-left:11%;\"><b>type<\/b> { <b>ingress<\/b> | <b>egress<\/b> }<\/p>\n<p style=\"margin-left:22%;\">TC type.<\/p>\n<p style=\"margin-left:11%;\"><b>pool<\/b> <i>POOL_INDEX<\/i><\/p>\n<p style=\"margin-left:22%;\">index of pool to bind this to.<\/p>\n<p style=\"margin-left:11%;\"><b>th<\/b> <i>THRESHOLD<\/i><\/p>\n<p style=\"margin-left:22%;\">threshold value. Type of the value is either Bytes or &#8220;to_alpha&#8221;, depends on <b>thtype<\/b> set for the pool.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink sb occupancy show &#8211; display shared buffer occupancy values for device or port<\/b> <br \/> This command is used to browse shared buffer occupancy values. Values are showed for every port-pool combination as well as for all port-TC combinations (with pool this port-TC is bound to). Format of value is:<\/p>\n<p style=\"margin-left:35%;\">current_value\/max_value<\/p>\n<p style=\"margin-left:11%;\">Note that before showing values, one has to issue <b>occupancy snapshot<\/b> command first.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>DEV<\/i> &#8211; specifies the devlink device to show occupancy values for.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>DEV\/PORT_INDEX<\/i> &#8211; specifies the devlink port to show occupancy values for.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink sb occupancy snapshot &#8211; take occupancy snapshot of shared buffer for device<\/b> <br \/> This command is used to take a snapshot of shared buffer occupancy values. After that, the values can be showed using <b>occupancy show<\/b> command.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>DEV<\/i> &#8211; specifies the devlink device to take occupancy snapshot on.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>devlink sb occupancy clearmax &#8211; clear occupancy watermarks of shared buffer for device<\/b> <br \/> This command is used to reset maximal occupancy values reached for whole device. Note that before browsing reset values, one has to issue <b>occupancy snapshot<\/b> command.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>DEV<\/i> &#8211; specifies the devlink device to clear occupancy watermarks on.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink sb show<\/p>\n<p style=\"margin-left:17%;\">List available share buffers.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink sb pool show<\/p>\n<p style=\"margin-left:17%;\">List available pools and their config.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink sb port pool show pci\/0000:03:00.0\/1 pool 0<\/p>\n<p style=\"margin-left:17%;\">Show port-pool setup for specified port and pool.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">sudo devlink sb port pool set pci\/0000:03:00.0\/1 pool 0 th 15<\/p>\n<p style=\"margin-left:17%;\">Change threshold for port specified port and pool.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink sb tc bind show pci\/0000:03:00.0\/1 tc 0 type ingress<\/p>\n<p style=\"margin-left:17%;\">Show pool binding and threshold for specified port and TC.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">sudo devlink sb tc bind set pci\/0000:03:00.0\/1 tc 0 type ingress pool 0 th 9<\/p>\n<p style=\"margin-left:17%;\">Set pool binding and threshold for specified port and TC.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">sudo devlink sb occupancy snapshot pci\/0000:03:00.0<\/p>\n<p style=\"margin-left:17%;\">Make a snapshot of occupancy of shared buffer for specified devlink device.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">devlink sb occupancy show pci\/0000:03:00.0\/1<\/p>\n<p style=\"margin-left:17%;\">Show occupancy for specified port from the snapshot.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">sudo devlink sb occupancy clearmax pci\/0000:03:00.0<\/p>\n<p style=\"margin-left:17%;\">Clear watermarks for shared buffer of specified devlink device.<\/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-port<\/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\">Jiri Pirko <jiri@mellanox.com><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  devlink-sb \u2212 devlink shared buffer 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,273,4],"class_list":["post-3128","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-devlink-sb","tag-man8"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3128","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=3128"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3128\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}