]> git.proxmox.com Git - mirror_iproute2.git/commit
devlink: Support querying hardware address of port function
authorParav Pandit <parav@mellanox.com>
Tue, 23 Jun 2020 10:44:24 +0000 (10:44 +0000)
committerDavid Ahern <dsahern@kernel.org>
Sun, 5 Jul 2020 14:49:22 +0000 (14:49 +0000)
commitb3adafd15431bf57269d8f1c30bba03885ff5ab2
tree2bde37caba2836297731fd985e2fb29d5c6fb81c
parent2de449df19be72efb581b9b42246955e1529a75c
devlink: Support querying hardware address of port function

Add support to query the hardware address of function represented
by devlink port function.

Example of a PCI VF port which supports a port function:
$ devlink port show pci/0000:06:00.0/2
pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1
  function:
    hw_addr 00:11:22:33:44:66

$ devlink port show pci/0000:06:00.0/2 -jp
{
    "port": {
        "pci/0000:06:00.0/2": {
            "type": "eth",
            "netdev": "enp6s0pf0vf1",
            "flavour": "pcivf",
            "pfnum": 0,
            "vfnum": 1,
            "function": {
                "hw_addr": "00:11:22:33:44:66"
            }
        }
    }
}

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