From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [RFC] switchdev: clarify ndo_get_phys_port_name() formats Date: Tue, 25 Jul 2017 15:26:47 -0700 Message-ID: <20170725152647.571d1af3@cakuba.netronome.com> References: <20170725051344.2040-1-jakub.kicinski@netronome.com> <20170725152241.GA71091@C02RW35GFVH8.dhcp.broadcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Jiri Pirko , Or Gerlitz , Michael Chan , Sathya Perla , simon.horman@netronome.com, davem@davemloft.net To: Andy Gospodarek Return-path: Received: from mail-pg0-f43.google.com ([74.125.83.43]:34314 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750857AbdGYW0v (ORCPT ); Tue, 25 Jul 2017 18:26:51 -0400 Received: by mail-pg0-f43.google.com with SMTP id 123so75721968pgj.1 for ; Tue, 25 Jul 2017 15:26:51 -0700 (PDT) In-Reply-To: <20170725152241.GA71091@C02RW35GFVH8.dhcp.broadcom.net> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 25 Jul 2017 11:22:41 -0400, Andy Gospodarek wrote: > On Mon, Jul 24, 2017 at 10:13:44PM -0700, Jakub Kicinski wrote: > > We are still in position where we can suggest uniform naming > > convention for ndo_get_phys_port_name(). switchdev.txt file > > already contained a suggestion of how to name external ports. > > Since the use of switchdev for SR-IOV NIC's eswitches is growing, > > establish a format for ports of those devices as well. > > > > Signed-off-by: Jakub Kicinski > > This is a nice addition and I suspect there could be even more done to > update this file to cover the VF rep usage. > > > --- > > Documentation/networking/switchdev.txt | 14 +++++++++++--- > > 1 file changed, 11 insertions(+), 3 deletions(-) > > > > diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt > > index 3e7b946dea27..7c4b6025fb4b 100644 > > --- a/Documentation/networking/switchdev.txt > > +++ b/Documentation/networking/switchdev.txt > > @@ -119,9 +119,17 @@ into 4 10G ports, resulting in 4 port netdevs, the device can give a unique > > SUBSYSTEM=="net", ACTION=="add", ATTR{phys_switch_id}=="", \ > > ATTR{phys_port_name}!="", NAME="swX$attr{phys_port_name}" > > > > -Suggested naming convention is "swXpYsZ", where X is the switch name or ID, Y > > -is the port name or ID, and Z is the sub-port name or ID. For example, sw1p1s0 > > -would be sub-port 0 on port 1 on switch 1. > > +Suggested formats of the port name returned by ndo_get_phys_port_name are: > > + - pA for external ports; > > + - pAsB for split external ports; > > + - pfC for PF ports (so called PF representors); > > + - pfCvfD for VF ports (so called VF representors). > > I hate to clutter this up, but might be also need to add: > > - pfCsB for split PF ports (so called PF representors); > - pfCsBvfD for split VF ports (so called VF representors). > > or are we comfortable that these additions to the name for split ports > are implied? Hm.. What is a split PF port? Splits happen on the physical port - see my rant on the thread this is a reply to ;) PFs are PCIe functions, on the opposite side of the eswitch from the wires.