• Parav Pandit's avatar
    net/devlink: Support setting hardware address of port function · a1e8ae90
    Parav Pandit authored
    PCI PF and VF devlink port can manage the function represented by a
    devlink port.
    
    Allow users to set port function's hardware address.
    
    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:00:00:00:00:00
    
    $ devlink port function set pci/0000:06:00.0/2 hw_addr 00:11:22:33:44:55
    
    $ 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:55
    Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
    Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a1e8ae90
devlink.c 243 KB