Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1270688pxb; Fri, 20 Nov 2020 05:42:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvPymiOYO2k7uk+ALEQFRjWk/RIT68e9VKxXucy19c27oPgC865HmVci03qAYRBjSyEd/E X-Received: by 2002:a17:906:6d99:: with SMTP id h25mr33251078ejt.281.1605879725431; Fri, 20 Nov 2020 05:42:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605879725; cv=none; d=google.com; s=arc-20160816; b=pcnCOBjLanHNqJYSfNQTZ0tWWD9VSsJlY2RKjHrTTZe3MXYmkKUI08WKGWGVTyKCQN 8aKB0/STec4/J5B+KEC9e+OPb5mSDPkTMz2pqAvcAUlJa+Jmp6W0C1nnjACzGOywCIts 0y1DWNmtDwIlc5gIyV/TSTQjIu2TJNX5eX1brjeyD4j0CCWZKrx0Hxe4qMuQMV/dPjJ8 4yQbwxqkhR8+9faSOaX4AjUeuAOre9kRtL+hQMnN5Cyvrmh8IVn+c3jyqT+f2M+9uij5 EE8w0tzMv5SOkk16WHPA05RKBFfUsW8V19tK+kelLsq//m6+aYWnq/Ep7hgCDuHjTuhz pAaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=4TzYSFuY33A2xuDlEup7puePuHPzcXfpvxwGI6cQg20=; b=hymbZo26ufsitV3akXv8Gucvt8ttZ6/8MyWL7NwUIr8Z8OdHmvgUCugnPO+039/qrG sT6HnAX17WKIPz7DmSOaNAFfVZai07Xkal3Snv6Ok2DH4tEBFVXtEWQFWopL0boVxkAn JhUfWJNX6HYnf6WrMkQDrnYfZlgZYr81oHtSwcIjuNJqTLafIAgcUcc6eB7rsIFk7Gmt qORAe/x725JZLHXUmZ/E+grGKY/czpcGu/1Xh9QyF4uAseKD78MoYO2l8UFcgGQ2YZSg IcREwGXCO6A0EEvyUNOp6lOCIaONpLCWS8C6a2kC0N0UyktJJ9uzcLjXJJQ3DzX4sulH 9M4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j19si1631808ejs.634.2020.11.20.05.41.41; Fri, 20 Nov 2020 05:42:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727927AbgKTNjo (ORCPT + 99 others); Fri, 20 Nov 2020 08:39:44 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:41184 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726590AbgKTNjn (ORCPT ); Fri, 20 Nov 2020 08:39:43 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kg6dW-0087B0-Fl; Fri, 20 Nov 2020 14:39:38 +0100 Date: Fri, 20 Nov 2020 14:39:38 +0100 From: Andrew Lunn To: Michal Kubecek Cc: tanhuazhong , davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, kuba@kernel.org Subject: Re: [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing Message-ID: <20201120133938.GG1804098@lunn.ch> References: <1605758050-21061-1-git-send-email-tanhuazhong@huawei.com> <1605758050-21061-2-git-send-email-tanhuazhong@huawei.com> <20201119041557.GR1804098@lunn.ch> <20201119220203.fv2uluoeekyoyxrv@lion.mk-sys.cz> <8e9ba4c4-3ef4-f8bc-ab2f-92d695f62f12@huawei.com> <20201120072322.slrpgqydcupm63ep@lion.mk-sys.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201120072322.slrpgqydcupm63ep@lion.mk-sys.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 20, 2020 at 08:23:22AM +0100, Michal Kubecek wrote: > On Fri, Nov 20, 2020 at 10:59:59AM +0800, tanhuazhong wrote: > > On 2020/11/20 6:02, Michal Kubecek wrote: > > > > > > We could use a similar approach as struct ethtool_link_ksettings, e.g. > > > > > > struct kernel_ethtool_coalesce { > > > struct ethtool_coalesce base; > > > /* new members which are not part of UAPI */ > > > } > > > > > > get_coalesce() and set_coalesce() would get pointer to struct > > > kernel_ethtool_coalesce and ioctl code would be modified to only touch > > > the base (legacy?) part. > > > > While already changing the ops arguments, we could also add extack > > > pointer, either as a separate argument or as struct member (I slightly > > > prefer the former). > > > > If changing the ops arguments, each driver who implement > > set_coalesce/get_coalesce of ethtool_ops need to be updated. Is it > > acceptable adding two new ops to get/set ext_coalesce info (like > > ecc31c60240b ("ethtool: Add link extended state") does)? Maybe i can send V2 > > in this way, and then could you help to see which one is more suitable? > > If it were just this one case, adding an extra op would be perfectly > fine. But from long term point of view, we should expect extending also > other existing ethtool requests and going this way for all of them would > essentially double the number of callbacks in struct ethtool_ops. coccinella might be useful here. Andrew