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, URIBL_BLOCKED,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 B8112C43381 for ; Mon, 4 Mar 2019 07:40:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 85ADF206B8 for ; Mon, 4 Mar 2019 07:40:11 +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="XULHqf3B" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726046AbfCDHkK (ORCPT ); Mon, 4 Mar 2019 02:40:10 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:40292 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725550AbfCDHkJ (ORCPT ); Mon, 4 Mar 2019 02:40:09 -0500 Received: by mail-wm1-f67.google.com with SMTP id g20so3591279wmh.5 for ; Sun, 03 Mar 2019 23:40:08 -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=eFy7yspGFxqlCTw6rC6NSHjJS4Wc+AEj38JTCmjKajE=; b=XULHqf3BV2PFX81g8v5KQCPkJChb7zI0UJkWz86/KKkAPxun/ucLjslBivqHWT3A5v 6Y4WjQmZC0aOfWlu41SuY3RYzW7GvgcvLjn2zDg+iaTq7+echDrAJ3OaM4hSVHLHobRD RrHzgINlLim19NR0Pu6uKh8wDU5WRi5I8JCtC/Ubyo26k9601nb4v/oYhBWlwFiTROIg m7eFt2+ZHfuVmufT/1he2VSfdMJFyEjPsQgD2Y2DNGry40hXECmwDFq2J6yqGk1+eSEr tKPwuj0LDqJdomfMG65zCJWvDSouuOsctZUlEJu1EG2hUWlXrW2m47LeV6ifZq6/yvdM 7yoQ== 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=eFy7yspGFxqlCTw6rC6NSHjJS4Wc+AEj38JTCmjKajE=; b=ecb5bg22lU2m6d5gOr+DOm60UFPgPPq7Qqj/+JARU2FrgHSVBLkycP5Y7XGvedQoz+ yafdBso5bodeylCTZwUesluEzrXIjPH7crZOjXALXAputVdJLYAzYVIdMJZkfmxcgGfV 70NB75VAcfjoIN9dD6cY8FPWgxEBHVX9vv4m2tjobLAQ8+2cXxjXdo7j9TRB2ot0nQxj 8cNprkHjwh8OlVjRGEGgVzJqBAx7i/m80CUYNBYZn9g8O6KB8DVLqPFIQLFuWPnral2K CfKKwvPisbEDqfv/HelZXcc5LNozzxOkjuX1SosU4ArBR8w44m38kBOpVSZ45rhFmAWZ TQMw== X-Gm-Message-State: AHQUAuZwoTDrGszdV3ks9HKbhe5v4T7l3MuSIFHSeVDw9w5FV6RQHGzS RJZ5bq26Js5zj+z+SD8sHoeqSw== X-Google-Smtp-Source: APXvYqwI2lrWn95601kL66TevOLgpskfoHkZsjUT/ezhc4UF0gPBQLOj6DOdDQNtJdfEywcBq9Qa9g== X-Received: by 2002:a1c:7c08:: with SMTP id x8mr10607883wmc.8.1551685207697; Sun, 03 Mar 2019 23:40:07 -0800 (PST) Received: from localhost (ip-89-177-134-16.net.upcbroadband.cz. [89.177.134.16]) by smtp.gmail.com with ESMTPSA id i74sm6450325wmg.48.2019.03.03.23.40.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Mar 2019 23:40:07 -0800 (PST) Date: Mon, 4 Mar 2019 08:30:18 +0100 From: Jiri Pirko To: Parav Pandit Cc: Jakub Kicinski , "davem@davemloft.net" , "oss-drivers@netronome.com" , "netdev@vger.kernel.org" Subject: Re: [PATCH net-next 2/8] devlink: add PF and VF port flavours Message-ID: <20190304073018.GT2314@nanopsycho> References: <20190226182436.23811-1-jakub.kicinski@netronome.com> <20190226182436.23811-3-jakub.kicinski@netronome.com> <20190227121644.GA2240@nanopsycho> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 04, 2019 at 05:59:04AM CET, parav@mellanox.com wrote: > > >> -----Original Message----- >> From: netdev-owner@vger.kernel.org On >> Behalf Of Jiri Pirko >> Sent: Wednesday, February 27, 2019 6:17 AM >> To: Jakub Kicinski >> Cc: davem@davemloft.net; oss-drivers@netronome.com; >> netdev@vger.kernel.org >> Subject: Re: [PATCH net-next 2/8] devlink: add PF and VF port flavours >> >> Tue, Feb 26, 2019 at 07:24:30PM CET, jakub.kicinski@netronome.com wrote: >> >Current port flavours cover simple switches and DSA. Add PF and VF >> >flavours to cover "switchdev" SR-IOV NICs. >> > >> >Example devlink user space output: >> > >> >$ devlink port >> >pci/0000:82:00.0/0: type eth netdev p4p1 flavour physical >> >pci/0000:82:00.0/10000: type eth netdev eth0 flavour pcie_pf pf 0 >> >pci/0000:82:00.0/10001: type eth netdev eth1 flavour pcie_vf pf 0 vf 0 >> >pci/0000:82:00.0/10002: type eth netdev eth2 flavour pcie_vf pf 0 vf 1 >> >A given port is of its parent device. >In current scenario, its PF or VF. >Hence it should be device attribute and not a port attribute. I think that this works. You have VF_rep ports, PF_rep ports and PHYSICAL ports. In mlxsw for example, there are only PHYSICAL ports. In sr-iov world, there is also a PHYSICAL port on the eswitch. The others are either facing PF of VF. Looks accurate. I don't see any need for "devlink dev" flavour. >So devlink dev show command have to show what device flavour is. >Is it well known PCI VF or PF or something else. >It will show subdev device attribute and its parent PCI (PF/VF) devlink device. >So we should have device flovour as PCI_PF or PCI_VF or SUBDEV. > >Again VF number showcasing here is very restrictive model. >Every PF/VF/Subdev represents its own 'port' and it is connected to eswitch 'port'. >Instead of showing VF here, it must be this 'port' or 'link' number that gives right view. >Which netdev represents which VF is already linked in the VF rep-netdev sysfs property. I think you confuse the eswtich ports (in Jakub's output it's them) and the actual VF. > >So flavour should be something like 'hostport' and when port is registered for the eswitch side it should be 'switchport'. >With this there is very clear picture of which hostport is connected to which eswitch port. >Just like how we see in the physical world. >