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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 7FA77C433DF for ; Thu, 4 Jun 2020 02:48:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3FC40206C3 for ; Thu, 4 Jun 2020 02:48:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591238929; bh=tkqTB3HywmuSqr5h1TruL53mUKtFVywlSGoRVaK7Phg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=DeGYCPKqzKbfbRrdoueIom3ESgr3dL9qzaPXfsLpRRanRQ6SgvyjoEN8OEjqHuHV4 vHyvCBML1MXjSErpM4lTMDbX0t9M6fBP/Rd2mm/EKdwufNB3m2ItyPX5u0uIHkCqRe jxOvN5KLJxu+gu+eCnINVWsEJJkyi+fj5lVDkQj0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726296AbgFDCss (ORCPT ); Wed, 3 Jun 2020 22:48:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:53700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbgFDCss (ORCPT ); Wed, 3 Jun 2020 22:48:48 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E01DF20657; Thu, 4 Jun 2020 02:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591238927; bh=tkqTB3HywmuSqr5h1TruL53mUKtFVywlSGoRVaK7Phg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VM2Db7Z7ukqm3m+jFUzzRDhmUReA42TIYpQxjPj2tkB8vWvOaHiduKMstKV9ohIps xsUESA8M9Kv4ChdqeP6U3gW9+ebjTBHjkmGPlwYLqd4IopblDy1NC449gTJa1Q/mSX sEX5D7+Kt/+EBpelYKfEgcdktq4m5EE3uMLFXKxk= Date: Wed, 3 Jun 2020 19:48:45 -0700 From: Jakub Kicinski To: Jiri Pirko Cc: Danielle Ratson , netdev@vger.kernel.org, davem@davemloft.net, michael.chan@broadcom.com, jeffrey.t.kirsher@intel.com, saeedm@mellanox.com, leon@kernel.org, jiri@mellanox.com, idosch@mellanox.com, snelson@pensando.io, drivers@pensando.io, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, mlxsw@mellanox.com Subject: Re: [RFC PATCH net-next 0/8] Expose devlink port attributes Message-ID: <20200603194845.3506104f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20200603104504.GA2165@nanopsycho> References: <20200602113119.36665-1-danieller@mellanox.com> <20200602123311.32bb062c@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> <20200603104504.GA2165@nanopsycho> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 3 Jun 2020 12:45:04 +0200 Jiri Pirko wrote: > Tue, Jun 02, 2020 at 09:33:11PM CEST, kuba@kernel.org wrote: > >On Tue, 2 Jun 2020 14:31:11 +0300 Danielle Ratson wrote: > >> Currently, user has no way of knowing if a port can be split and into > >> how many ports. > >> > >> Among other things, it is currently impossible to write generic tests > >> for port split. > >> > >> In order to be able to expose the information regarding the split > >> capability to user space, set the required attributes and pass them to > >> netlink. > >> > >> Patch 1: Move set attribute from devlink_port_attrs to devlink_port. > >> Patch 2: Move switch_port attribute from devlink_port_attrs to devlink_port > >> Patch 3: Replace devlink_port_attrs_set parameters with a struct. > >> Patch 4: Set and initialize lanes attribute in the driver. > >> Patch 5: Add lanes attribute to devlink port and pass to netlink. > >> Patch 6: Set and initialize splittable attribute in the driver. > >> Patch 7: Add splittable attribute to devlink port and pass them to netlink. > >> Patch 8: Add a split port test. > > > >Since we have the splitability and number of lanes now understood by > >the core - can the code also start doing more input checking? > > Yep, that should certainly be done so some of the checks can move from > the drivers. Do you want to have this done as a part of this patchset or > a separate one? May be a little quicker to review if everything was done in one series, but no strong feelings.