aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2020-03-03 22:06:26 -0600
committerDavid Ahern <dsahern@gmail.com>2020-03-04 19:48:11 +0000
commita5c44b821c9a32304c9d8211224e917808d412fe (patch)
treeca887fbc995e48e453fc0cdd9e5bd85122110d7d
parent4fe07b81461bb58cd48720019cd416da39aeadea (diff)
downloadiproute2-a5c44b821c9a32304c9d8211224e917808d412fe.tar.gz
devlink: Introduce devlink port flavour virtual
Currently PCI PF and VF devlink devices register their ports as physical port in non-representors mode. Introduce a new port flavour as virtual so that virtual devices can register 'virtual' flavour to make it more clear to users. An example of one PCI PF and 2 PCI virtual functions, each having one devlink port. $ devlink port show pci/0000:06:00.0/1: type eth netdev ens2f0 flavour physical port 0 pci/0000:06:00.2/1: type eth netdev ens2f2 flavour virtual port 0 pci/0000:06:00.3/1: type eth netdev ens2f3 flavour virtual port 0 Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: David Ahern <dsahern@gmail.com>
-rw-r--r--devlink/devlink.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/devlink/devlink.c b/devlink/devlink.c
index eef27c275..67e6e6418 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -3150,6 +3150,8 @@ static const char *port_flavour_name(uint16_t flavour)
return "pcipf";
case DEVLINK_PORT_FLAVOUR_PCI_VF:
return "pcivf";
+ case DEVLINK_PORT_FLAVOUR_VIRTUAL:
+ return "virtual";
default:
return "<unknown flavour>";
}