Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp837297lqt; Fri, 19 Apr 2024 11:51:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/uBxHYm9qsk1g6pZ3R3sXo2DH18t/4hFqX7w5ttXwOMdpagZTUvfU9N2+QhNuCjsohRVMB6wgY5FBMpRS2b1FxYoqrPEj7QJ57xUyaQ== X-Google-Smtp-Source: AGHT+IGc0r42cF5aN9ItNw1avdXjJtiawdiXIBiqNgvAIZmsP1WVo0jQelVCgF9aFO7qrW9K2wWn X-Received: by 2002:a05:6a20:3d83:b0:1a7:a3ee:5e4a with SMTP id s3-20020a056a203d8300b001a7a3ee5e4amr3650689pzi.33.1713552695507; Fri, 19 Apr 2024 11:51:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713552695; cv=pass; d=google.com; s=arc-20160816; b=LbxlsQDz4Ubx4V2cNmQzi5JknWw8PoBTjvyuatWxpgJFExduUrWn2XBwB5qHBzaJkg CE9RTmp3ZowDUdWe0sa5mb93h6D3a5L0qerMqoPSKTdzoZ+sBm8CPjdrghaInYlE50v+ yZSlQDZSzyl/z1GXvvvrhBqexJoyPvpP0GdzqVMYZ1ML0oypgzlO04SUJs4tfzGzI7U+ Do3wb+kjAf8hsS/jHpt/EnkU93MYPCaop19plvWFQa2ZOmAzafh6I+sDA4CaxAb6aub8 FYD+UymSOWleo9rzIW1YcZmIrrCr13DZemJt7HOiPtFwN/55GCuMo8+iSZ4VQMckAFzz 4+EQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jRVHW2PCpBb94pqr05BjINl9EOFyc8yE25pKcg6N4Ao=; fh=zAPD5GE7AMh+MQtVD8ll1NNN4vf1uO1OEZ6VidQbARs=; b=xer55aFr/Jl9rlWPDs0WnOpwQhlqFbedURM6CfPVGM1Qg5AH1pMRUbOQHvdCst6wkh SNpBoIC2A8b1B9QzH43Nn0Ze4ocoQQdHl9sayZkyU4v8s19j0PZ8LSdR3wkfBODUTkUR 8UVp8lI3MUXc6FjLMSWQ/zKz882Dt5cflxyvqs08WctremdXPzSswwquNUTAVOS949Oo azMCyyvi3Iidfg2QdTP5EUEBBxzOgCzot9J0F4DC8lPwIzslwWqNLNxccA7edrrWxJrE NPJwehi0XJJb55yK9b/R9onuj6yQfOXTwrtsdGd3I4xVoWoAui9BsYBnAUpLxHYPg5fF n7/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=KBEvA+an; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-151883-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d11-20020a170902728b00b001e3c6977a64si3468765pll.143.2024.04.19.11.51.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 11:51:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151883-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=KBEvA+an; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-151883-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 40B5EB21336 for ; Fri, 19 Apr 2024 18:51:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40D2813AD08; Fri, 19 Apr 2024 18:51:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="KBEvA+an" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B85F1D268; Fri, 19 Apr 2024 18:51:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713552669; cv=none; b=urX1NQPXAJrbp9oGBy7K4y7q0LZxNRy72TAuBTx8v4WzXjB1BapEl9YMV3lE+ZgL6CJv7wtTArxNt2nMO2oai0oSJbP95YpYHX27KaFPVxsiN87nYm7N0pEKeI1vvNrmF6nBf2hUYC31BKUshMvYF4F7wb3zW4Cdu0agn9Sh9iw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713552669; c=relaxed/simple; bh=P4EtuerERfS5igN+jp36Qe+A7aj+Bbvo7bQyGhs8zHo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DKZA5ke/MX3G8KwUWIyxIMe0qLvvLgiYKetBcdWtHmaiP9V3woGU1sgl3trevOvs7i7DgMWm3RMxe1uMqCFvs1pZVe9YccPDQSqgq6wj6+iZ/6LTfrNev2yR0Lbcxmrpajvm88GnRjU1u5ARNC7KS2cZQs5M/kyvSPQMjU7cadU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=KBEvA+an; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=jRVHW2PCpBb94pqr05BjINl9EOFyc8yE25pKcg6N4Ao=; b=KBEvA+anCYQeH7oaHpSIuEiU3p zaq2qt2V/W3XaJNXKU6wKxZ1uvt6SUB52khMl5RscIcjN2+zV5ZcuEJz3ONS5VrpBTKIFTgP/q5lv oRYfhuf01Ms8nK7wX4vQvMoBYZu3hmR67ZScYXXaqLFwblTT7o+7AgLpAP9LdWSpaSzM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rxtKA-00DTWj-F5; Fri, 19 Apr 2024 20:51:02 +0200 Date: Fri, 19 Apr 2024 20:51:02 +0200 From: Andrew Lunn To: Shradha Gupta Cc: Jason Gunthorpe , Zhu Yanjun , linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, Eric Dumazet , Jakub Kicinski , Paolo Abeni , Ajay Sharma , Leon Romanovsky , Thomas Gleixner , Sebastian Andrzej Siewior , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Michael Kelley , Shradha Gupta , Yury Norov , Konstantin Taranov , Souradeep Chakrabarti Subject: Re: [PATCH net-next] net: mana: Add new device attributes for mana Message-ID: References: <1713174589-29243-1-git-send-email-shradhagupta@linux.microsoft.com> <20240415161305.GO223006@ziepe.ca> <56b0a8c1-50f6-41a9-9ea5-ed45ada58892@linux.dev> <20240418060108.GB13182@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20240418175059.GZ223006@ziepe.ca> <20240419165926.GC506@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240419165926.GC506@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> On Fri, Apr 19, 2024 at 09:59:26AM -0700, Shradha Gupta wrote: > On Thu, Apr 18, 2024 at 08:42:59PM +0200, Andrew Lunn wrote: > > > >From an RDMA perspective this is all available from other APIs already > > > at least and I wouldn't want to see new sysfs unless there is a netdev > > > justification. > > > > It is unlikely there is a netdev justification. Configuration happens > > via netlink, not sysfs. > > > > Andrew > > Thanks. Sure, it makes sense to make the generic attribute configurable > through the netdevice ops or netlink implementation. I will keep that in > mind while adding the next set of configuration attributes for the driver. > These attributes(from the patch) however, are hardware specific(that show > the maximum supported values by the hardware in most cases). ndev->max_mtu = gc->adapter_mtu - ETH_HLEN; ndev->min_mtu = ETH_MIN_MTU; This does not appear to be specific to your device. This is very generic. We already have /sys/class/net/eth42/mtu, why not add /sys/class/net/eth42/max_mtu and /sys/class/net/eth42/min_mtu for every driver? Are these values really hardware specific? Are they really unique to your hardware? I have to wounder because you clearly did not think much about MTU, and how it is actually generic... Andrew