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 C1DD7C43381 for ; Thu, 28 Feb 2019 16:08:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 86085218B0 for ; Thu, 28 Feb 2019 16:08:38 +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="faMLXUti" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731065AbfB1QIh (ORCPT ); Thu, 28 Feb 2019 11:08:37 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:43424 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726403AbfB1QIh (ORCPT ); Thu, 28 Feb 2019 11:08:37 -0500 Received: by mail-qt1-f194.google.com with SMTP id y4so24062804qtc.10 for ; Thu, 28 Feb 2019 08:08:36 -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=27ACUooa7jEob/Ut9yqh74iIvHHoEoIEw5w+SEeACsI=; b=faMLXUtiVfjodhBRHXqhaJ5mQ7qAFoi8rbe4lKPYjbBmzCFC016AGsfWss/JTghaOF k34HOnc93f8BIGRbbBE5ldsLZ3BvbowuH6Pt4ISQQcXZhMhKYqkJQX+CAfWhYT9zUdTU NHLL8I8WDrgbv+F1tupkD2Yx9AlmyqdDGrtdlBY4NMp/LlQfbO5n29oUQQOHrA7ldtsb ZnnwRUbzplmxPC6SQBKvy1wu23tuqQBdd8IYBwFpIZh42vh6obyl+pl+2aibhgCTBC+K clX8z+4ZuZf0ZfB5F21wKE2pSBxH1ZTE/+aEUxj5nGf1ojt5p464xfqk94eD7tyjhmXi ztHg== 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=27ACUooa7jEob/Ut9yqh74iIvHHoEoIEw5w+SEeACsI=; b=Jy4U6+h1QW7bjfa/gJ2eKym3H4c22BD7neevvuEVkAvezQLnomoZ0wjc4webW1Gwi8 ApQyWLECZUGBK/pSFAydwKLW95BF3rq3ASWnFEX/wo3mm2WtVYhMcnPMjBfUThjvRRUz OljOwJh2pgInHuRrEQYsaCKWEkXBJlnqQXiH9JtWJ7kharqzy//cfvdXGUUJpViHVa/3 yCmHyhdKjZrHg3cosDn3aLss37S0QxHLEATILv1f2BExym0tOvzRHeiDcVDriaOEqGQy mrkC06awBxXer0aaFKjLAJ/Xt6AhpKwZx6eGRI104RBFQ1EdfnFu1Ov7sleb0q2UmfFJ K9Tg== X-Gm-Message-State: AHQUAubNfkFGz6CVG9wdHHfGwC7q/FiRF20eOsVSQbofwcTXloq8g7f3 EcN39yt1jtcA0zS3sYoGvFFg6+2EJLI= X-Google-Smtp-Source: AHgI3IaOQZXidyY0XD3QEzGJZ4dV1OJVDkQWaWxq7rVv206sHfjwDPnGugpfYmNT92Jl5cHqGPMtuQ== X-Received: by 2002:ac8:1885:: with SMTP id s5mr6738792qtj.135.1551370115857; Thu, 28 Feb 2019 08:08:35 -0800 (PST) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id s41sm12016212qtc.38.2019.02.28.08.08.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Feb 2019 08:08:35 -0800 (PST) Date: Thu, 28 Feb 2019 08:08:30 -0800 From: Jakub Kicinski To: Jiri Pirko Cc: davem@davemloft.net, oss-drivers@netronome.com, netdev@vger.kernel.org Subject: Re: [PATCH net-next 2/8] devlink: add PF and VF port flavours Message-ID: <20190228080830.40e9185d@cakuba.netronome.com> In-Reply-To: <20190228084429.GC2324@nanopsycho.orion> References: <20190226182436.23811-1-jakub.kicinski@netronome.com> <20190226182436.23811-3-jakub.kicinski@netronome.com> <20190227122327.GA10571@nanopsycho> <20190227124135.GB10571@nanopsycho> <20190227092326.5abf417b@cakuba.netronome.com> <20190227201727.GA2042@nanopsycho> <20190227144239.55481885@cakuba.netronome.com> <20190228084429.GC2324@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 Thu, 28 Feb 2019 09:44:29 +0100, Jiri Pirko wrote: > >Okay, so let me explain the way I see it, and you can explain your way > >or tell me where you disagree. Those devlink ports and netdevs are pf > >ports and vf ports, which most refer to as "representor". If one sends > >packets to the netdev indicated in DEVLINK_ATTR_PORT_NETDEV_* > >attributes they will _egress_ the switch from that port. For physical > >port that means going onto the Ethernet or IB wire. For PCIe it means > >getting DMAed over the PCIe link to host memory. > > > >There is a netdev construct on the host which is in charge of that > >host memory. Maybe we shall call that host netdev? > > > >(I said I don't like "representor" for the reason that people don't > >refer to the physical port as "representor" even though it has exactly > >the semantics we are following. This distinction between behaviour of > >physical and PCI ports is what leads to confusion, I think.) > > > >Let me bring out the moose :) > > > > HOST A || HOST B > > || > > PF A | V | V | V | V || PF B | V | V | V > > |*F |*F |*F |*F ... || |*F |*F |*F ... > >*port A0 |*port A1 | 0 | 1 | 2 | 3 ||*port B0 |*port B1 | 0 | 1 | 2 > > || > > PCI Express link || PCI Express link > > \ \ \ | | | | | / / / > > \ \ \ | | | | | / / / > > /\ \______\______\'___|___|__________|_______'____/___/___/__ /\ > > || |+PF0s0|+PF0s1 |+VF0|+VF1| ...| |+PF1s0|+PF1s1|+VF0|+VF1| || > > i || |------ ------ ----- ---- ----|--- ------ ------ ---- ----| || i > >d n H || | <<========== | || d n H > >e s O || | ==========>> | || e s O > >v t S || | SR-IOV e-switch | || v t S > >l a T || | <<========== | || l a T > >i n || | ==========>> | || i n > >n c A || | ________ _________ ________ | || n c B > >k e || | |+Phys 0 |+Phys 1 |+Phys 2 | | || k e > > || \---------------------------------------------------------/ || > > \/ | | | \/ > > | | | > > || || > > MAC 0 || MAC 1 || MAC 2 > > || || > > > >Things marked with + are devlink ports and have port (-repr-) netdevs > >(including physical ports). > >Things marked with * are host netdevs, don't have devlink ports. > > Okay, I got it. So you say that devlink ports should always be only > ports of eswitch. > > PF host netdev should have "devlink port" instance, correct? > But it still "belongs" under the ASIC represented by the devlink > instance... Yes, I think so.