Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5156032imm; Tue, 21 Aug 2018 07:11:51 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwy62sAcc2FGyKt16N55AUj61pXGQj6GKst5WxF13x1HRBTd9xHHAdZwEI0AbO/3GbJMiBV X-Received: by 2002:a62:c0c4:: with SMTP id g65-v6mr52916856pfk.72.1534860711847; Tue, 21 Aug 2018 07:11:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534860711; cv=none; d=google.com; s=arc-20160816; b=MqkL+7O43wHPU/pgHl0fFWG0GFjlX439bb1gZACXDOaog3tqU/1HcT25SIkA4dFc2u sXLsq9+3cr40+bqRlHLPCGpx/AA4U72E85zwXLcs8jux6509NBFgS3fE2HlRd3JNtEZr WN5/6Bk6IogNuIIwfTPrQ9g8RHxkBtiwjPdlT7GBQliRxj5vCHpdwRdr4+7wOF+RGM8C SqE3QgO080wgcdWbl/VnmvcQpP/JO+XGDuvY+6rNXZ5QtcSTLsgZAUkGwBGzAu9JqYfD uR1eiEIr7WjLC+YdtnRawahSotiXxJ4BjZP0VbZVbxgGPrt997V3DmBllpbdCll9az8A neSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=w7j4L49OOuVdMajWg0adFjrGiNlaN4fBwF83BsCwRgo=; b=IdjOJpsW517hWj7kRHuMad49ybFtPF8x/3PtENHc106H/W8A6RKVKvFZg4djKcQ2OD rREEgmffJzewW44tQCzt7+pUU2Jd44yPTQSbRErpFGVZUzcmgCvSBEjpu0E4SHLlJXa3 V/zmrd43IxI8ZqQcBE4Iy1YYe8wPXUBYhPfX+58l5G+E7jw/ICE5mgxbxS8tuGkjr4Er p1Sos/5AXtS5s2TcnFXuqQUn8WQWb2DlV2imslb2e4IZUGGt2603Ry547ROmBO/9vJVz twFOqfMltmOmI1UZ98Vjsmz+a4+qVhGHPUyybZmGDdJjY6v3RB5MC43rTOw6shQ8cMvm oF8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=pxJltKKL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 88-v6si13470798plc.515.2018.08.21.07.11.34; Tue, 21 Aug 2018 07:11:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=pxJltKKL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727610AbeHURaq (ORCPT + 99 others); Tue, 21 Aug 2018 13:30:46 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:40168 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727427AbeHURap (ORCPT ); Tue, 21 Aug 2018 13:30:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=w7j4L49OOuVdMajWg0adFjrGiNlaN4fBwF83BsCwRgo=; b=pxJltKKLvSlgpUoWgQGYGcCE29yMX7z+3hmFLyKWFOSlL9Xp4c6qz8o9GzNYljOhdZfmKlbBLqR47AZtMJVT1c2JQiY05GyehBM7alEt2kcxFnyudVdRNC05cMnsgXGCoTw5UMghkFam4tCWHGQxpnaqlLnXY46DP7qLivHRBTM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1fs7MU-0001HN-RX; Tue, 21 Aug 2018 16:10:22 +0200 Date: Tue, 21 Aug 2018 16:10:22 +0200 From: Andrew Lunn To: Michal Kubecek Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Pirko , David Miller , Florian Fainelli , Roopa Prabhu , Jakub Kicinski , "John W. Linville" Subject: Re: [RFC PATCH net-next v2 10/17] ethtool: implement GET_SETTINGS message Message-ID: <20180821141022.GD2985@lunn.ch> References: <67d3b68a50e95db9612cc96e42a52ce332f716a9.1532953989.git.mkubecek@suse.cz> <20180730185455.GJ2983@lunn.ch> <20180821093245.ktattosaduf6jvya@unicorn.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180821093245.ktattosaduf6jvya@unicorn.suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 21, 2018 at 11:32:46AM +0200, Michal Kubecek wrote: > On Mon, Jul 30, 2018 at 08:54:55PM +0200, Andrew Lunn wrote: > > > +/* Internal kernel helper to query a device ethtool_link_settings. > > > + * > > > + * Backward compatibility note: for compatibility with legacy drivers > > > + * that implement only the ethtool_cmd API, this has to work with both > > > + * drivers implementing get_link_ksettings API and drivers > > > + * implementing get_settings API. When drivers implement get_settings > > > + * and report ethtool_cmd deprecated fields > > > + * (transceiver/maxrxpkt/maxtxpkt), these fields are silently ignored > > > + * because the resulting struct ethtool_link_settings does not report them. > > > > ~/linux/drivers$ grep -r [.]get_settings * > > net/ethernet/8390/etherh.c: .get_settings = etherh_get_settings, > > > > I don't think it is worth adding support for .get_settings for just > > one driver. It is better to just convert that driver to the new API. > > I have prepared a patch converting 8390/etherh driver to use > {g,s}et_link_ksettings and I'm going to submit it when net-next opens. > Do you think we can then drop {g,s}et_settings callbacks completely > (i.e. also from ioctl() code and ethtool_ops)? Do we care about > unconverted out of tree drivers? Hi Michal We cannot break ethtool, the ABI it uses. But there is already code to use get_link_ksettings() and only fall back to get_settings if it does not exist. So we can clean up all the fallback code, remove the ethtool_ops, etc. I personally don't care about out of tree drivers. They have had over 2 years to change to the new API. Andrew