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 C16D2C43381 for ; Tue, 5 Mar 2019 17:15:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7D8AC2064A for ; Tue, 5 Mar 2019 17:15:43 +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="QBxTHT2Q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728017AbfCERPm (ORCPT ); Tue, 5 Mar 2019 12:15:42 -0500 Received: from mail-pf1-f181.google.com ([209.85.210.181]:35201 "EHLO mail-pf1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727989AbfCERPm (ORCPT ); Tue, 5 Mar 2019 12:15:42 -0500 Received: by mail-pf1-f181.google.com with SMTP id j5so6193280pfa.2 for ; Tue, 05 Mar 2019 09:15:41 -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=vOdZh/aW2okXwT9oBSy0jtpAYz6/cM4Ls/Lj6yT+MHM=; b=QBxTHT2Q/hkanzyySYOTOERdhhZ7Lv/iPKKhcH3bji6AmNc/zhYmgSXdKa5JcG9Iax 5dpTqWB0PRxGcE/MPNCO028xVokzGIuA1sqVG6rVCG9eIY6dsKbUH2gjChiOgtcEevmA 7nFmCC0qIicPfIPyeIvaP9Tv0IIlaArBNTfJn3sLcXFXnqzDGD389LfSchhhMB+2pTey sgNLDvDs4E7psESwKCFIFZw2j7JbPhjv2npZInoAGVmc7mYToblCAiSEgDYoGCbtn/9V zFnO+7Ym3+Jw5hi92ivLEiZaV1591V7HdgEfItV3mnES5VcDGSI5Ws9vaUi/JxMErpV3 592A== 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=vOdZh/aW2okXwT9oBSy0jtpAYz6/cM4Ls/Lj6yT+MHM=; b=gZCZhwu8kIcMoa8Qhs4hb2irUr6P/rAny+SxJKWsouzDIV5Xx16ttDj7oqUReVg8W+ h5EUwzCM6EvMV5K5EAU0LlXRFq20oGBf+C1uUBqpOMVoOqxnyPZji9HcTaxLU3mj26nY p4iMpZupsgYHd6Jh6gWuTKFdQXfMWyY1a8WXlOnwMrr/+O6y0XrW9oKykFM1Fl81xser +Yy53P9Vh8plx2cHAysiMkeO9sLjO11OEVufAK8zgY6pfrDRVsRGqjsJaFbTE+8jvkvY It966RfV59Gw5QWmzvmxEbn2FiVCmudtyqMgTKMH1L9qnc59PPbEvo3Tj5N5HhgRz6Em CI4Q== X-Gm-Message-State: APjAAAW/WXBrMGQ+MVD4rwp9xT/3IzdYiRW3e0Z/eIS+W/g0slKgMssd nNmcUEdwm3EOrb4OrfuFkW88d+hXhCM= X-Google-Smtp-Source: APXvYqzviaM3R9LfFVgjibqyXHJcruArfvAexdrciIxWleEk5adxqeaRXRunbZ5P5yaq/Q4NcOvxnQ== X-Received: by 2002:a17:902:a413:: with SMTP id p19mr2299167plq.337.1551806140938; Tue, 05 Mar 2019 09:15:40 -0800 (PST) Received: from cakuba.hsd1.ca.comcast.net ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id v6sm7047877pgs.71.2019.03.05.09.15.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Mar 2019 09:15:40 -0800 (PST) Date: Tue, 5 Mar 2019 09:15:34 -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: <20190305091534.36200de6@cakuba.hsd1.ca.comcast.net> In-Reply-To: <20190305110601.GC2314@nanopsycho> References: <20190301180453.17778-1-jakub.kicinski@netronome.com> <20190301180453.17778-5-jakub.kicinski@netronome.com> <20190302094116.GQ2314@nanopsycho> <20190302114847.733759a1@cakuba.netronome.com> <20190304075609.GV2314@nanopsycho> <20190304163302.7e40219e@cakuba.netronome.com> <20190305110601.GC2314@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 Tue, 5 Mar 2019 12:06:01 +0100, Jiri Pirko wrote: > >> >as ports. Can we invent a new command (say "partition"?) that'd take > >> >the bus info where the partition is to be spawned? > >> > >> Got it. But the question is how different this object would be from the > >> existing "port" we have today. > > > >They'd be where "the other side of a PCI link" is represented, > >restricting ports to only ASIC's forwarding plane ports. > > Basically a "host port", right? It can still be the same port object, > only with different flavour and attributes. So we would have: > > 1) pci/0000:05:00.0/0: type eth netdev enp5s0np0 > flavour physical switch_id 00154d130d2f > 2) pci/0000:05:00.0/10000: type eth netdev enp5s0npf0s0 > flavour pci_pf pf 0 subport 0 > switch_id 00154d130d2f > peer pci/0000:05:00.0/1 > 3) pci/0000:05:00.0/10001: type eth netdev enp5s0npf0vf0 > flavour pci_vf pf 0 vf 0 > switch_id 00154d130d2f > peer pci/0000:05:10.1/0 > 4) pci/0000:05:00.0/10001: type eth netdev enp5s0npf0s1 > flavour pci_pf pf 0 subport 1 > switch_id 00154d130d2f > peer pci/0000:05:00.0/2 > 5) pci/0000:05:00.0/1: type eth netdev enp5s0f0?? > flavour host <---------------- > peer pci/0000:05:00.0/10000 > 6) pci/0000:05:10.1/0: type eth netdev enp5s10f0 > flavour host <---------------- > peer pci/0000:05:00.0/10001 > 7) pci/0000:05:00.0/2: type eth netdev enp5s0f0?? > flavour host <---------------- > peer pci/0000:05:00.0/10001 > > I think it looks quite clear, it gives complete topology view. Okay, I have some of questions :) What do we use for port_index? What are the operations one can perform on "host ports"? If we have PCI parameters, do they get set on the ASIC side of the port or the host side of the port? How do those behave when device is passed to VM? You have a VF devlink instance there - what ports does it show? How do those look when the PF is connected to another host? Do they get spawned at all? Will this not be confusing to DSA folks who have a CPU port?