• Parav Pandit's avatar
    devlink: Introduce external controller flag · 05b595e9
    Parav Pandit authored
    A devlink eswitch port may represent PCI PF/VF ports of a controller.
    
    A controller either located on same system or it can be an external
    controller located in host where such NIC is plugged in.
    
    Add the ability for driver to specify if a port is for external
    controller.
    
    Use such flag in the mlx5_core driver.
    
    An example of an external controller having VF1 of PF0 belong to
    controller 1.
    
    $ devlink port show pci/0000:06:00.0/2
    pci/0000:06:00.0/2: type eth netdev ens2f0pf0vf1 flavour pcivf 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": "ens2f0pf0vf1",
                "flavour": "pcivf",
                "pfnum": 0,
                "vfnum": 1,
                "external": true,
                "splittable": false,
                "function": {
                    "hw_addr": "00:00:00:00:00:00"
                }
            }
        }
    }
    Signed-off-by: default avatarParav Pandit <parav@nvidia.com>
    Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    05b595e9
devlink.h 16.1 KB