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.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_SBL,URIBL_SBL_A,USER_AGENT_SANE_1 autolearn=no 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 50AD3FC6196 for ; Fri, 8 Nov 2019 18:11:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 29A00214DB for ; Fri, 8 Nov 2019 18:11:25 +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="rP9g6knG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727296AbfKHSLX (ORCPT ); Fri, 8 Nov 2019 13:11:23 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43672 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbfKHSLX (ORCPT ); Fri, 8 Nov 2019 13:11:23 -0500 Received: by mail-wr1-f65.google.com with SMTP id n1so8049738wra.10 for ; Fri, 08 Nov 2019 10:11:20 -0800 (PST) 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=1FM8QFGTLjjSibNr8z3FzFAXtJs+Q+MMqCNcWLcfyKM=; b=rP9g6knGkFLJa1uyXIxNYNHfvIeC9g1irjsUWgyttp8Gf7uB+JKNeSPz/ff/6IyOv2 m92L2zBk31Exhu+S102+6+fYZTRJPkQuFaOvJIOwGwzn6J7p4x0s7r9g+UpoZXluUvIU siYH+wfmJI7OYsxpv1edzIBIof/B0xWsgi/AmHG2QKcgzG5wgiAe1LzdvknSsWyhCFL5 pE32zetBOJ08KjGbLKqxEVzIWQSJYjbORCsu52KyXbbrkANX3W6X0v4Itv2xuiWNz/bV 2Cx6EesjGfIRv4SbQ61H/XzzBzxYRkNvNm0BHF15IoMq9BoILXXRcp0naIPbC29ty0nV M3Qg== 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=1FM8QFGTLjjSibNr8z3FzFAXtJs+Q+MMqCNcWLcfyKM=; b=EH5lw2+m+T4fKryEPQKcklWnROUPDzIUH/fGrFbYMpT6RY3e5LfgXso63y4s0ZyGvg LlJ27cCqpAVP0mGoFwNwNh+31mQ5KdxLaXXv3cWBm90Z8XX30rD5KWscEai/6rxu3b4+ mO+IxUKuq18AKYjnttB45MDLWgtS52kF5QT+5CYV4ksKW1MPiLFSH1BSMRQz7yIMSQ01 Up2LYQItt40lwZoDCUgyaLUfOh1hY1DnVstiQHHke0uoibWtgcsH8cSzBlvIb7wty+7R LPoQYZaAmqTlzaDLwpMjxILUfe++yRzbNjw14jsVd80uJlGseySaXM0wg7/hZ7Y0cUVe gSRQ== X-Gm-Message-State: APjAAAXmJ6oi/4cftBp/tZtyHj0lEq/Tc1QSwZI5InHDrENLEkNwl9G6 +lu3bgUHcortHkug7s8b9doEFQ== X-Google-Smtp-Source: APXvYqwD1AWXYjVLbesng+NxQG+U5rLVvJR/bhhbMwNiGe/rg6alOWTyuPFT58vLUBnXWmXvlSBoUg== X-Received: by 2002:a5d:4684:: with SMTP id u4mr5749770wrq.352.1573236680049; Fri, 08 Nov 2019 10:11:20 -0800 (PST) Received: from localhost (ip-94-113-220-175.net.upcbroadband.cz. [94.113.220.175]) by smtp.gmail.com with ESMTPSA id y8sm5193758wmi.9.2019.11.08.10.11.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 10:11:19 -0800 (PST) Date: Fri, 8 Nov 2019 19:11:19 +0100 From: Jiri Pirko To: Parav Pandit Cc: Jakub Kicinski , "alex.williamson@redhat.com" , "davem@davemloft.net" , "kvm@vger.kernel.org" , "netdev@vger.kernel.org" , Saeed Mahameed , "kwankhede@nvidia.com" , "leon@kernel.org" , "cohuck@redhat.com" , Jiri Pirko , "linux-rdma@vger.kernel.org" Subject: Re: [PATCH net-next 12/19] devlink: Introduce mdev port flavour Message-ID: <20191108181119.GT6990@nanopsycho> References: <20191107153836.29c09400@cakuba.netronome.com> <20191107201750.6ac54aed@cakuba> <20191107212024.61926e11@cakuba> <20191108094646.GB6990@nanopsycho> <20191108163139.GQ6990@nanopsycho> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Fri, Nov 08, 2019 at 05:43:43PM CET, parav@mellanox.com wrote: > > >> -----Original Message----- >> From: Jiri Pirko >> >> >> On Fri, 8 Nov 2019 01:44:53 +0000, Parav Pandit wrote: >> >> >> > > I'm talking about netlink attributes. I'm not suggesting to >> >> >> > > sprintf it all into the phys_port_name. >> >> >> > > >> >> >> > I didn't follow your comment. For devlink port show command >> >> >> > output you said, >> >> >> > >> >> >> > "Surely those devices are anchored in on of the PF (or possibly >> >> >> > VFs) that should be exposed here from the start." >> >> >> > So I was trying to explain why we don't expose PF/VF detail in >> >> >> > the port attributes which contains >> >> >> > (a) flavour >> >> >> > (b) netdev representor (name derived from phys_port_name) >> >> >> > (c) mdev alias >> >> >> > >> >> >> > Can you please describe which netlink attribute I missed? >> >> >> >> >> >> Identification of the PCI device. The PCI devices are not linked >> >> >> to devlink ports, so the sysfs hierarchy (a) is irrelevant, (b) >> >> >> may not be visible in multi- host (or SmartNIC). >> >> >> >> >> > >> >> >It's the unique mdev device alias. It is not right to attach to the PCI >> device. >> >> >Mdev is bus in itself where devices are identified uniquely. So an >> >> >alias >> >> suffice that identity. >> >> >> >> Wait a sec. For mdev, what you say is correct. But here we talk about >> >> devlink_port which is representing this mdev. And this devlink_port >> >> is very similar to VF devlink_port. It is bound to specific PF (in >> >> case of mdev it could be PF-VF). >> >> >> >But mdev port has unique phys_port_name in system, it incorrect to use >> PF/VF prefix. >> >> Why incorrect? It is always bound to pf/vf? >> >Because mdev device already identified using its unique alias. Why does it need prefix? >Mdev core generating the alias is not aware of the prefixes applied devlink. it shouldn't be. >We want more letters towards uniqueness of the alias and filling it up with such prefixes doesn't make sense. mdev belongs undev pf/vf, no matter how uniqueue the name/alias is. Well, I don't really need those in the phys_port_name, mainly simply because they would not fit. However, I believe that you should fillup the PF/VF devlink netlink attrs. Note that we are not talking here about the actual mdev, but rather devlink_port associated with this mdev. And devlink port should have this info. > >> >What in hypothetical case, mdev is not on top of PCI... >> >> Okay, let's go hypothetical. In that case, it is going to be on top of something >> else, wouldn't it? >Yes, it will be. But just because it is on top of something, doesn't mean we include the whole parent dev, its bridge, its rc hierarchy here. >There should be a need. >It was needed in PF/VF case due to overlapping numbers of VFs via single devlink instance. You probably missed my reply to Jakub. Sure. Again, I don't really care about having that in phys_port_name. But please fillup the attrs. >Here it is no overlap. >