From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f52.google.com ([209.85.218.52]:35665 "EHLO mail-oi0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752769AbeCXUFc (ORCPT ); Sat, 24 Mar 2018 16:05:32 -0400 Received: by mail-oi0-f52.google.com with SMTP id x20-v6so12793539oie.2 for ; Sat, 24 Mar 2018 13:05:32 -0700 (PDT) Subject: Re: [patch net-next RFC 00/12] devlink: introduce port flavours and common phys_port_name generation To: Andrew Lunn , Jiri Pirko Cc: netdev@vger.kernel.org, davem@davemloft.net, idosch@mellanox.com, jakub.kicinski@netronome.com, mlxsw@mellanox.com, vivien.didelot@savoirfairelinux.com, michael.chan@broadcom.com, ganeshgr@chelsio.com, saeedm@mellanox.com, simon.horman@netronome.com, pieter.jansenvanvuuren@netronome.com, john.hurley@netronome.com, dirk.vandermerwe@netronome.com, alexander.h.duyck@intel.com, ogerlitz@mellanox.com, dsahern@gmail.com, vijaya.guvva@cavium.com, satananda.burla@cavium.com, raghu.vatsavayi@cavium.com, felix.manlunas@cavium.com, gospo@broadcom.com, sathya.perla@broadcom.com, vasundhara-v.volam@broadcom.com, tariqt@mellanox.com, eranbe@mellanox.com, jeffrey.t.kirsher@intel.com References: <20180322105522.8186-1-jiri@resnulli.us> <20180323134357.GG5145@lunn.ch> <20180323145935.GC2125@nanopsycho> <20180323152412.GC24361@lunn.ch> <20180324074551.GD1891@nanopsycho> <0B8BC202-9067-4D34-AC4F-79DC33B4E6F9@gmail.com> <20180324160749.GG1891@nanopsycho> <20180324174248.GH1891@nanopsycho> <20180324190032.GH31941@lunn.ch> From: Florian Fainelli Message-ID: Date: Sat, 24 Mar 2018 13:05:24 -0700 MIME-Version: 1.0 In-Reply-To: <20180324190032.GH31941@lunn.ch> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On 24/03/2018 12:00, Andrew Lunn wrote: >>>>>>>>> root@zii-devel-b:~# ./iproute2/devlink/devlink port >>>>>>>>> mdio_bus/0.1:00/0: type eth netdev lan0 flavour physical number 0 >>>>>>>>> mdio_bus/0.1:00/1: type eth netdev lan1 flavour physical number 1 >>>>>>>>> mdio_bus/0.1:00/2: type eth netdev lan2 flavour physical number 2 >>>>>>>>> mdio_bus/0.1:00/3: type notset >>>>>>>>> mdio_bus/0.1:00/4: type notset >>>>>>>>> mdio_bus/0.1:00/5: type notset flavour dsa number 5 >>>>>>>>> mdio_bus/0.1:00/6: type notset flavour cpu number 6 >>>>>>>>> mdio_bus/0.2:00/0: type eth netdev lan3 flavour physical number 0 >>>>>>>>> mdio_bus/0.2:00/1: type eth netdev lan4 flavour physical number 1 >>>>>>>>> mdio_bus/0.2:00/2: type eth netdev lan5 flavour physical number 2 >>>>>>>>> mdio_bus/0.2:00/3: type notset >>>>>>>>> mdio_bus/0.2:00/4: type notset >>>>>>>>> mdio_bus/0.2:00/5: type notset flavour dsa number 5 >>>>>>>>> mdio_bus/0.2:00/6: type notset flavour dsa number 6 >>>>>>>>> mdio_bus/0.4:00/0: type eth netdev lan6 flavour physical number 0 >>>>>>>>> mdio_bus/0.4:00/1: type eth netdev lan7 flavour physical number 1 >>>>>>>>> mdio_bus/0.4:00/2: type eth netdev lan8 flavour physical number 2 >>>>>>>>> mdio_bus/0.4:00/3: type eth netdev optical3 flavour physical > >>> What is an appropriate attribute to use to return the physical port number within a given switch? >> >> I don't think there's one out there. I tried to add it in this patchset. > > Florian, do you need it to be unique per switch, or DSA cluster. The > current solution is clearly not unique across a cluster. It needs to be unique per switch, we have the switch identifier through phys_switch_id for higher level "uniqueness". -- Florian