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, 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 577DBC43381 for ; Mon, 18 Mar 2019 12:22:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1859920854 for ; Mon, 18 Mar 2019 12:22:30 +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="VruyGTXm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727220AbfCRMW3 (ORCPT ); Mon, 18 Mar 2019 08:22:29 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37951 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726808AbfCRMW2 (ORCPT ); Mon, 18 Mar 2019 08:22:28 -0400 Received: by mail-wr1-f66.google.com with SMTP id g12so16804023wrm.5 for ; Mon, 18 Mar 2019 05:22:27 -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=loyS6oraJ9DtiqYjG6dOv59vahLqVUVLJu651uFkRwA=; b=VruyGTXmnlXCgbuxml5FdqMiY4SLOvGwCMR1yIEJkOAEOB4VVcv12Q3kGxi2zFXVNW hJnPaaabMCddiFSqLqi1AkeN8HbhOWmcoj4re1Hj3hs3gkR3cFNzS5dcLT0BT1JTyjTu Uckq+UTpYtRW1EAIi73wSQ1wQp5Ofh7eu/qkZbT48qnvopE/LgUURJQnXK2CEbExXvSs oHTtXW21/3/13ahVwvoDcq8m16/OGt0zW43TlhNQWdROeVLuk4u9aMXywYDZhhBXjz0M 518y6OYOrRYCmUGKRZbIVivOHomeipThJXCzNDxl6ci/+7KH5CLSS2j0iBjxCnZoMNM2 Gc8w== 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=loyS6oraJ9DtiqYjG6dOv59vahLqVUVLJu651uFkRwA=; b=ukOR5iuXV9vQXFkwFnyhTCVUhkAZGOR/ppsU2/nIXrDzp805MXPTQBt5/uhDlzy3On /LzvAEV3SFmZTQoFGHEQTLDsLP44O35UlzldU/vR+dchnnFNcRvCFTW+i9WEoyWye6Fr 2WdwKnlntT7G134T/guJ/H05J5XFRSE8EJ7MY56O2YQWNUf9tv6LgPlHOIjVI4QTAW0O 8PhaB4uhLcgd+NxEPO7t5V4c4pgiWmPp72s033olM7yfeaTeJbqNnIPcsguzMoy5nBvl 33x/yGs274aDtpl5rm9P0bIRtZMlip/uOCfZPR/PUMUiNup+4h4aW5bdV0lhjzApVv3f Z9jA== X-Gm-Message-State: APjAAAVRfeNxHDcTn0Vk8W695t1/yg8gTPK0IdirsDPcV9OMx+yMLYM1 3eoLiQIQ+Z9ig1P/psLUlmDpKw== X-Google-Smtp-Source: APXvYqxKq3DY1AiyaR7BCvNVXdlaH4sDoc4lx2/5w7Ef4WVyzQwipOlWURVEKEnOFDEpNYSKw5GkAg== X-Received: by 2002:adf:9cc4:: with SMTP id h4mr11396485wre.327.1552911746902; Mon, 18 Mar 2019 05:22:26 -0700 (PDT) Received: from localhost (ip-94-113-125-71.net.upcbroadband.cz. [94.113.125.71]) by smtp.gmail.com with ESMTPSA id y140sm39766229wmd.18.2019.03.18.05.22.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2019 05:22:26 -0700 (PDT) Date: Mon, 18 Mar 2019 13:11:54 +0100 From: Jiri Pirko To: Jakub Kicinski Cc: Parav Pandit , "Samudrala, Sridhar" , "davem@davemloft.net" , "netdev@vger.kernel.org" , "oss-drivers@netronome.com" Subject: Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports Message-ID: <20190318121154.GG2270@nanopsycho> References: <20190314150945.031d1b08@cakuba.netronome.com> <20190314163915.24fd2481@cakuba.netronome.com> <4436da3d-4b99-f792-8e77-695d5958794d@intel.com> <20190315200814.GD2305@nanopsycho> <20190315134454.581f47ca@cakuba.netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190315134454.581f47ca@cakuba.netronome.com> 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 Fri, Mar 15, 2019 at 09:44:54PM CET, jakub.kicinski@netronome.com wrote: >On Fri, 15 Mar 2019 21:08:14 +0100, Jiri Pirko wrote: >> >> IIUC, Jiri/Jakub are proposing creation of 2 devlink objects for each port - >> >> host facing ports and switch facing ports. This is in addition to the netdevs >> >> that are created today. > >To be clear I'm not in favour of the dual-object proposal. > >> >I am not proposing any different. >> >I am proposing only two changes. >> >1. control hostport params via referring hostport (not via indirect peer) >> >> Not really possible. If you passthrough VF into VM, the hostport goes >> along with it. >> >> >2. flavour should not be vf/pf, flavour should be hostport, switchport. >> >Because switch is flat and agnostic of pf/vf/mdev. >> >> Not sure. It's good to have this kind of visibility. > >Yes, this subthread honestly makes me go from 60% sure to 95% sure we >shouldn't do the dual object thing :( Seems like Parav is already >confused by it and suggests host port can exist without switch port :( Although I understand your hesitation, the host ports are also associated with the asic and should be under the devlink instance. It is just a matter of proper documentation and clear code to avoid confusions. > >> >> Are you suggesting that all the devlink objects should be visible only at the >> >> hypervisor layer? >> >> >> >Of course not. >> > >> >Ports and params controlled by hypervisor should be exposed at hypervisor/eswitch wherever its parent devlink instance exist. >> >Ports which should be visible inside a VM should be exposed inside a VM. >> >So for a given VF, >> > >> >If eswitch is at hypervisor level, >> >$ devlink port show >> >pci/0000:05:00.0/10002 eth netdev flavour switchport switch_id 00154d130d2f peer pci/0000:05:10.1/0 >> >pci/0000:05:10.1/0 eth netdev flavour hostport switch_id 00154d130d2f peer pci/0000:05:00.0/10002 >> > >> >where VF is enumerated, >> >$ devlink port show >> >pci/0000:05:10.1/0 eth netdev flavour hostport >> >> So this is how it looks like in VM, right? >> >> >This is because unprivileged VF doesn't have visibility to eswitch and its links. >