Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1062504pxb; Thu, 19 Nov 2020 23:25:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwERvhQ3fZuqIz+Rjkcou93IjKsVU1FGScYAT7OY3Je0j9G5nYGqc871Y5/ewS3kbrEsrr6 X-Received: by 2002:a17:906:7016:: with SMTP id n22mr33368364ejj.402.1605857134644; Thu, 19 Nov 2020 23:25:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605857134; cv=none; d=google.com; s=arc-20160816; b=F6XlL9Uc2aa+qE+idKJF22wpXj/m4DQl5Z6GzqT80BJXFNGStQFM0BzYpY7edqFcio oHYKuyl6ikdmuJUTO3gOJrbE75hnE5sBxhDoToqV5TEohLHseNAfH9LBdCzKzqmNRQ91 GUswbvdxOpTrkiGSUoVOsbgngGTTS0QCnM0ZRPj5FC09nsawlE6nr7LC0tm8ACy+KW8K 3q2VnfYjTKKqkYuieoDo5tiBUXkZmdsePSeCu7TYMd1EOIixThhPHED0RPyLr7fmBp7S RV9AEjV4N1kzFHn++LceS6Fd1mSCIwrUc4t+F1r2dAK3XG2cvFp/ycedC3n/QTGB7sMP wV2g== 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=86+PVJJtC+5CY9ekx7i3dDVZBvSUJ+m+AkxDZE8TjGc=; b=zWgwHF31Uyp2nNuJ30ERLGWjDiDNcESJ42LCn6S4fDXd6k/+0vj7+Kmle/R5XjG5A6 99xAraXuBByLnKoeziK2L7iI9AtfdQ3hpHMsobBqx0pCcUxNHSRLEva4rO7EDxsRXiJw cW7nbLyNvJY8iQekRkswkLF17QtnNrndumtoXlN2iknyJlFzFsClNMiL4RkEJqAakCKL tD9/n+Smg44oQeD8IXE0SycMjTx6kQ4m9OCxN8xodqu6GBqSO+ni27bY2zo1Hz+ozQ5J EdDGDUdZZC0XNw1E0LRRyQu596HlGZNyxfmXQ7maot+FJngkFBzSicT6UzBqo9q861So nUCw== 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 bu15si1262176ejb.175.2020.11.19.23.25.10; Thu, 19 Nov 2020 23:25:34 -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 S1726644AbgKTHXY (ORCPT + 99 others); Fri, 20 Nov 2020 02:23:24 -0500 Received: from mx2.suse.de ([195.135.220.15]:49858 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbgKTHXY (ORCPT ); Fri, 20 Nov 2020 02:23:24 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1A252AC0C; Fri, 20 Nov 2020 07:23:23 +0000 (UTC) Received: by lion.mk-sys.cz (Postfix, from userid 1000) id 9F6D0603F9; Fri, 20 Nov 2020 08:23:22 +0100 (CET) Date: Fri, 20 Nov 2020 08:23:22 +0100 From: Michal Kubecek To: tanhuazhong Cc: Andrew Lunn , 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: <20201120072322.slrpgqydcupm63ep@lion.mk-sys.cz> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8e9ba4c4-3ef4-f8bc-ab2f-92d695f62f12@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Michal