From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f171.google.com ([209.85.192.171]:40740 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755254AbeCVPeQ (ORCPT ); Thu, 22 Mar 2018 11:34:16 -0400 Received: by mail-pf0-f171.google.com with SMTP id v66so1019897pfv.7 for ; Thu, 22 Mar 2018 08:34:16 -0700 (PDT) Subject: Re: [patch net-next RFC 00/12] devlink: introduce port flavours and common phys_port_name generation To: Jiri Pirko , netdev@vger.kernel.org Cc: davem@davemloft.net, idosch@mellanox.com, jakub.kicinski@netronome.com, mlxsw@mellanox.com, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.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, 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> From: David Ahern Message-ID: <7217d1fb-665f-92cf-2704-364b91cb8248@gmail.com> Date: Thu, 22 Mar 2018 09:34:07 -0600 MIME-Version: 1.0 In-Reply-To: <20180322105522.8186-1-jiri@resnulli.us> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On 3/22/18 4:55 AM, Jiri Pirko wrote: > From: Jiri Pirko > > This patchset resolves 2 issues we have right now: > 1) There are many netdevices / ports in the system, for port, pf, vf > represenatation but the user has no way to see which is which > 2) The ndo_get_phys_port_name is implemented in each driver separatelly, > which may lead to inconsistent names between drivers. Similar to ndo_get_phys_port_{name,id}, devlink requires drivers to opt in with an implementation right, so you can't really force a solution to the consistent naming. > > This patchset introduces port flavours which should address the first > problem. I'm testing this with Netronome nfp hardware. When the user > has 2 physical ports, 1 pf, and 4 vfs, he should see something like this: > # devlink port > pci/0000:05:00.0/0: type eth netdev enp5s0np0 flavour physical number 0 > pci/0000:05:00.0/268435456: type eth netdev eth0 flavour physical number 0 > pci/0000:05:00.0/268435460: type eth netdev enp5s0np1 flavour physical number 1 > pci/0000:05:00.0/536875008: type eth netdev eth2 flavour pf_rep number 536875008 > pci/0000:05:00.0/536870912: type eth netdev eth1 flavour vf_rep number 0 > pci/0000:05:00.0/536870976: type eth netdev eth3 flavour vf_rep number 1 > pci/0000:05:00.0/536871040: type eth netdev eth4 flavour vf_rep number 2 > pci/0000:05:00.0/536871104: type eth netdev eth5 flavour vf_rep number 3 How about 'kind' instead of flavo{u}r?