]> git.baikalelectronics.ru Git - kernel.git/commit
devlink: Introduce PCI PF port flavour and port attribute
authorParav Pandit <parav@mellanox.com>
Tue, 9 Jul 2019 04:17:37 +0000 (23:17 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jul 2019 19:02:13 +0000 (12:02 -0700)
commita4424f4c1297391fa5ae938a443b3e1e6492390e
treeb046535d64eab29dcf0fba96d9b81eed33b5fb92
parentc1b2a8252d1ad22938340105e0d7c2d265524704
devlink: Introduce PCI PF port flavour and port attribute

In an eswitch, PCI PF may have port which is normally represented
using a representor netdevice.
To have better visibility of eswitch port, its association with
PF and a representor netdevice, introduce a PCI PF port
flavour and port attriute.

When devlink port flavour is PCI PF, fill up PCI PF attributes of the
port.

Extend port name creation using PCI PF number on best effort basis.
So that vendor drivers can skip defining their own scheme.

$ devlink port show
pci/0000:05:00.0/0: type eth netdev eth0 flavour pcipf pfnum 0

Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
include/uapi/linux/devlink.h
net/core/devlink.c