From: Parav Pandit <parav@mellanox.com>
To: netdev@vger.kernel.org
Cc: stephen@networkplumber.org, dsahern@kernel.org,
jiri@mellanox.com, parav@mellanox.com
Subject: [PATCH net-next iproute2 2/2] devlink: Introduce devlink port flavour virtual
Date: Tue, 3 Mar 2020 22:06:26 -0600 [thread overview]
Message-ID: <20200304040626.26320-3-parav@mellanox.com> (raw)
In-Reply-To: <20200304040626.26320-1-parav@mellanox.com>
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>
---
devlink/devlink.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/devlink/devlink.c b/devlink/devlink.c
index 6e2115b6..ea9f54c9 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>";
}
--
2.19.2
next prev parent reply other threads:[~2020-03-04 4:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-04 4:06 [PATCH net-next iproute2 0/2] devlink: Introduce devlink port flavour virtual Parav Pandit
2020-03-04 4:06 ` [PATCH net-next iproute2 1/2] Update devlink kernel header Parav Pandit
2020-03-06 0:42 ` Jacob Keller
2020-03-06 0:43 ` David Ahern
2020-03-06 0:55 ` Jacob Keller
2020-03-06 0:44 ` Jacob Keller
2020-03-04 4:06 ` Parav Pandit [this message]
2020-03-04 19:48 ` [PATCH net-next iproute2 2/2] devlink: Introduce devlink port flavour virtual David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200304040626.26320-3-parav@mellanox.com \
--to=parav@mellanox.com \
--cc=dsahern@kernel.org \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).