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 790D1C43381 for ; Wed, 27 Feb 2019 13:08:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E5CC20C01 for ; Wed, 27 Feb 2019 13:08:34 +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="BcTz12p2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730037AbfB0NId (ORCPT ); Wed, 27 Feb 2019 08:08:33 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38614 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726122AbfB0NIc (ORCPT ); Wed, 27 Feb 2019 08:08:32 -0500 Received: by mail-wr1-f66.google.com with SMTP id g12so5798724wrm.5 for ; Wed, 27 Feb 2019 05:08:31 -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=p7sYsuUzugInrZIo2oZCuOIw30iRAL8+GAoPzR+2gwA=; b=BcTz12p2iBZvnxs93YrX+okXahNnziaOAtu7bM478oqZjdmeH+dTwhBlBpfIIY1k+1 ae18lDTGQIVpIX6uQIIXKombYwZc+uOzopw+NDdci+yfH/8/9YGwE6/XBbV39yBwvNhu pRMqoX0UPcpKNnZoVd44OkOGrE0r8QCPvcxmV9OYScBNWCwBHfbbgrl+fofYvQ8i1Wvl gmS3jK+kHQSTY/zmstfy9y2yWBphvkyIMdcgTDD39Hhil5in3Om+pGZMOON2FdvJrRiW fi+N6H3/9MwsGd7yp06DqUenA0oQmaZccxvS2rciYYssNqu9W43skX49D20W6ZlnwyfP CqkQ== 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=p7sYsuUzugInrZIo2oZCuOIw30iRAL8+GAoPzR+2gwA=; b=JzFfMM3J9achjjcat9noKTTSEwKki7njkeSWpaHnx5zPlii0RlntfZiYI+9YZKtAbA io9Hg/ymS9UTUy7cxYu2Xi1J6jFvlr5MwFe2l+l3u4Ub7KRV3t8/0vvvpOdXgoKsOqqj 5XqyOTKQ+g6k7Sg2k6zGqNLcUB1dRULF6HMh086LBwF+ZfOuvXlM57yRHykCEvNU49N4 yWvdGekdmRJmoKgGzJfv6E8YiDw9QHCPXdBCvQcVqbK/RaI5ig1ckh3hiLSYJI5tA8hX c+fmfcx2rgvWqO/pCOk5tCh1DZcGWOg2YWHtrRlGqOCfno9x/EUYlCxbKpxxXOUHsDD8 jF0Q== X-Gm-Message-State: APjAAAVcODC76tNA52vJZPQ1pjRZ0ZmVmCo1sk3rA8uMb6X9Bsey+tFb ajYGUmJluUYLMmKS3FrzTToobg== X-Google-Smtp-Source: APXvYqzjfPXS5hsCzoRHVp2j/mmJhMz6fCyWuiub6ZC+/FNIWMeoPChFx7gCM+ycbfc4F5V06zBbMw== X-Received: by 2002:a5d:540f:: with SMTP id g15mr2529077wrv.126.1551272911135; Wed, 27 Feb 2019 05:08:31 -0800 (PST) Received: from localhost (mail.chocen-mesto.cz. [85.163.43.2]) by smtp.gmail.com with ESMTPSA id y20sm14715291wra.51.2019.02.27.05.08.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Feb 2019 05:08:30 -0800 (PST) Date: Wed, 27 Feb 2019 14:08:29 +0100 From: Jiri Pirko To: Jakub Kicinski Cc: davem@davemloft.net, oss-drivers@netronome.com, netdev@vger.kernel.org Subject: Re: [PATCH net-next 6/8] devlink: introduce port's peer netdevs Message-ID: <20190227130829.GC2240@nanopsycho> References: <20190226182436.23811-1-jakub.kicinski@netronome.com> <20190226182436.23811-7-jakub.kicinski@netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190226182436.23811-7-jakub.kicinski@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 Tue, Feb 26, 2019 at 07:24:34PM CET, jakub.kicinski@netronome.com wrote: >Devlink ports represent ports of a switch device (or SR-IOV >NIC which has an embedded switch). In case of SR-IOV when >PCIe PFs are exposed the PFs which are directly connected >to the local machine may also spawn PF netdev (much like >VFs have a port/"repr" and an actual VF netdev). > >Allow devlink to expose such linking. There is currently no >way to find out which netdev corresponds to which PF. > >Example: > >$ devlink port >pci/0000:82:00.0/0: type eth netdev p4p1 flavour physical >pci/0000:82:00.0/10000: type eth netdev eth1 flavour pci_pf pf 0 peer_netdev enp130s0 >pci/0000:82:00.0/10001: type eth netdev eth0 flavour pci_vf pf 0 vf 0 >pci/0000:82:00.0/10002: type eth netdev eth2 flavour pci_vf pf 0 vf 1 Peer as the other side of a "virtual cable". For PF, that is probably sufficient. But I think what a "peer of devlink port" should be "a devlink port". Not sure about VF. Consider a simple problem of setting up a VF mac address. In legacy, you do it like this: $ ip link set eth2 vf 1 mac 00:52:44:11:22:33 However, in new model, you so far cannot do that. What I was thinking about was some "dummy peer" which would be on the host. Not sure if only as a "dummy peer devlink port" or even as some sort of "dummy netdev". One way or another, it would provide the user some info about which VF representor is connected to which VF in VM (mac mapping).