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, 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 3DB30C43381 for ; Wed, 13 Mar 2019 16:17:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02DB720693 for ; Wed, 13 Mar 2019 16:17:40 +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="StgLg7B4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbfCMQRi (ORCPT ); Wed, 13 Mar 2019 12:17:38 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:33951 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726109AbfCMQRi (ORCPT ); Wed, 13 Mar 2019 12:17:38 -0400 Received: by mail-oi1-f196.google.com with SMTP id g16so1920820oib.1 for ; Wed, 13 Mar 2019 09:17:37 -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=d0ZYhCD/N4K0vGZRZtD6nIIg/Q5xgO7i+/Lly2rDj7A=; b=StgLg7B4NNfLCxYIZjN6NUjlM8uTLcvXRtcq5EWayMTM03JM+Dl2PkQt3jmQnrV0cm Q9HX+3Hr5PHgr76iegIiEMhTDRvGxcq3nO59ZRd9M6Sb5irI4qaeIc58z6NfnoL5ANkl FVcF00CrHpPLqB0/tvwJ0dmZbaG+2h8ToOElZrWhpZXaZ15Zjs/83VLKSMbA2N7iWZnt voXVjjo/XLYtQ7XUtmRYzr159Ss573CyrIum6q195WzrapuwRyhx2FAlWCdfPuTln42o gYUf3hMTuFyQYICXg5hMwy3UV7vd1SKoAQeF53+yWbpOc94+inN22AloDwY1Wzj6rqwZ 9wIQ== 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=d0ZYhCD/N4K0vGZRZtD6nIIg/Q5xgO7i+/Lly2rDj7A=; b=B9Rim7sM4Uo+Q6KEeP/Yt1tGtB04uVm7hOmb6jCpCTxejaWXcHqR59AXgZZNHoBXH1 2xtyYQFFhp2//Y1MerSvdfnzb1Cw6Kk5vHdpk9QcJMFsYwW9IoMwmmHN8UAvE1oOFw5q 8HIFNSinTeORTIzAW+F1z1VtEETwCMuGHPfmi8hdUA1GZtNNy7I/cjiP2JS9RI0UEVlI /RXFjc+aGfItzGCkxuULIkM1tX41AxX9pIG5jp1RxWrZkJfumBmSJhaSWrAJ2H1iNpIC //6N3PQsj5gD6QZAZ138X7+cMSRiQ1aNY/lXV5NyrmGNAzxDaevtzrezrI4rlbowXN99 odmw== X-Gm-Message-State: APjAAAWiHhoVyI4ULUfLOyszTCYksIVvbfaC+VjJ+V0+PkUibrDRaTiZ 48T0sgQzyPtcCjJ4P8W/wFBCrg== X-Google-Smtp-Source: APXvYqy/z8W1yGWVpmJhD47THyxNFGUBVy55tmtMuzNn+bv2c8tLP7zekEKl4KP//BBZ8083hymKmA== X-Received: by 2002:aca:430b:: with SMTP id q11mr2253204oia.99.1552493856765; Wed, 13 Mar 2019 09:17:36 -0700 (PDT) Received: from cakuba.attlocal.net (108-74-161-181.lightspeed.sntcca.sbcglobal.net. [108.74.161.181]) by smtp.gmail.com with ESMTPSA id e24sm4613075otl.2.2019.03.13.09.17.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2019 09:17:36 -0700 (PDT) Date: Wed, 13 Mar 2019 09:17:31 -0700 From: Jakub Kicinski To: Jiri Pirko Cc: 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: <20190313091731.76129ece@cakuba.attlocal.net> In-Reply-To: <20190313060701.GB2384@nanopsycho.orion> 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> <20190312135628.5250135b@cakuba.hsd1.ca.comcast.net> <20190313060701.GB2384@nanopsycho.orion> 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 Wed, 13 Mar 2019 07:07:01 +0100, Jiri Pirko wrote: > Tue, Mar 12, 2019 at 09:56:28PM CET, jakub.kicinski@netronome.com wrote: > >On Tue, 12 Mar 2019 15:02:39 +0100, Jiri Pirko wrote: > >> Tue, Mar 12, 2019 at 03:10:54AM CET, wrote: > >> >On Mon, 11 Mar 2019 09:52:04 +0100, Jiri Pirko wrote: > >> >> Fri, Mar 08, 2019 at 08:09:43PM CET, wrote: > >> >> >If the switchport is in the hypervisor then only the hypervisor can > >> >> >control switching/forwarding, correct? > >> >> > >> >> Correct. > >> >> > >> >> >The primary use case for partitioning within a VM (of a VF) would be > >> >> >containers (and DPDK)? > >> >> > >> >> Makes sense. > >> >> > >> >> >SR-IOV makes things harder. Splitting a PF is reasonably easy to grasp. > >> >> >I'm trying to get a sense of is how would we control an SR-IOV > >> >> >environment as a whole. > >> >> > >> >> You mean orchestration? > >> > > >> >Right, orchestration. > >> > > >> >To be clear on where I'm going with this - if we want to allow VFs > >> >to partition themselves then they have to control what is effectively > >> >a "nested" switch. A per-VF set of rules which would the get > >> > >> Wait. If you allow to make VF subports (I believe that is what you ment > >> by VFs partition themselves), that does not mean they will have a > >> separate nested switch. They would still belong under the same one. > > > >But that existing switch is administered by the hypervisor, how would > >the VF owners install forwarding rules in a switch they don't control? > > They won't. Argh. So how is forwarding configured if there are no rules? Are you going to assume its switching on MACs? We're supposed to offload software constructs. If its a software port it needs to be explicitly switched. If it's not explicitly switched - we already have macvlan offload. > >> >"flattened" into the main eswitch rule set. If I was to choose I'd > >> >really rather have this "flattening" be done on the (Linux) hypervisor > >> >and not in the vendor driver and firmware. > >> > >> Agreed. Driver should provide one big switch. User should configure it. > > > >Cool, when you say user - is it the tenant or the provider? > > Whoever gets access to the instance. > > >> >I'd much rather have the VM make a "give me another NIC" orchestration > >> >call via some high level REST API than devlink. This makes the > >> >configuration strictly high level to low level: > >> > > >> > VM -> cloud net REST API -> cloud agent -> devlink/Linux -> FW -> HW > >> > > >> >Without round trips via firmware. > >> > >> Okay. So the "devlink/Linux -> FW" part is going to happen on baremetal. > >> Makes sense. > >> > >> >This allows for easy policy enforcement, common code to be maintained > >> >in user space, in high level languages (no 0.5M LoC drivers and 10M LoC > >> >firmware for every driver). It can also be used with software paths > >> >like VirtIO.. > >> > >> Agreed. > >> > >> >Modelling and debugging a nested switch would be a nightmare. What > >> >follows is that we probably shouldn't deal with partitioning of VFs, > >> >but rather only partition via the PF devlink instance, and reassign > >> >the partitions to VMs. > >> > >> Agreed. That must be misunderstanding, I never suggested nested > >> switches. > > > >Cool, yes, I was making sure we weren't going in that direction :) > > Okay. > > >> >> 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: > >> [...] > > > >I see thanks for the examples, they makes things clear! > > Okay. I will put together some documentation including this. I have some > patches that implement some of the stuff. Your patchset also does some > of that (considering you adjust a thing or two). Lets make this right. Yeah, I feel like I'm again getting further from clarity on what you're trying to achieve.