{
    "mode": "man",
    "parameter": "devlink-port",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/devlink-port/8/json",
    "generated": "2026-06-16T03:24:42Z",
    "synopsis": "devlink [ OPTIONS ] port  { COMMAND | help }\nOPTIONS := { -V[ersion] | -n[no-nice-names] }\ndevlink port set DEV/PORTINDEX [ type { eth | ib | auto } ]\ndevlink port split DEV/PORTINDEX count COUNT\ndevlink port unsplit DEV/PORTINDEX\ndevlink port show [ DEV/PORTINDEX ]\ndevlink port health { show | recover | diagnose | dump | set }\ndevlink port add { DEV | DEV/PORTINDEX } [ flavour FLAVOUR ] [ pfnum PFNUMBER ] [ sfnum\nSFNUMBER ] [ controller CNUM ]\ndevlink port del DEV/PORTINDEX\ndevlink port function set DEV/PORTINDEX [ hwaddr ADDR ] [ state { active | inactive } ]\ndevlink port function rate { show | set | add | del | help }\ndevlink dev param set DEV/PORTINDEX name PARAMETER value VALUE cmode { runtime | driverinit\n| permanent }\ndevlink dev param show [ DEV/PORTINDEX name PARAMETER ]",
    "sections": {
        "NAME": {
            "content": "devlink-port - devlink port configuration\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "devlink [ OPTIONS ] port  { COMMAND | help }\n\n\nOPTIONS := { -V[ersion] | -n[no-nice-names] }\n\ndevlink port set DEV/PORTINDEX [ type { eth | ib | auto } ]\n\ndevlink port split DEV/PORTINDEX count COUNT\n\ndevlink port unsplit DEV/PORTINDEX\n\ndevlink port show [ DEV/PORTINDEX ]\n\ndevlink port health { show | recover | diagnose | dump | set }\n\ndevlink port add { DEV | DEV/PORTINDEX } [ flavour FLAVOUR ] [ pfnum PFNUMBER ] [ sfnum\nSFNUMBER ] [ controller CNUM ]\n\ndevlink port del DEV/PORTINDEX\n\ndevlink port function set DEV/PORTINDEX [ hwaddr ADDR ] [ state { active | inactive } ]\n\ndevlink port function rate { show | set | add | del | help }\n\ndevlink dev param set DEV/PORTINDEX name PARAMETER value VALUE cmode { runtime | driverinit\n| permanent }\n\ndevlink dev param show [ DEV/PORTINDEX name PARAMETER ]\n",
            "subsections": [
                {
                    "name": "devlink port help",
                    "content": ""
                }
            ]
        },
        "DESCRIPTION": {
            "content": "",
            "subsections": [
                {
                    "name": "devlink port set - change devlink port attributes",
                    "content": "DEV/PORTINDEX - specifies the devlink port to operate on.\n\nFormat is:\nBUSNAME/BUSADDRESS/PORTINDEX\n\n\ntype { eth | ib | auto }\nset port type\n\neth - Ethernet\n\nib - Infiniband\n\nauto - autoselect\n\n"
                },
                {
                    "name": "devlink port split - split devlink port into more",
                    "content": "DEV/PORTINDEX - specifies the devlink port to operate on.\n\n\ncount COUNT\nnumber of ports to split to.\n\n"
                },
                {
                    "name": "devlink port unsplit - unsplit previously split devlink port",
                    "content": "Could be performed on any split port of the same split group.\n\n\nDEV/PORTINDEX - specifies the devlink port to operate on.\n\n"
                },
                {
                    "name": "devlink port show - display devlink port attributes",
                    "content": "DEV/PORTINDEX - specifies the devlink port to show.  If this argument is omitted all ports\nare listed.\n\n"
                },
                {
                    "name": "devlink port health - devlink health reporting and recovery",
                    "content": "Is an alias for devlink-health(8).\n\n"
                },
                {
                    "name": "devlink port add - add a devlink port",
                    "content": "DEV - specifies the devlink device to operate on. or\n\n\nDEV/PORTINDEX - specifies the devlink port index to use for the requested new port.  This is\noptional. When omitted, driver allocates unique port index.\n\n\nflavour { pcipf | pcisf }\nset port flavour\n\npcipf - PCI PF port\n\npcisf - PCI SF port\n\n\npfnum PFNUMBER\nSpecifies PCI pfnumber to use on which a SF device to create\n\n\nsfnum SFNUMBER\nSpecifies sfnumber to assign to the device of the SF.  This field is optional for\nthose devices which supports auto assignment of the SF number.\n\n\ncontroller CNUM\nSpecifies controller number for which the SF port is created.  This field is optional.\nIt is used only when SF port is created for the external controller.\n\n"
                },
                {
                    "name": "devlink port function set - Set the port function attribute(s).",
                    "content": "DEV/PORTINDEX - specifies the devlink port to operate on.\n\n\nhwaddr ADDR\nHardware address of the function to set. This is a Ethernet MAC address when port type\nis Ethernet.\n\n\nstate { active | inactive }\nNew state of the function to change to.\n\nactive - Once configuration of the function is done, activate the function.\n\ninactive - To inactivate the function and its device(s), set to inactive.\n\n"
                },
                {
                    "name": "devlink port del - delete a devlink port",
                    "content": "DEV/PORTINDEX - specifies the devlink port to delete.\n\n"
                },
                {
                    "name": "devlink port param set - set new value to devlink port configuration parameter",
                    "content": "DEV/PORTINDEX - specifies the devlink port to operate on.\n\n\nname PARAMETER\nSpecify parameter name to set.\n\n\nvalue VALUE\nNew value to set.\n\n\ncmode { runtime | driverinit | permanent }\nConfiguration mode in which the new value is set.\n\nruntime - Set new value while driver is running. This configuration mode doesn't re‐\nquire any reset to apply the new value.\n\ndriverinit - Set new value which will be applied during driver initialization. This\nconfiguration mode requires restart driver by devlink reload command to apply the new\nvalue.\n\npermanent - New value is written to device's non-volatile memory. This configuration\nmode requires hard reset to apply the new value.\n\n"
                },
                {
                    "name": "devlink port param show - display devlink port supported configuration parameters attributes",
                    "content": "DEV/PORTINDEX - specifies the devlink port to operate on.\n\nname PARAMETER Specify parameter name to show.  If this argument, as well as port index, are\nomitted - all parameters supported by devlink device ports are listed.\n\n"
                },
                {
                    "name": "devlink port function rate - manage devlink rate objects",
                    "content": "Is an alias for devlink-rate(8).\n\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "devlink port show\nShows the state of all devlink ports on the system.\n\ndevlink port show pci/0000:01:00.0/1\nShows the state of specified devlink port.\n\ndevlink port set pci/0000:01:00.0/1 type eth\nSet type of specified devlink port to Ethernet.\n\ndevlink port split pci/0000:01:00.0/1 count 4\nSplit the specified devlink port into four ports.\n\ndevlink port unsplit pci/0000:01:00.0/1\nUnplit the specified previously split devlink port.\n\ndevlink port health show\nShows status and configuration of all supported reporters registered on all devlink\nports.\n\ndevlink port health show pci/0000:01:00.0/1 reporter tx\nShows status and configuration of tx reporter registered on pci/0000:01:00.0/1 devlink\nport.\n\ndevlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88\nAdd a devlink port of flavour PCI SF on PCI PF having number 0 with SF number 88.  To\nmake use of the function an example sequence is to add a port, configure the function at‐\ntribute and activate the function. Once function usage is completed, inactivate the func‐\ntion and finally delete the port. When there is desire to reuse the port without dele‐\ntion, it can be reconfigured and activated again when function is in inactive state and\nfunction's operational state is detached.\n\ndevlink port del pci/0000:06:00.0/1\nDelete previously created devlink port. It is recommended to first deactivate the func‐\ntion if the function supports state management.\n\ndevlink port function set pci/0000:01:00.0/1 hwaddr 00:00:00:11:22:33\nConfigure hardware address of the PCI function represented by devlink port.  If the port\nsupports change in function state, hardware address must be configured before activating\nthe function.\n\ndevlink port function set pci/0000:01:00.0/1 state active\nActivate the function. This will initiate the function enumeration and driver loading.\n\ndevlink port function set pci/0000:01:00.0/1 state inactive\nDeactivate the function. This will initiate the function teardown which results in driver\nunload and device removal.\n\ndevlink port function set pci/0000:01:00.0/1 hwaddr 00:00:00:11:22:33 state active\nConfigure hardware address and also active the function. When a function is activated to‐\ngether with other configuration in a single command, all the configuration is applied\nfirst before changing the state to active.\n\ndevlink dev param show\nShows (dumps) all the port parameters across all the devices registered in the devlink.\n\ndevlink dev param set pci/0000:01:00.0/1 name internalerrorreset value true cmode runtime\nSets the parameter internalerrorreset of specified devlink port (#1) to true.\n\ndevlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88 controller 1\nAdd a devlink port of flavour PCI SF on controller 1 which has PCI PF of number 0 with SF\nnumber 88. To make use of the function an example sequence is to add a port, configure\nthe function attribute and activate the function. Once the function usage is completed,\ndeactivate the function and finally delete the port. When there is desire to reuse the\nport without deletion, it can be reconfigured and activated again when function is in in‐\nactive state and function's operational state is detached.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "devlink(8), devlink-dev(8), devlink-sb(8), devlink-monitor(8), devlink-health(8),\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Jiri Pirko <jiri@mellanox.com>\n\n\n\niproute2                                     14 Mar 2016                             DEVLINK-PORT(8)",
            "subsections": []
        }
    },
    "summary": "devlink-port - devlink port configuration",
    "flags": [],
    "examples": [
        "devlink port show",
        "Shows the state of all devlink ports on the system.",
        "devlink port show pci/0000:01:00.0/1",
        "Shows the state of specified devlink port.",
        "devlink port set pci/0000:01:00.0/1 type eth",
        "Set type of specified devlink port to Ethernet.",
        "devlink port split pci/0000:01:00.0/1 count 4",
        "Split the specified devlink port into four ports.",
        "devlink port unsplit pci/0000:01:00.0/1",
        "Unplit the specified previously split devlink port.",
        "devlink port health show",
        "Shows status and configuration of all supported reporters registered on all devlink",
        "ports.",
        "devlink port health show pci/0000:01:00.0/1 reporter tx",
        "Shows status and configuration of tx reporter registered on pci/0000:01:00.0/1 devlink",
        "port.",
        "devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88",
        "Add a devlink port of flavour PCI SF on PCI PF having number 0 with SF number 88.  To",
        "make use of the function an example sequence is to add a port, configure the function at‐",
        "tribute and activate the function. Once function usage is completed, inactivate the func‐",
        "tion and finally delete the port. When there is desire to reuse the port without dele‐",
        "tion, it can be reconfigured and activated again when function is in inactive state and",
        "function's operational state is detached.",
        "devlink port del pci/0000:06:00.0/1",
        "Delete previously created devlink port. It is recommended to first deactivate the func‐",
        "tion if the function supports state management.",
        "devlink port function set pci/0000:01:00.0/1 hwaddr 00:00:00:11:22:33",
        "Configure hardware address of the PCI function represented by devlink port.  If the port",
        "supports change in function state, hardware address must be configured before activating",
        "the function.",
        "devlink port function set pci/0000:01:00.0/1 state active",
        "Activate the function. This will initiate the function enumeration and driver loading.",
        "devlink port function set pci/0000:01:00.0/1 state inactive",
        "Deactivate the function. This will initiate the function teardown which results in driver",
        "unload and device removal.",
        "devlink port function set pci/0000:01:00.0/1 hwaddr 00:00:00:11:22:33 state active",
        "Configure hardware address and also active the function. When a function is activated to‐",
        "gether with other configuration in a single command, all the configuration is applied",
        "first before changing the state to active.",
        "devlink dev param show",
        "Shows (dumps) all the port parameters across all the devices registered in the devlink.",
        "devlink dev param set pci/0000:01:00.0/1 name internalerrorreset value true cmode runtime",
        "Sets the parameter internalerrorreset of specified devlink port (#1) to true.",
        "devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88 controller 1",
        "Add a devlink port of flavour PCI SF on controller 1 which has PCI PF of number 0 with SF",
        "number 88. To make use of the function an example sequence is to add a port, configure",
        "the function attribute and activate the function. Once the function usage is completed,",
        "deactivate the function and finally delete the port. When there is desire to reuse the",
        "port without deletion, it can be reconfigured and activated again when function is in in‐",
        "active state and function's operational state is detached."
    ],
    "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-sb",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/devlink-sb/8/json"
        },
        {
            "name": "devlink-monitor",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/devlink-monitor/8/json"
        },
        {
            "name": "devlink-health",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/devlink-health/8/json"
        }
    ]
}