{
    "mode": "man",
    "parameter": "devlink-rate",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/devlink-rate/8/json",
    "generated": "2026-06-17T19:09:32Z",
    "synopsis": "devlink [ OPTIONS ] port function rate  { COMMAND | help }\nOPTIONS := { -j[son] | -p[retty] | -i[ec] }\ndevlink port function rate show [ { DEV/PORTINDEX | DEV/NODENAME } ]\ndevlink port function rate set { DEV/PORTINDEX | DEV/NODENAME } [ txshare VALUE ] [ txmax\nVALUE ] [ { parent NODENAME | noparent } ]\ndevlink port function rate add DEV/NODENAME [ txshare VALUE ] [ txmax VALUE ] [ { parent\nNODENAME | noparent } ]\ndevlink port function rate del DEV/NODENAME",
    "sections": {
        "NAME": {
            "content": "devlink-rate - devlink rate management\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "devlink [ OPTIONS ] port function rate  { COMMAND | help }\n\n\nOPTIONS := { -j[son] | -p[retty] | -i[ec] }\n\ndevlink port function rate show [ { DEV/PORTINDEX | DEV/NODENAME } ]\n\ndevlink port function rate set { DEV/PORTINDEX | DEV/NODENAME } [ txshare VALUE ] [ txmax\nVALUE ] [ { parent NODENAME | noparent } ]\n\ndevlink port function rate add DEV/NODENAME [ txshare VALUE ] [ txmax VALUE ] [ { parent\nNODENAME | noparent } ]\n\ndevlink port function rate del DEV/NODENAME\n",
            "subsections": [
                {
                    "name": "devlink port function rate help",
                    "content": ""
                }
            ]
        },
        "DESCRIPTION": {
            "content": "",
            "subsections": [
                {
                    "name": "devlink port function rate show - display rate objects.",
                    "content": "Displays specified rate object or, if not specified, all rate objects. Rate object can be\npresented by one of the two types:\n\nleaf    Represents a single devlink port; created/destroyed by the driver and bound to the\ndevlink port. As example, some driver may create leaf rate object for every devlink\nport associated with VF. Since leaf have 1to1 mapping to it's devlink port, in user\nspace it is referred as corresponding devlink port DEV/PORTINDEX;\n\nnode    Represents a group of rate objects; created/deleted by the user (see command below)\nand bound to the devlink device rather then to the devlink port. In userspace it is\nreferred as DEV/NODENAME, where node name can be any, except decimal number, to\navoid collisions with leafs.\n\nCommand output show rate object identifier, it's type and rate values along with parent node\nname. Rate values printed in SI units which are more suitable to represent specific value. To\nprint values in IEC units -i switch is used. JSON (-j) output always print rate values in\nbytes per second. Zero rate values means \"unlimited\" rates and ommited in output, as well as\nparent node name.\n\n"
                },
                {
                    "name": "devlink port function rate set - set rate object parameters.",
                    "content": "Allows set rate object's parameters. If any parameter specified multiple times the last oc‐\ncurrence is used.\n\nDEV/PORTINDEX - specifies devlink leaf rate object.\nDEV/NODENAME - specifies devlink node rate object.\n\ntxshare VALUE - specifies minimal tx rate value shared among all rate objects. If rate ob‐\nject is a part of some rate group, then this value shared with rate objects of this rate\ngroup.\n\ntxmax VALUE - specifies maximum tx rate value.\n\nVALUE   These parameter accept a floating point number, possibly followed by either a unit\n(both SI and IEC units supported).\n\nbit or a bare number\nBits per second\n\nkbit   Kilobits per second\n\nmbit   Megabits per second\n\ngbit   Gigabits per second\n\ntbit   Terabits per second\n\nbps    Bytes per second\n\nkbps   Kilobytes per second\n\nmbps   Megabytes per second\n\ngbps   Gigabytes per second\n\ntbps   Terabytes per second\n\nTo specify in IEC units, replace the SI prefix (k-, m-, g-, t-) with IEC prefix (ki-,\nmi-, gi- and ti-) respectively. Input is case-insensitive.\n\nparent NODENAME | noparent - set rate object parent to existing node with name NODENAME or\nunset parent. Rate limits of the parent node applied to all it's children. Actual behaviour\nis details of driver's implementation. Setting parent to empty (\"\") name due to the kernel\nlogic threated as parent unset.\n\n"
                },
                {
                    "name": "devlink port function rate add - create node rate object with specified parameters.",
                    "content": "Creates rate object of type node and sets parameters. Parameters same as for the \"set\" com‐\nmand.\n\nDEV/NODENAME - specifies the devlink node rate object to create.\n\n"
                },
                {
                    "name": "devlink port function rate del - delete node rate object",
                    "content": "Delete specified devlink node rate object. Node can't be deleted if there is any child, user\nmust explicitly unset the parent.\n\nDEV/NODENAME - specifies devlink node rate object to delete.\n\n"
                },
                {
                    "name": "devlink port function rate help - display usage information",
                    "content": "Display devlink rate usage information\n\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "* Display all rate objects:\n\n# devlink port function rate show\npci/0000:03:00.0/1 type leaf parent somegroup\npci/0000:03:00.0/2 type leaf txshare 12Mbit\npci/0000:03:00.0/somegroup type node txshare 1Gbps txmax 5Gbps\n\n\n* Display leaf rate object bound to the 1st devlink port of the pci/0000:03:00.0 device:\n\n# devlink port function rate show pci/0000:03:00.0/1\npci/0000:03:00.0/1 type leaf\n\n\n* Display leaf rate object rate values using IEC units:\n\n# devlink -i port function rate show pci/0000:03:00.0/2\npci/0000:03:00.0/2 type leaf 11718Kibit\n\n\n* Display node rate object with name somegroup of the pci/0000:03:00.0 device:\n\n# devlink port function rate show pci/0000:03:00.0/somegroup\npci/0000:03:00.0/somegroup type node\n\n\n* Display pci/0000:03:00.0/2 leaf rate object as pretty JSON output:\n\n# devlink -jp port function rate show pci/0000:03:00.0/2\n{\n\"rate\": {\n\"pci/0000:03:00.0/2\": {\n\"type\": \"leaf\",\n\"txshare\": 1500000\n}\n}\n}\n\n\n* Create node rate object with name \"1stgroup\" on pci/0000:03:00.0 device:\n\n# devlink port function rate add pci/0000:03:00.0/1stgroup\n\n\n* Create node rate object with specified parameters:\n\n# devlink port function rate add pci/0000:03:00.0/2ndgroup \\\ntxshare 10Mbit txmax 30Mbit parent 1stgroup\n\n\n* Set parameters to the specified leaf rate object:\n\n# devlink port function rate set pci/0000:03:00.0/1 \\\ntxshare 2Mbit txmax 10Mbit\n\n\n* Set leaf's parent to \"1stgroup\":\n\n# devlink port function rate set pci/0000:03:00.0/1 parent 1stgroup\n\n\n* Unset leaf's parent:\n\n# devlink port function rate set pci/0000:03:00.0/1 noparent\n\n\n* Delete node rate object:\n\n# devlink port function rate del pci/0000:03:00.0/2ndgroup\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "devlink(8), devlink-port(8)\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Dmytro Linkin <dlinkin@nvidia.com>\n\n\n\niproute2                                     12 Mar 2021                             DEVLINK-RATE(8)",
            "subsections": []
        }
    },
    "summary": "devlink-rate - devlink rate management",
    "flags": [],
    "examples": [
        "* Display all rate objects:",
        "# devlink port function rate show",
        "pci/0000:03:00.0/1 type leaf parent somegroup",
        "pci/0000:03:00.0/2 type leaf txshare 12Mbit",
        "pci/0000:03:00.0/somegroup type node txshare 1Gbps txmax 5Gbps",
        "* Display leaf rate object bound to the 1st devlink port of the pci/0000:03:00.0 device:",
        "# devlink port function rate show pci/0000:03:00.0/1",
        "pci/0000:03:00.0/1 type leaf",
        "* Display leaf rate object rate values using IEC units:",
        "# devlink -i port function rate show pci/0000:03:00.0/2",
        "pci/0000:03:00.0/2 type leaf 11718Kibit",
        "* Display node rate object with name somegroup of the pci/0000:03:00.0 device:",
        "# devlink port function rate show pci/0000:03:00.0/somegroup",
        "pci/0000:03:00.0/somegroup type node",
        "* Display pci/0000:03:00.0/2 leaf rate object as pretty JSON output:",
        "# devlink -jp port function rate show pci/0000:03:00.0/2",
        "\"rate\": {",
        "\"pci/0000:03:00.0/2\": {",
        "\"type\": \"leaf\",",
        "\"txshare\": 1500000",
        "* Create node rate object with name \"1stgroup\" on pci/0000:03:00.0 device:",
        "# devlink port function rate add pci/0000:03:00.0/1stgroup",
        "* Create node rate object with specified parameters:",
        "# devlink port function rate add pci/0000:03:00.0/2ndgroup \\",
        "txshare 10Mbit txmax 30Mbit parent 1stgroup",
        "* Set parameters to the specified leaf rate object:",
        "# devlink port function rate set pci/0000:03:00.0/1 \\",
        "txshare 2Mbit txmax 10Mbit",
        "* Set leaf's parent to \"1stgroup\":",
        "# devlink port function rate set pci/0000:03:00.0/1 parent 1stgroup",
        "* Unset leaf's parent:",
        "# devlink port function rate set pci/0000:03:00.0/1 noparent",
        "* Delete node rate object:",
        "# devlink port function rate del pci/0000:03:00.0/2ndgroup"
    ],
    "see_also": [
        {
            "name": "devlink",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/devlink/8/json"
        },
        {
            "name": "devlink-port",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/devlink-port/8/json"
        }
    ]
}