{
    "mode": "man",
    "parameter": "DEVLINK-SB",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/DEVLINK-SB/8/json",
    "generated": "2026-05-30T10:08:14Z",
    "synopsis": "devlink [ OPTIONS ] sb  { COMMAND | help }\nOPTIONS := { -V[ersion] | -n[no-nice-names] }\ndevlink sb show [ DEV [ sb SBINDEX ] ]\ndevlink sb pool show [ DEV [ sb SBINDEX ]\npool POOLINDEX ]\ndevlink sb pool set DEV [ sb SBINDEX ]\npool POOLINDEX\nsize POOLSIZE\nthtype { static | dynamic }\ndevlink sb port pool show [ DEV/PORTINDEX [ sb SBINDEX ]\npool POOLINDEX ]\ndevlink sb port pool set DEV/PORTINDEX [ sb SBINDEX ]\npool POOLINDEX\nth THRESHOLD\ndevlink sb tc bind show [ DEV/PORTINDEX [ sb SBINDEX ]\ntc TCINDEX\ntype { ingress | egress } ]\ndevlink sb tc bind set DEV/PORTINDEX [ sb SBINDEX ]\ntc TCINDEX\ntype { ingress | egress }\npool POOLINDEX\nth THRESHOLD\ndevlink sb occupancy show { DEV | DEV/PORTINDEX } [ sb SBINDEX ]\ndevlink sb occupancy snapshot DEV [ sb SBINDEX ]\ndevlink sb occupancy clearmax DEV [ sb SBINDEX ]",
    "sections": {
        "NAME": {
            "content": "devlink-sb - devlink shared buffer configuration\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "devlink [ OPTIONS ] sb  { COMMAND | help }\n\n\nOPTIONS := { -V[ersion] | -n[no-nice-names] }\n\ndevlink sb show [ DEV [ sb SBINDEX ] ]\n\ndevlink sb pool show [ DEV [ sb SBINDEX ]\npool POOLINDEX ]\n\ndevlink sb pool set DEV [ sb SBINDEX ]\npool POOLINDEX\nsize POOLSIZE\nthtype { static | dynamic }\n\ndevlink sb port pool show [ DEV/PORTINDEX [ sb SBINDEX ]\npool POOLINDEX ]\n\ndevlink sb port pool set DEV/PORTINDEX [ sb SBINDEX ]\npool POOLINDEX\nth THRESHOLD\n\ndevlink sb tc bind show [ DEV/PORTINDEX [ sb SBINDEX ]\ntc TCINDEX\ntype { ingress | egress } ]\n\ndevlink sb tc bind set DEV/PORTINDEX [ sb SBINDEX ]\ntc TCINDEX\ntype { ingress | egress }\npool POOLINDEX\nth THRESHOLD\n\ndevlink sb occupancy show { DEV | DEV/PORTINDEX } [ sb SBINDEX ]\n\ndevlink sb occupancy snapshot DEV [ sb SBINDEX ]\n\ndevlink sb occupancy clearmax DEV [ sb SBINDEX ]\n",
            "subsections": [
                {
                    "name": "devlink sb help",
                    "content": ""
                }
            ]
        },
        "DESCRIPTION": {
            "content": "",
            "subsections": [
                {
                    "name": "devlink sb show - display available shared buffers and their attributes",
                    "content": "DEV - specifies the devlink device to show shared buffers.  If this argument is omitted all\nshared buffers of all devices are listed.\n\n\nSBINDEX - specifies the shared buffer.  If this argument is omitted shared buffer with index\n0 is selected.  Behaviour of this argument it the same for every command.\n\n"
                },
                {
                    "name": "devlink sb pool show - display available pools and their attributes",
                    "content": "DEV - specifies the devlink device to show pools.  If this argument is omitted all pools of\nall devices are listed.\n\nDisplay available pools listing their type, size, thtype and cellsize. cellsize is the al‐\nlocation granularity of memory within the shared buffer. Drivers may round up, round down or\nreject size passed to the set command if it is not multiple of cellsize.\n\n"
                },
                {
                    "name": "devlink sb pool set - set attributes of pool",
                    "content": "DEV - specifies the devlink device to set pool.\n\n\nsize POOLSIZE\nsize of the pool in Bytes.\n\n\nthtype { static | dynamic }\npool threshold type.\n\nstatic - Threshold values for the pool will be passed in Bytes.\n\ndynamic - Threshold values (\"toalpha\") for the pool will be used to compute alpha pa‐\nrameter according to formula:\nalpha = 2 ^ (toalpha - 10)\n\nThe range of the passed value is between 0 to 20. The computed alpha is used\nto determine the maximum usage of the flow:\nmaxusage = alpha / (1 + alpha) * FreeBuffer\n\n"
                },
                {
                    "name": "devlink sb port pool show - display port-pool combinations and threshold for each",
                    "content": "DEV/PORTINDEX - specifies the devlink port.\n\n\npool POOLINDEX\npool index.\n\n"
                },
                {
                    "name": "devlink sb port pool set - set port-pool threshold",
                    "content": "DEV/PORTINDEX - specifies the devlink port.\n\n\npool POOLINDEX\npool index.\n\n\nth THRESHOLD\nthreshold value. Type of the value is either Bytes or \"toalpha\", depends on thtype\nset for the pool.\n\n"
                },
                {
                    "name": "devlink sb tc bind show - display port-TC to pool bindings and threshold for each",
                    "content": "DEV/PORTINDEX - specifies the devlink port.\n\n\ntc TCINDEX\nindex of either ingress or egress TC, usually in range 0 to 8 (depends on device).\n\n\ntype { ingress | egress }\nTC type.\n\n"
                },
                {
                    "name": "devlink sb tc bind set - set port-TC to pool binding with specified threshold",
                    "content": "DEV/PORTINDEX - specifies the devlink port.\n\n\ntc TCINDEX\nindex of either ingress or egress TC, usually in range 0 to 8 (depends on device).\n\n\ntype { ingress | egress }\nTC type.\n\n\npool POOLINDEX\nindex of pool to bind this to.\n\n\nth THRESHOLD\nthreshold value. Type of the value is either Bytes or \"toalpha\", depends on thtype\nset for the pool.\n\n"
                },
                {
                    "name": "devlink sb occupancy show - display shared buffer occupancy values for device or port",
                    "content": "This command is used to browse shared buffer occupancy values. Values are showed for every\nport-pool combination as well as for all port-TC combinations (with pool this port-TC is\nbound to). Format of value is:\ncurrentvalue/maxvalue\nNote that before showing values, one has to issue occupancy snapshot command first.\n\n\nDEV - specifies the devlink device to show occupancy values for.\n\nDEV/PORTINDEX - specifies the devlink port to show occupancy values for.\n\n"
                },
                {
                    "name": "devlink sb occupancy snapshot - take occupancy snapshot of shared buffer for device",
                    "content": "This command is used to take a snapshot of shared buffer occupancy values. After that, the\nvalues can be showed using occupancy show command.\n\n\nDEV - specifies the devlink device to take occupancy snapshot on.\n\n"
                },
                {
                    "name": "devlink sb occupancy clearmax - clear occupancy watermarks of shared buffer for device",
                    "content": "This command is used to reset maximal occupancy values reached for whole device. Note that\nbefore browsing reset values, one has to issue occupancy snapshot command.\n\n\nDEV - specifies the devlink device to clear occupancy watermarks on.\n\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "devlink sb show\nList available share buffers.\n\ndevlink sb pool show\nList available pools and their config.\n\ndevlink sb port pool show pci/0000:03:00.0/1 pool 0\nShow port-pool setup for specified port and pool.\n\nsudo devlink sb port pool set pci/0000:03:00.0/1 pool 0 th 15\nChange threshold for port specified port and pool.\n\ndevlink sb tc bind show pci/0000:03:00.0/1 tc 0 type ingress\nShow pool binding and threshold for specified port and TC.\n\nsudo devlink sb tc bind set pci/0000:03:00.0/1 tc 0 type ingress pool 0 th 9\nSet pool binding and threshold for specified port and TC.\n\nsudo devlink sb occupancy snapshot pci/0000:03:00.0\nMake a snapshot of occupancy of shared buffer for specified devlink device.\n\ndevlink sb occupancy show pci/0000:03:00.0/1\nShow occupancy for specified port from the snapshot.\n\nsudo devlink sb occupancy clearmax pci/0000:03:00.0\nClear watermarks for shared buffer of specified devlink device.\n\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "devlink(8), devlink-dev(8), devlink-port(8), devlink-monitor(8),\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Jiri Pirko <jiri@mellanox.com>\n\n\n\niproute2                                     14 Apr 2016                               DEVLINK-SB(8)",
            "subsections": []
        }
    },
    "summary": "devlink-sb - devlink shared buffer configuration",
    "flags": [],
    "examples": [
        "devlink sb show",
        "List available share buffers.",
        "devlink sb pool show",
        "List available pools and their config.",
        "devlink sb port pool show pci/0000:03:00.0/1 pool 0",
        "Show port-pool setup for specified port and pool.",
        "sudo devlink sb port pool set pci/0000:03:00.0/1 pool 0 th 15",
        "Change threshold for port specified port and pool.",
        "devlink sb tc bind show pci/0000:03:00.0/1 tc 0 type ingress",
        "Show pool binding and threshold for specified port and TC.",
        "sudo devlink sb tc bind set pci/0000:03:00.0/1 tc 0 type ingress pool 0 th 9",
        "Set pool binding and threshold for specified port and TC.",
        "sudo devlink sb occupancy snapshot pci/0000:03:00.0",
        "Make a snapshot of occupancy of shared buffer for specified devlink device.",
        "devlink sb occupancy show pci/0000:03:00.0/1",
        "Show occupancy for specified port from the snapshot.",
        "sudo devlink sb occupancy clearmax pci/0000:03:00.0",
        "Clear watermarks for shared buffer of specified devlink device."
    ],
    "see_also": [
        {
            "name": "devlink",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/devlink/8/json"
        },
        {
            "name": "devlink-dev",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/devlink-dev/8/json"
        },
        {
            "name": "devlink-port",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/devlink-port/8/json"
        },
        {
            "name": "devlink-monitor",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/devlink-monitor/8/json"
        }
    ]
}