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 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 7E029C43381 for ; Wed, 13 Mar 2019 16:03:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F3BD20643 for ; Wed, 13 Mar 2019 16:03:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726336AbfCMQDS (ORCPT ); Wed, 13 Mar 2019 12:03:18 -0400 Received: from mga05.intel.com ([192.55.52.43]:16907 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725926AbfCMQDS (ORCPT ); Wed, 13 Mar 2019 12:03:18 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2019 09:03:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,474,1544515200"; d="scan'208";a="151368264" Received: from samudral-mobl1.amr.corp.intel.com (HELO [134.134.177.63]) ([134.134.177.63]) by fmsmga002.fm.intel.com with ESMTP; 13 Mar 2019 09:03:18 -0700 Subject: Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports To: Jiri Pirko Cc: Jakub Kicinski , davem@davemloft.net, netdev@vger.kernel.org, oss-drivers@netronome.com References: <20190306122037.GB2819@nanopsycho> <20190306095638.7c028bdd@cakuba.hsd1.ca.comcast.net> <20190307094816.GA2190@nanopsycho> <20190307185202.2db37490@cakuba.hsd1.ca.comcast.net> <20190308145421.GA2888@nanopsycho.orion> <20190308110943.2ee42bc0@cakuba.hsd1.ca.comcast.net> <20190311085204.GA2194@nanopsycho> <20190311191054.36b801d6@cakuba.hsd1.ca.comcast.net> <20190312140239.GA2455@nanopsycho> <7227d58e-ac58-d549-b921-ca0a0dd3f4b0@intel.com> <20190313073702.GA2270@nanopsycho> From: "Samudrala, Sridhar" Message-ID: Date: Wed, 13 Mar 2019 09:03:17 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <20190313073702.GA2270@nanopsycho> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 3/13/2019 12:37 AM, Jiri Pirko wrote: > Wed, Mar 13, 2019 at 07:17:04AM CET, sridhar.samudrala@intel.com wrote: >> >> On 3/12/2019 7:02 AM, Jiri Pirko wrote: >> >>> >>>> >>>>> I originally planned to implement sriov orchestration api in devlink too. >>>> >>>> Interesting, would you mind elaborating? >>> >>> I have to think about it. But something like this: >>> >>> After bootup, you see only physical port, PF switch port and PF host leg. >> >> Is this after changing the eswitch mode to 'switchdev' > > I believe so. For new drivers, this should be default and only option. > > >> >>> $ devlink port show >>> pci/0000:05:00.0/0: type eth netdev enp5s0np0 flavour physical switch_id 00154d130d2 >> >> Is this the uplink port representor? > > Yes > > >> >>> pci/0000:05:00.0/1: type eth netdev ??? flavour pci_pf_host >>> peer pci/0000:05:00.0/10000 >> >> I guess this is PF netdev > > Yes, port > > >> >>> pci/0000:05:00.0/10000: type eth netdev enp5s0npf0pf0s0 flavour pci_pf pf 0 subport 0 >>> switch_id 00154d130d2f peer pci/0000:05:00.0/1 >> >> and this one is PF port representor netdev > > Yes, port > > >> >>> >>> To create new PF subport under PF 0: >>> $ devlink dev port add pci/0000:05:00.0 flavour pci_pf pf 0 >> >> Can we consider l2-fwd offload macvlan device also as a subport of PF? > > What does this have to with with macvlan? Macvlan is a separate soft > driver. ethtool -k l2-fwd-offload on ip link add link type macvlan will create a macvlan netdev but it is backed by a set of separate HW queues and switching is offloaded to HW. This can be considered as a subport. In i40e, it is a VMDq VSI.