From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B255C43381 for ; Wed, 20 Mar 2019 17:29:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 282CF21873 for ; Wed, 20 Mar 2019 17:29:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726295AbfCTR3r convert rfc822-to-8bit (ORCPT ); Wed, 20 Mar 2019 13:29:47 -0400 Received: from mga01.intel.com ([192.55.52.88]:46452 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727400AbfCTR3q (ORCPT ); Wed, 20 Mar 2019 13:29:46 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2019 10:29:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,249,1549958400"; d="scan'208";a="154140984" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by fmsmga004.fm.intel.com with ESMTP; 20 Mar 2019 10:29:45 -0700 Received: from orsmsx113.amr.corp.intel.com (10.22.240.9) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 20 Mar 2019 10:29:45 -0700 Received: from orsmsx105.amr.corp.intel.com ([169.254.2.119]) by ORSMSX113.amr.corp.intel.com ([169.254.9.249]) with mapi id 14.03.0415.000; Wed, 20 Mar 2019 10:29:44 -0700 From: "Abodunrin, Akeem G" To: Jiri Pirko , Parav Pandit CC: Jakub Kicinski , "davem@davemloft.net" , "oss-drivers@netronome.com" , "netdev@vger.kernel.org" Subject: RE: [PATCH net-next 2/8] devlink: add PF and VF port flavours Thread-Topic: [PATCH net-next 2/8] devlink: add PF and VF port flavours Thread-Index: AQHUzgCjdfawTK7NpkqagSYiKIzc1aX0FrUAgAdhYACAACpBAIAZRVIg Date: Wed, 20 Mar 2019 17:29:44 +0000 Message-ID: References: <20190226182436.23811-1-jakub.kicinski@netronome.com> <20190226182436.23811-3-jakub.kicinski@netronome.com> <20190227121644.GA2240@nanopsycho> <20190304073018.GT2314@nanopsycho> In-Reply-To: <20190304073018.GT2314@nanopsycho> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDYwNjBmZWUtZmU1YS00OTc0LTgxOWEtYTY0ZTc3YjY3OWQ1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib1JTZTVBdXdPODdzWmN0K2lcLzhlXC9UaU5KdXkzZTNxUUlkOWVcL2ViSnNFYkdVVnFHckFkb2dLVFRueCtkaHJIUCJ9 dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > -----Original Message----- > From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] > On Behalf Of Jiri Pirko > Sent: Sunday, March 03, 2019 11:30 PM > To: Parav Pandit > Cc: Jakub Kicinski ; davem@davemloft.net; > oss-drivers@netronome.com; netdev@vger.kernel.org > Subject: Re: [PATCH net-next 2/8] devlink: add PF and VF port flavours > > Mon, Mar 04, 2019 at 05:59:04AM CET, parav@mellanox.com wrote: > > > > > >> -----Original Message----- > >> From: netdev-owner@vger.kernel.org On > >> Behalf Of Jiri Pirko > >> Sent: Wednesday, February 27, 2019 6:17 AM > >> To: Jakub Kicinski > >> Cc: davem@davemloft.net; oss-drivers@netronome.com; > >> netdev@vger.kernel.org > >> Subject: Re: [PATCH net-next 2/8] devlink: add PF and VF port > >> flavours > >> > >> Tue, Feb 26, 2019 at 07:24:30PM CET, jakub.kicinski@netronome.com wrote: > >> >Current port flavours cover simple switches and DSA. Add PF and VF > >> >flavours to cover "switchdev" SR-IOV NICs. > >> > > >> >Example devlink user space output: > >> > > >> >$ devlink port > >> >pci/0000:82:00.0/0: type eth netdev p4p1 flavour physical > >> >pci/0000:82:00.0/10000: type eth netdev eth0 flavour pcie_pf pf 0 > >> >pci/0000:82:00.0/10001: type eth netdev eth1 flavour pcie_vf pf 0 vf > >> >0 > >> >pci/0000:82:00.0/10002: type eth netdev eth2 flavour pcie_vf pf 0 vf > >> >1 > >> > >A given port is of its parent device. > >In current scenario, its PF or VF. > >Hence it should be device attribute and not a port attribute. > > I think that this works. You have VF_rep ports, PF_rep ports and PHYSICAL ports. > In mlxsw for example, there are only PHYSICAL ports. > In sr-iov world, there is also a PHYSICAL port on the eswitch. The others are > either facing PF of VF. Looks accurate. I don't see any need for "devlink dev" > flavour. I see what you're trying to do here, with VF_rep ports being independent of PF_rep ports and PHYSICAL ports - however, my question is how do you categorize VF_rep ports of the same parent PF physical ports (say you have multi-port device, with 2 or more PFs), at least for identification purposes per physical port? Do we need to have pci_vf_number appended to physical port number? Thanks, ~Akeem > > > >So devlink dev show command have to show what device flavour is. > >Is it well known PCI VF or PF or something else. > >It will show subdev device attribute and its parent PCI (PF/VF) devlink device. > >So we should have device flovour as PCI_PF or PCI_VF or SUBDEV. > > > >Again VF number showcasing here is very restrictive model. > >Every PF/VF/Subdev represents its own 'port' and it is connected to eswitch > 'port'. > >Instead of showing VF here, it must be this 'port' or 'link' number that gives > right view. > >Which netdev represents which VF is already linked in the VF rep-netdev sysfs > property. > > I think you confuse the eswtich ports (in Jakub's output it's them) and the actual > VF. > > > > > >So flavour should be something like 'hostport' and when port is registered for > the eswitch side it should be 'switchport'. > >With this there is very clear picture of which hostport is connected to which > eswitch port. > >Just like how we see in the physical world. > >