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=-2.5 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT 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 28300C43381 for ; Thu, 21 Mar 2019 08:56:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E19222075E for ; Thu, 21 Mar 2019 08:56:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="psUNZ3GV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727967AbfCUI4I (ORCPT ); Thu, 21 Mar 2019 04:56:08 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35299 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727841AbfCUI4I (ORCPT ); Thu, 21 Mar 2019 04:56:08 -0400 Received: by mail-wr1-f67.google.com with SMTP id w1so5676032wrp.2 for ; Thu, 21 Mar 2019 01:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uJeXDELNRMmsZY4j15UK/93mkp5lo9Ep5yhmOowyFz8=; b=psUNZ3GV4anDt7Sp5udbKl1SuNpeIaGR+2Xq9SNgXecFBYo1ogH5476a6U4MjF0ozR amSCU83YHJ7VA2+ml5QzvD8cMnIW5AMjHIoryI2lW6aCPrVHfd+t1VFif5jBvg/x3sJZ ChVX5kK+NqhUimlFdYH0QMP6uKPrzbXxcSZZTfPETXJ7tSAROeTkPeiRJWI6iv9GkY7f vB57bHu70Hr8oORb0jC3IyiXCdGSzcvV6GaEUxDKXDIdBOSuBvg1/GqDmz1utSpWP0OI /7x/PVza4xIk/4/pQtddRvIGmq5GhKy6yBEkRNjt2oka4zEermuhtOchUneECOObjs3l zMMA== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uJeXDELNRMmsZY4j15UK/93mkp5lo9Ep5yhmOowyFz8=; b=tPNJZdqrdFT7/BX/nMIC4R/FRC+GGnGG2gehzXr53KTw6uk9jgsie+fTnKExIEQbnM 63kjK9rPv5DQHEH77aO5JEofxvrbCC5C5LwSdekiBrY61ta+868RP5U1QeI0Pk151itn R+k02s5haE21Q6cGqSbWNMvqzNNeKLKDKRgbEs61Z7HAF7Zz7B48zUvJORbRvkL0/D3r Z4YuPVxXIYZipRrp/5VLvAkv9FtGv+okjeNKIRaftXUNuPC5UcNgIzFjyfRiP0rGkbUD RrIC4seKehHc+Mesgl0OfqL2hqQW1hwJH26Igm+HUtgR3ByY952L1aSi+vWi60/19a5E 8lQw== X-Gm-Message-State: APjAAAU0Jr6H+X4728cLkXIBjvZjD6674jWh2bnPnIPPvEnzpPNVW0v1 C/5K4in3HRiRRpwkaFuQLBenBA== X-Google-Smtp-Source: APXvYqxoFMIeJpaYMDyqdPcTtkIU7bcYDb0vdH561aJ7usN+YMq7FWNQsoeK/uRyvRrAS2qQve516Q== X-Received: by 2002:a5d:6b43:: with SMTP id x3mr1842285wrw.76.1553158566540; Thu, 21 Mar 2019 01:56:06 -0700 (PDT) Received: from localhost ([195.39.71.253]) by smtp.gmail.com with ESMTPSA id o133sm4626591wmb.18.2019.03.21.01.56.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Mar 2019 01:56:05 -0700 (PDT) Date: Thu, 21 Mar 2019 09:45:26 +0100 From: Jiri Pirko To: Jakub Kicinski 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: <20190321084526.GA2087@nanopsycho> References: <20190314163915.24fd2481@cakuba.netronome.com> <4436da3d-4b99-f792-8e77-695d5958794d@intel.com> <20190315200814.GD2305@nanopsycho> <20190315134454.581f47ca@cakuba.netronome.com> <20190318121154.GG2270@nanopsycho> <20190318121642.74a56b7e@cakuba.netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190318121642.74a56b7e@cakuba.netronome.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Mon, Mar 18, 2019 at 08:16:42PM CET, jakub.kicinski@netronome.com wrote: >On Mon, 18 Mar 2019 13:11:54 +0100, Jiri Pirko wrote: >> >> >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 :( >> >> Although I understand your hesitation, the host ports are also >> associated with the asic and should be under the devlink instance. >> It is just a matter of proper documentation and clear code to avoid >> confusions. > >They are certainly a part and belong to the ASIC, the question in my >mind is more along the lines of do we want "one pipe/one port" or is >it okay to have multiple software objects of the same kind for those >objects. > >To put it differently - do want a port object for each port of the ASIC >or do we want a port object for each netdev.. Perhaps "port" name of the object is misleading. From the beginning, I ment to have it for both switch ports and host ports. I admit that "host port" is a bit misleading, as it is not really a port of eswitch, but the counter part. But if we introduce another object for that purpose in devlink (like "partititon"), it would be a lot of duplication I think. Question is, do we need the "host port"? Can't we just put a relation to host netdev in the eswitch port. So as you suggest, we would have devlink_port -+-- switch netdev/ibdev | +-- host netdev/ibdev So the "weights" of both switch/host netdev/ibdev to devlink_port relations would be equivalent. Then, the devlink_port would represent the whole "pipe" with both ends. More I think about it, the more it makes sense to me...