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=-2.5 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT 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 C7E85C43381 for ; Thu, 21 Mar 2019 12:37:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8F36221915 for ; Thu, 21 Mar 2019 12:37:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="mxMffVgv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728190AbfCUMhW (ORCPT ); Thu, 21 Mar 2019 08:37:22 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:35904 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727986AbfCUMhV (ORCPT ); Thu, 21 Mar 2019 08:37:21 -0400 Received: by mail-wm1-f67.google.com with SMTP id h18so2530419wml.1 for ; Thu, 21 Mar 2019 05:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vPBQm1QcJGxggggo73ZGe48FgGRxnzhvDm15/isuu2Y=; b=mxMffVgvLRiUIw11WCZr0IQ7mP5JNJ+nyVVi046G0yZLJ/+VZSfLi8JgDwF/shuWgW AAj+LX72vz4WzpFSPgqr2AwyAKiVnF4/ZoN4qc5irLL1GVPUckwpP4DwCIJmbcNUklqg MP+9SSu4H3Ube5WTB+pWvYhFebp8TX5ziOpzXYI6Z4eutMEoFAisGupaCs59Rgq8ZBZ9 MUb3P5M5zDWldKuN5vyRt/AV2e/WPs0oGz9/9EtwFEVFvGSIsCuysAdFhAMFHGLYvZB1 7A9opkKgoIG5/yWsYhW5/ujyTQNsyDgWbQ8CK5oUoljNm7ptfF36fcoUAt/1OmKl6gx3 DBww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vPBQm1QcJGxggggo73ZGe48FgGRxnzhvDm15/isuu2Y=; b=ts30QQ2laRrYWTHx1R3ARlcvM0tdGdbGPQtrPZEaocnf0IayL3nKe3eweJSKcl/oL0 C7T+IOnKC1QU7g3NV/fxDFLGEtL3xU5/bsGblgX3Arh0uMck0rpBvwNOi8cG3JeIle5a OaI7l66Ol7T4J7oLngD8oOL9CD0ok8Ol3NfvW8TpMCPwcj+eKRxqMPeYvDzySY+cwEPo uSYdFtq6gs79tui1jyCvtixe8Iy0GI4qPr4FeazeFPkOu0FaYru/eEmVm4XJCwVqzfz8 W30nwaGHax3pU7qrSJFrOPrqfhF/TpJznEPH7uPcwrY25Pd7iu5i7emuFXOHcWjoyDMS P9ug== X-Gm-Message-State: APjAAAX082J5OzDb9XAYog8Oa7DutRd36h6I+FwFN4X6h32a3Qsz7PPn s1URN00+sV+MA2t5qW7U5q5X0Q== X-Google-Smtp-Source: APXvYqwDI0Vmo0/4uyqmHhR1/u9TL4G/xV1ghtw8KghVJ51Cb8RLeBNOHRiqhtQ5DFVTpG/xpJnMVQ== X-Received: by 2002:a1c:9a41:: with SMTP id c62mr2328174wme.108.1553171839396; Thu, 21 Mar 2019 05:37:19 -0700 (PDT) Received: from localhost ([195.39.71.253]) by smtp.gmail.com with ESMTPSA id k11sm10513327wmk.45.2019.03.21.05.37.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Mar 2019 05:37:18 -0700 (PDT) Date: Thu, 21 Mar 2019 13:26:39 +0100 From: Jiri Pirko To: "Abodunrin, Akeem G" Cc: Parav Pandit , 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 Message-ID: <20190321122639.GE2087@nanopsycho> References: <20190226182436.23811-1-jakub.kicinski@netronome.com> <20190226182436.23811-3-jakub.kicinski@netronome.com> <20190227121644.GA2240@nanopsycho> <20190304073018.GT2314@nanopsycho> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Wed, Mar 20, 2019 at 06:29:44PM CET, akeem.g.abodunrin@intel.com wrote: > > >> -----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? Please wrap your messages at 80 cols. > >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. >> >