{
    "content": [
        {
            "type": "text",
            "text": "# DEVLINK-DEV(8) (man)\n\n**Summary:** devlink-dev - devlink device configuration\n\n**Synopsis:** devlink [ OPTIONS ] dev  { COMMAND | help }\nOPTIONS := { -V[ersion] | -n[no-nice-names] }\ndevlink dev show [ DEV ]\n\n## Examples\n\n- `devlink dev show`\n- `Shows the state of all devlink devices on the system.`\n- `devlink dev show pci/0000:01:00.0`\n- `Shows the state of specified devlink device.`\n- `devlink dev eswitch show pci/0000:01:00.0`\n- `Shows the eswitch mode of specified devlink device.`\n- `devlink dev eswitch set pci/0000:01:00.0 mode switchdev`\n- `Sets the eswitch mode of specified devlink device to switchdev.`\n- `devlink dev param show pci/0000:01:00.0 name maxmacs`\n- `Shows the parameter maxmacs attributes.`\n- `devlink dev param set pci/0000:01:00.0 name internalerrorreset value true cmode runtime`\n- `Sets the parameter internalerrorreset of specified devlink device to true.`\n- `devlink dev reload pci/0000:01:00.0`\n- `Performs hot reload of specified devlink device.`\n- `devlink dev flash pci/0000:01:00.0 file firmware.bin`\n- `Flashes the specified devlink device with provided firmware file name. If the driver sup‐`\n- `ports it, user gets updates about the flash status. For example:`\n- `Preparing to flash`\n- `Flashing 100%`\n- `Flashing done`\n\n## See Also\n\n- devlink(8)\n- devlink-port(8)\n- devlink-sb(8)\n- devlink-monitor(8)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (7 lines) — 1 subsections\n  - devlink dev help (18 lines)\n- **DESCRIPTION** (1 lines) — 8 subsections\n  - devlink dev show - display devlink device attributes (7 lines)\n  - devlink dev eswitch show - display devlink device eswitch at (1 lines)\n  - devlink dev eswitch set - sets devlink device eswitch attrib (29 lines)\n  - devlink dev param set - set new value to devlink device conf (22 lines)\n  - devlink dev param show - display devlink device supported co (4 lines)\n  - devlink dev reload - perform hot reload of the driver. (26 lines)\n  - devlink dev info - display device information. (12 lines)\n  - devlink dev flash - write device's non-volatile memory. (11 lines)\n- **EXAMPLES** (29 lines)\n- **SEE ALSO** (3 lines)\n- **AUTHOR** (5 lines)\n\n## Full Content\n\n### NAME\n\ndevlink-dev - devlink device configuration\n\n### SYNOPSIS\n\ndevlink [ OPTIONS ] dev  { COMMAND | help }\n\n\nOPTIONS := { -V[ersion] | -n[no-nice-names] }\n\ndevlink dev show [ DEV ]\n\n#### devlink dev help\n\ndevlink dev eswitch set DEV [ mode { legacy | switchdev } ] [ inline-mode { none | link |\nnetwork | transport } ] [ encap-mode { none | basic } ]\n\ndevlink dev eswitch show DEV\n\ndevlink dev param set DEV name PARAMETER value VALUE cmode { runtime | driverinit | permanent\n}\n\ndevlink dev param show [ DEV name PARAMETER ]\n\ndevlink dev reload DEV [ netns { PID | NAME | ID } ] [ action { driverreinit | fwactivate }\n] [ limit noreset ]\n\ndevlink dev info [ DEV ]\n\ndevlink dev flash DEV file PATH [ target ID ]\n\n### DESCRIPTION\n\n#### devlink dev show - display devlink device attributes\n\nDEV - specifies the devlink device to show.  If this argument is omitted all devices are\nlisted.\n\nFormat is:\nBUSNAME/BUSADDRESS\n\n#### devlink dev eswitch show - display devlink device eswitch attributes\n\n#### devlink dev eswitch set - sets devlink device eswitch attributes\n\nmode { legacy | switchdev }\nSet eswitch mode\n\nlegacy - Legacy SRIOV\n\nswitchdev - SRIOV switchdev offloads\n\n\ninline-mode { none | link | network | transport }\nSome HWs need the VF driver to put part of the packet headers on the TX descriptor so\nthe e-switch can do proper matching and steering.\n\nnone - None\n\nlink - L2 mode\n\nnetwork - L3 mode\n\ntransport - L4 mode\n\n\nencap-mode { none | basic }\nSet eswitch encapsulation support\n\nnone - Disable encapsulation support\n\nbasic - Enable encapsulation support\n\n#### devlink dev param set - set new value to devlink device configuration parameter\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#### devlink dev param show - display devlink device supported configuration parameters attributes\n\nname PARAMETER Specify parameter name to show.  If this argument is omitted all parameters\nsupported by devlink devices are listed.\n\n#### devlink dev reload - perform hot reload of the driver.\n\nDEV - Specifies the devlink device to reload.\n\nnetns { PID | NAME | ID } - Specifies the network namespace to reload into, either by pid,\nname or id.\n\naction { driverreinit | fwactivate } - Specifies the reload action required.  If this argu‐\nment is omitted driverreinit action will be used.  Note that even though user asks for a\nspecific action, the driver implementation might require to perform another action alongside\nwith it. For example, some driver do not support driver reinitialization being performed\nwithout fw activation. Therefore, the devlink reload command returns the list of actions\nwhich were actrually performed.\n\ndriverreinit - Driver entities re-initialization, applying devlink-param and devlink-re‐\nsource values.\n\nfwactivate - Activates new firmware if such image is stored and pending activation. If no\nlimitation specified this action may involve firmware reset. If no new image pending this ac‐\ntion will reload current firmware image.\n\nlimit noreset - Specifies limitation on reload action.  If this argument is omitted limit is\nunspecificed and the reload action is not limited. In such case driver implementation may in‐\nclude reset or downtime as needed to perform the actions.\n\nnoreset - No reset allowed, no down time allowed, no link flap and no configuration is lost.\n\n#### devlink dev info - display device information.\n\nDisplay device information provided by the driver. This command can be used to query versions\nof the hardware components or device components which can't be updated ( fixed ) as well as\ndevice firmware which can be updated. For firmware components running displays the versions\nof firmware currently loaded into the device, while stored reports the versions in device's\nflash.  Running and stored versions may differ after flash has been updated, but before re‐\nboot.\n\n\nDEV - specifies the devlink device to show.  If this argument is omitted all devices are\nlisted.\n\n#### devlink dev flash - write device's non-volatile memory.\n\nDEV - specifies the devlink device to write to.\n\nfile PATH - Path to the file which will be written into device's flash. The path needs to be\nrelative to one of the directories searched by the kernel firmware loaded, such as\n/lib/firmware.\n\ncomponent NAME - If device stores multiple firmware images in non-volatile memory, this pa‐\nrameter may be used to indicate which firmware image should be written.  The value of NAME\nshould match the component names from devlink dev info and may be driver-dependent.\n\n### EXAMPLES\n\ndevlink dev show\nShows the state of all devlink devices on the system.\n\ndevlink dev show pci/0000:01:00.0\nShows the state of specified devlink device.\n\ndevlink dev eswitch show pci/0000:01:00.0\nShows the eswitch mode of specified devlink device.\n\ndevlink dev eswitch set pci/0000:01:00.0 mode switchdev\nSets the eswitch mode of specified devlink device to switchdev.\n\ndevlink dev param show pci/0000:01:00.0 name maxmacs\nShows the parameter maxmacs attributes.\n\ndevlink dev param set pci/0000:01:00.0 name internalerrorreset value true cmode runtime\nSets the parameter internalerrorreset of specified devlink device to true.\n\ndevlink dev reload pci/0000:01:00.0\nPerforms hot reload of specified devlink device.\n\ndevlink dev flash pci/0000:01:00.0 file firmware.bin\nFlashes the specified devlink device with provided firmware file name. If the driver sup‐\nports it, user gets updates about the flash status. For example:\nPreparing to flash\nFlashing 100%\nFlashing done\n\n### SEE ALSO\n\ndevlink(8), devlink-port(8), devlink-sb(8), devlink-monitor(8),\n\n### AUTHOR\n\nJiri Pirko <jiri@mellanox.com>\n\n\n\niproute2                                     14 Mar 2016                              DEVLINK-DEV(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "DEVLINK-DEV",
        "section": "8",
        "mode": "man",
        "summary": "devlink-dev - devlink device configuration",
        "synopsis": "devlink [ OPTIONS ] dev  { COMMAND | help }\nOPTIONS := { -V[ersion] | -n[no-nice-names] }\ndevlink dev show [ DEV ]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "devlink dev show",
            "Shows the state of all devlink devices on the system.",
            "devlink dev show pci/0000:01:00.0",
            "Shows the state of specified devlink device.",
            "devlink dev eswitch show pci/0000:01:00.0",
            "Shows the eswitch mode of specified devlink device.",
            "devlink dev eswitch set pci/0000:01:00.0 mode switchdev",
            "Sets the eswitch mode of specified devlink device to switchdev.",
            "devlink dev param show pci/0000:01:00.0 name maxmacs",
            "Shows the parameter maxmacs attributes.",
            "devlink dev param set pci/0000:01:00.0 name internalerrorreset value true cmode runtime",
            "Sets the parameter internalerrorreset of specified devlink device to true.",
            "devlink dev reload pci/0000:01:00.0",
            "Performs hot reload of specified devlink device.",
            "devlink dev flash pci/0000:01:00.0 file firmware.bin",
            "Flashes the specified devlink device with provided firmware file name. If the driver sup‐",
            "ports it, user gets updates about the flash status. For example:",
            "Preparing to flash",
            "Flashing 100%",
            "Flashing done"
        ],
        "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"
            },
            {
                "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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 7,
                "subsections": [
                    {
                        "name": "devlink dev help",
                        "lines": 18
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 1,
                "subsections": [
                    {
                        "name": "devlink dev show - display devlink device attributes",
                        "lines": 7
                    },
                    {
                        "name": "devlink dev eswitch show - display devlink device eswitch attributes",
                        "lines": 1
                    },
                    {
                        "name": "devlink dev eswitch set - sets devlink device eswitch attributes",
                        "lines": 29
                    },
                    {
                        "name": "devlink dev param set - set new value to devlink device configuration parameter",
                        "lines": 22
                    },
                    {
                        "name": "devlink dev param show - display devlink device supported configuration parameters attributes",
                        "lines": 4
                    },
                    {
                        "name": "devlink dev reload - perform hot reload of the driver.",
                        "lines": 26
                    },
                    {
                        "name": "devlink dev info - display device information.",
                        "lines": 12
                    },
                    {
                        "name": "devlink dev flash - write device's non-volatile memory.",
                        "lines": 11
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 29,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}