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 51F3CC43381 for ; Fri, 29 Mar 2019 06:49:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 146712064A for ; Fri, 29 Mar 2019 06:49:10 +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="ZuMqVK/9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728740AbfC2GtI (ORCPT ); Fri, 29 Mar 2019 02:49:08 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:44842 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728700AbfC2GtI (ORCPT ); Fri, 29 Mar 2019 02:49:08 -0400 Received: by mail-wr1-f68.google.com with SMTP id y7so1139520wrn.11 for ; Thu, 28 Mar 2019 23:49:07 -0700 (PDT) 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=ZOJPRAPiWEzddOqjrIdI3lV7LLX42iy8Y/adOVc5MJA=; b=ZuMqVK/9fsP3ZKuJM4a0waEEqm+LmQwm+xNZa/lB+xCAljvv6yufXuZbEPjRybiq2d GAVX+qp0cHh9Y0ClWxxNlbqXmg8MosaLkPqWAAB6CcaQiNF/UCZejrya8JFQkqqrfcFG QzXGRgbYnHh38DvRCnRoDbAQiZ/krlVL3fRlOuZF/1uFT6aSp6f9TpCJBW/7J1sFh3Oy Uw8tTYXYXY/3hkWNnABSMEtf95lfq5xiZnRnjqnsD8sgp3JC9khI+q9408Pc4oKrY5yt l723XIFZpO9Grudju7FM4Z75U91UgXwyzkHNqbgfETO/v02nRl0gfs/qk4tRZ3i49C7X ywoQ== 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=ZOJPRAPiWEzddOqjrIdI3lV7LLX42iy8Y/adOVc5MJA=; b=sL3OT+9OPh3RSJaajkvpKr7xCj+03rq+Fi4PvyBjpA9fjB6pJ7/eNn4SjvtihmFXjK inW/JzrN60Qe+9y6SWPbk7ju81vG638gW3vr1BBwsQZPr0vgdKxPJkjFb7IyjLduV2TF bxsBd6UslUxuo6jG5tpQXn6xKLS9MYZgx13GgIAsTmIS6NlGr7MQ/b+KEjpGCkK03otQ muRKhlJyNLdU5ANdonLFInVSBZ+J+c8MTI2BlrPR02+eKluwrJYei9q7YuF3ehSyrBlU jFil4vMo503GLIBO/rYottTXk2wT6CZnLQycNX3v/tuCwsDQCY0uP6UXMwC9BlGfvV4j z96Q== X-Gm-Message-State: APjAAAXJGnUF6tWzmdNeheBriuIKGMNFccJlPbjqmsx5gvwUmP4pDkVj 7jk/Mrd0oDq1ynZuReJ2OVnkag== X-Google-Smtp-Source: APXvYqz6T/PkQi1w4JUnAtK4MD0aEKsNJc3mNpj4du37q6ygxkpUE0M9QgDCdpq7Sk+06y5M2Fhb0Q== X-Received: by 2002:adf:ed86:: with SMTP id c6mr30656559wro.146.1553842146712; Thu, 28 Mar 2019 23:49:06 -0700 (PDT) Received: from localhost (ip-94-113-223-73.net.upcbroadband.cz. [94.113.223.73]) by smtp.gmail.com with ESMTPSA id r16sm1077245wrx.37.2019.03.28.23.49.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Mar 2019 23:49:06 -0700 (PDT) Date: Fri, 29 Mar 2019 07:49:05 +0100 From: Jiri Pirko To: Jakub Kicinski Cc: netdev@vger.kernel.org, davem@davemloft.net, mlxsw@mellanox.com, idosch@mellanox.com, f.fainelli@gmail.com, andrew@lunn.ch, vivien.didelot@gmail.com, michael.chan@broadcom.com Subject: Re: [patch net-next 00/12] net: expose switch ID via devlink Message-ID: <20190329064905.GS14297@nanopsycho> References: <20190328211254.1894-1-jiri@resnulli.us> <20190328144002.245c9eef@cakuba.netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190328144002.245c9eef@cakuba.netronome.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Thu, Mar 28, 2019 at 10:40:02PM CET, jakub.kicinski@netronome.com wrote: >On Thu, 28 Mar 2019 22:12:42 +0100, Jiri Pirko wrote: >> From: Jiri Pirko >> >> To provide visibility of the ports, this patchset exposes switch ID >> for devlink ports, which are part of a switch. The rest of the ports >> if any (in case of sr-iov for example) do not set switch ID. > >I don't feel good about this patch set. There is no visibility >provided here. Should the port flavour should be a sufficient 1) this patch is mainly about avoiding need to define the ndo and moving the switch id definition to devlink port attr. 2) along with that, switch id is added as attribute. It tells the user that some devlink port is part of a switch with certain id. If port is not part of a switch (like upcoming hostport, cpu, dsa, etc), switch id is not set on that port >indication of whether netdev associated with that port can be >switched to or not? CPU, DSA, and Host flavours can't be switched >to. And the switchid can be an attribute of the devlink instance, >if we want to expose it via devlink. One devlink instance can have multiple switch ids in use as it may contain multiple switches. Take mlx5 as an instance. Currently every PF creates a separate devlink instance, however there are some features shared. In this example, with proposed idea of aliasing, there would be one devlink instance aliased between these 2 pf inctances, with 2 eswitches and 2 sets of switch ports each belonging to an eswitch - distinguished by switch id.