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=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,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 EE431C43381 for ; Fri, 15 Mar 2019 20:45:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ACFA5218A1 for ; Fri, 15 Mar 2019 20:45:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="dw81ygxx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726677AbfCOUpB (ORCPT ); Fri, 15 Mar 2019 16:45:01 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:44862 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726571AbfCOUpB (ORCPT ); Fri, 15 Mar 2019 16:45:01 -0400 Received: by mail-qk1-f196.google.com with SMTP id u22so6321860qkj.11 for ; Fri, 15 Mar 2019 13:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=kkpb/Geqh7UvR3mkGeLX1sB4MitZ/dFrxNMZyJiPAe8=; b=dw81ygxx/rwBXFwkMaaz0xlx7Bvc0Om3i9+D2gyRRGlNzT+o+LOvXzX4dk0wSjBjRm dPENpkt429CPcTRfH0GfBSCyGfDUTbIYLKFGHXkurr3+GGa7AE0wD96lmQGUlWk0Ky/r XH3y/QuOonFoq0+dqNPrJbhLAXuyY2394XsCB/4SG07VXpTTZ6ngQ/KdGCe6wm68H/D7 fhKIApHO3MNLJpY7cAgdN4BFaTTApLbBfuhHmDA5337u4gSYi2U4bho8nSlgAsItVCcK ibAl4xC8DNFNILbjOhwwgC6iqiCV0KqzltXaG67FSFzOQzMaXxe4Fg1OWeJO5/E2fXZe GQZw== 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:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=kkpb/Geqh7UvR3mkGeLX1sB4MitZ/dFrxNMZyJiPAe8=; b=K2XqmmkKGGSTHVsysxKCySC21vvHOfQx06njuZvbtuPR6yTeLRFZiO6hlHM2BcWgHy gnwu+Dqch4AUv/Ou1OzJi993ucLf+7FuQ3A0n9ZX0HBLt8sTvZUwRWSCLL5L1PRYN0OT OKzbK+nQ0TATiAFIoi7zsc7kG1hK1okKJMBG/r8CR8Rs+gUadOguD46Ndm1kLiYdaVTY n4Ch5VBOTt2iBKVRcDThzUAkEeMYM0DBdjk42Bb0sW+kT9sHzVu6LvTWbWiT/hUFMNeN KpPR8bX6ZB3xw9zfiSyyE6jodPYN0igLMgXYD8wqmXZZKRMHwTdRsrBmCK41l6JYHdZk /Dgw== X-Gm-Message-State: APjAAAWIY7TNG2vuv1+tXffY3dCpQrNcegT0p8c7HDJIqSLxfuOQxJUS d5QTSZ51juG33Ip93Eo0ggQOnA== X-Google-Smtp-Source: APXvYqyRJ+O9wlV7TRvCznb9dewg0vjKugzFpbrbGNGNm/SUQkNYHoNn82CSsk5DEybjcCUd7AeEIQ== X-Received: by 2002:a37:de0b:: with SMTP id h11mr4369750qkj.238.1552682699525; Fri, 15 Mar 2019 13:44:59 -0700 (PDT) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id h8sm2296638qtc.29.2019.03.15.13.44.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Mar 2019 13:44:59 -0700 (PDT) Date: Fri, 15 Mar 2019 13:44:54 -0700 From: Jakub Kicinski To: Jiri Pirko 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: <20190315134454.581f47ca@cakuba.netronome.com> In-Reply-To: <20190315200814.GD2305@nanopsycho> References: <20190313095555.0f4f92ca@cakuba.attlocal.net> <20190314073840.GA3034@nanopsycho> <20190314150945.031d1b08@cakuba.netronome.com> <20190314163915.24fd2481@cakuba.netronome.com> <4436da3d-4b99-f792-8e77-695d5958794d@intel.com> <20190315200814.GD2305@nanopsycho> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 :( > >> 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.