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 919A4C43381 for ; Fri, 8 Mar 2019 19:09:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 65A53206DF for ; Fri, 8 Mar 2019 19:09:57 +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="WKB6Tn6Y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726530AbfCHTJ4 (ORCPT ); Fri, 8 Mar 2019 14:09:56 -0500 Received: from mail-qt1-f171.google.com ([209.85.160.171]:41459 "EHLO mail-qt1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbfCHTJz (ORCPT ); Fri, 8 Mar 2019 14:09:55 -0500 Received: by mail-qt1-f171.google.com with SMTP id v10so22424633qtp.8 for ; Fri, 08 Mar 2019 11:09:55 -0800 (PST) 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=h/rB2ZG68UPlgp+WAAZBOWz9HqoEwLSTqzfRgchWU64=; b=WKB6Tn6Yl4fWWmFogrFkRf+E2LQRquv2bZhsKn5m7s7tg1i0aNCytULVG0iQiidkoZ 4tAkV6csuNJBPREGnBurHnGwPFEJS76oPvPR5xSWRqLpne/CMxf5SjJVsFiA2G4bfmnF G2K3Dx534zVUVsIluVj1QsIK3S+fcMtXI4uPdrs3PdUKQG+TonI9QuX4msJi+cBFo7MB 89wHeF5MHi+VQUkBiKV2s23eL/iGc+Df3ZRgAkMqLFlAaKnd509edZ/Tcn7xTlij43IM N1uksT6CglpYqPqJNAmtQlVusom6qHUG3izDv/tx+2iVSSbDNLu5/qFLPh7SjK2rfoGK MuXA== 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=h/rB2ZG68UPlgp+WAAZBOWz9HqoEwLSTqzfRgchWU64=; b=dIEjLvPs47QhYdpwNr2+T/20q76ZdqrQwVa1GZAhsJplJD0GBM6sNEs1cKEHAJRmmB 5H+4zeSOZ7+OiDBf+4JfaxG9lr3ANp4j5GzrmbkeRQx3I+TcaHojXv0Es/hXBmAxfSNk A6bmdp53IphAkufSf6O0Ttb1BBI58MUhsdilpG5kdfYGrM5+yL0Fgqj+lvaqpx1ki6fu J7YEhDabtpiSqlXTYWMpeEpBZl2msdb+R33KOnH5eOgi1dy6xfqM0ToSi24jQPoQsksD 7/wtGPTAOl7PUrZQVXvsC8j6o5C/0izxaoKX0INyzMqaS0qOk8xXDEC8NnxysQSHVJR2 RrlA== X-Gm-Message-State: APjAAAUss+tFOAu0IQ1ip4r097QyKN4Vta1RjGza3wz5nktr7UwZ1XFn idyQv9WqqKfNhpOuNPS7rs/11g== X-Google-Smtp-Source: APXvYqx55bmgpCD7jbwNQxBvtUmTaP2gl+eKuhr2ruRB4VH52i0Ez2D9TNldh68EdPG2A1VTAdf5vA== X-Received: by 2002:aed:21cc:: with SMTP id m12mr15987288qtc.203.1552072194491; Fri, 08 Mar 2019 11:09:54 -0800 (PST) Received: from cakuba.hsd1.ca.comcast.net ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id g53sm5602213qte.21.2019.03.08.11.09.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Mar 2019 11:09:54 -0800 (PST) Date: Fri, 8 Mar 2019 11:09:43 -0800 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: <20190308110943.2ee42bc0@cakuba.hsd1.ca.comcast.net> In-Reply-To: <20190308145421.GA2888@nanopsycho.orion> References: <20190302094116.GQ2314@nanopsycho> <20190302114847.733759a1@cakuba.netronome.com> <20190304075609.GV2314@nanopsycho> <20190304163302.7e40219e@cakuba.netronome.com> <20190305110601.GC2314@nanopsycho> <20190305091534.36200de6@cakuba.hsd1.ca.comcast.net> <20190306122037.GB2819@nanopsycho> <20190306095638.7c028bdd@cakuba.hsd1.ca.comcast.net> <20190307094816.GA2190@nanopsycho> <20190307185202.2db37490@cakuba.hsd1.ca.comcast.net> <20190308145421.GA2888@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 Fri, 8 Mar 2019 15:54:21 +0100, Jiri Pirko wrote: > Fri, Mar 08, 2019 at 03:52:02AM CET, jakub.kicinski@netronome.com wrote: > >On Thu, 7 Mar 2019 10:48:16 +0100, Jiri Pirko wrote: > >> Wed, Mar 06, 2019 at 06:56:38PM CET, jakub.kicinski@netronome.com wrote: > >> >On Wed, 6 Mar 2019 13:20:37 +0100, Jiri Pirko wrote: > >> >For creating subdevices, I don't think the handle should ever be port. > >> >We create new ports on a devlink instance, and configure its forwarding > >> > >> Okay I agree. Something like: > >> $ devlink port add pci/0000:00:10.0 ..... > >> > >> It's a bit confusing because "set" accepts port handle (like > >> pci/0000:00:10.0/1). Probably better would be: > >> $ devlink dev port add pci/0000:00:10.0 ..... > >> > >> >with offloads of well established Linux SW constructs. New devices are > >> >not logically associated with other ports (see how in my patches there > >> >are 2 "subports" but no main port on that PF - a split not a hierarchy). > >> > >> Right, basically you have 2 equal objects. Makes sense. > >> > >> >How we want to model forwarding inside a VM (who configures the > >> >underlying switching) remains unclear. > >> > >> I don't understand. Could you elaborate a bit? > > > >If VF in a VM gets a partitioning request does the new port pop up on > >the hypervisor? With a port netdev? > > Switchport in hypervizor with correct switchid attribute, hostport in > vm. Makes sense? If the switchport is in the hypervisor then only the hypervisor can control switching/forwarding, correct? The primary use case for partitioning within a VM (of a VF) would be containers (and DPDK)? 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. > >Does the VF also create a port object as well as host port object? > > > >That question is probably independent of host port discussion.