]> git.proxmox.com Git - mirror_iproute2.git/commit
devlink: Show controller number of a devlink port
authorParav Pandit <parav@nvidia.com>
Fri, 18 Sep 2020 10:16:49 +0000 (13:16 +0300)
committerDavid Ahern <dsahern@gmail.com>
Wed, 23 Sep 2020 02:13:09 +0000 (20:13 -0600)
commit748cbad33b8d8a76e83266429ffb7bdeaf18f9f9
tree4067885421d3a2518c72bd5df4bb11f05703f398
parent8fadd0110140883f5b390b63fe784c8304c29de2
devlink: Show controller number of a devlink port

Show the controller number of the devlink port whenever kernel reports
it.

Example of a PCI VF port for an external controller number 1:

$ devlink port show pci/0000:06:00.0/2
pci/0000:06:00.0/2: type eth netdev ens2f0c1pf0vf1 flavour pcivf controller 1 pfnum 0 vfnum 1 external true splittable false
  function:
    hw_addr 00:00:00:00:00:00

$ devlink port show pci/0000:06:00.0/2 -jp
{
    "port": {
        "pci/0000:06:00.0/2": {
            "type": "eth",
            "netdev": "ens2f0c1pf0vf1",
            "flavour": "pcivf",
            "controller": 1,
            "pfnum": 0,
            "vfnum": 1,
            "external": true,
            "splittable": false,
            "function": {
                "hw_addr": "00:00:00:00:00:00"
            }
        }
    }
}

Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
devlink/devlink.c